Using Comparator factories in a couple more cases

This commit is contained in:
Jesse Glick committed 2021-08-30 15:01:59 -04:00
1 parent fef3a2eb37
commit fca6d7194f
2 files changed
+2 -2

No files matched your search

+1 -1
View File
@@ -3360,7 +3360,7 @@ public final class FilePath implements SerializableOnlyOverRemoting {
private static final long serialVersionUID = 1L;
}
private static final Comparator<String> SHORTER_STRING_FIRST = (o1, o2) -> o1.length() - o2.length();
private static final Comparator<String> SHORTER_STRING_FIRST = Comparator.comparingInt(String::length);
/**
* Gets the {@link FilePath} representation of the "~" directory