@@ -38,7 +38,7 @@ public static <T> IsNotInCaseInsensitive<T> empty() {
38
38
}
39
39
40
40
protected IsNotInCaseInsensitive (Collection <T > values ) {
41
- super (values );
41
+ super (values . stream (). map ( StringUtilities :: upperCaseIfPossible ). toList () );
42
42
}
43
43
44
44
@ Override
@@ -57,19 +57,6 @@ public IsNotInCaseInsensitive<T> filter(Predicate<? super T> predicate) {
57
57
return filterSupport (predicate , IsNotInCaseInsensitive ::new , this , IsNotInCaseInsensitive ::empty );
58
58
}
59
59
60
- /**
61
- * If renderable, apply the mapping to the value and return a new condition with the new value. Else return a
62
- * condition that will not render (this).
63
- *
64
- * <p>This function DOES NOT automatically transform values to uppercase, so it potentially creates a
65
- * case-sensitive query. For String conditions you can use {@link StringUtilities#mapToUpperCase(Function)}
66
- * to add an uppercase transform after your mapping function.
67
- *
68
- * @param mapper a mapping function to apply to the value, if renderable
69
- * @param <R> type of the new condition
70
- * @return a new condition with the result of applying the mapper to the value of this condition,
71
- * if renderable, otherwise a condition that will not render.
72
- */
73
60
@ Override
74
61
public <R > IsNotInCaseInsensitive <R > map (Function <? super T , ? extends R > mapper ) {
75
62
return mapSupport (mapper , IsNotInCaseInsensitive ::new , IsNotInCaseInsensitive ::empty );
@@ -80,7 +67,6 @@ public static IsNotInCaseInsensitive<String> of(String... values) {
80
67
}
81
68
82
69
public static IsNotInCaseInsensitive <String > of (Collection <String > values ) {
83
- // Keep the null safe upper case utility for backwards compatibility in case someone passes in a null
84
- return new IsNotInCaseInsensitive <>(values .stream ().map (StringUtilities ::safelyUpperCase ).toList ());
70
+ return new IsNotInCaseInsensitive <>(values );
85
71
}
86
72
}
0 commit comments