18
18
import java .util .Arrays ;
19
19
import java .util .Collection ;
20
20
import java .util .Collections ;
21
+ import java .util .Objects ;
21
22
import java .util .function .Predicate ;
22
23
import java .util .function .UnaryOperator ;
23
24
24
25
import org .jspecify .annotations .Nullable ;
25
26
import org .mybatis .dynamic .sql .AbstractListValueCondition ;
26
- import org .mybatis .dynamic .sql .util .StringUtilities ;
27
- import org .mybatis .dynamic .sql .util .Utilities ;
28
27
29
28
public class IsNotInCaseInsensitiveWhenPresent extends AbstractListValueCondition <String >
30
29
implements CaseInsensitiveRenderableCondition {
@@ -35,8 +34,8 @@ public static IsNotInCaseInsensitiveWhenPresent empty() {
35
34
return EMPTY ;
36
35
}
37
36
38
- protected IsNotInCaseInsensitiveWhenPresent (Collection <@ Nullable String > values ) {
39
- super (Utilities . removeNullElements ( values ) );
37
+ protected IsNotInCaseInsensitiveWhenPresent (Collection <String > values ) {
38
+ super (values );
40
39
}
41
40
42
41
@ Override
@@ -66,8 +65,7 @@ public static IsNotInCaseInsensitiveWhenPresent of(@Nullable String... values) {
66
65
}
67
66
68
67
public static IsNotInCaseInsensitiveWhenPresent of (Collection <@ Nullable String > values ) {
69
- // Keep the null safe upper case utility for backwards compatibility
70
- //noinspection DataFlowIssue
71
- return new IsNotInCaseInsensitiveWhenPresent (values ).map (StringUtilities ::safelyUpperCase );
68
+ return new IsNotInCaseInsensitiveWhenPresent (
69
+ values .stream ().filter (Objects ::nonNull ).map (String ::toUpperCase ).toList ());
72
70
}
73
71
}
0 commit comments