Skip to content

Commit 80e7819

Browse files
Homletjhoeller
authored andcommitted
Fix construction of NullSafeComparator in nullsLow
Previously, both nullsLow(Comparator<T>) and nullsHigh(Comparator<T>) returned a NullSafeComparator which treated nulls as being high. This commit corrects this typo.
1 parent cb4fa37 commit 80e7819

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

spring-core/src/main/java/org/springframework/util/comparator/Comparators.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ public static <T> Comparator<T> nullsLow() {
5252
* @see NullSafeComparator#NullSafeComparator(boolean)
5353
*/
5454
public static <T> Comparator<T> nullsLow(Comparator<T> comparator) {
55-
return new NullSafeComparator<>(comparator, false);
55+
return new NullSafeComparator<>(comparator, true);
5656
}
5757

5858
/**

0 commit comments

Comments
 (0)