@@ -49,12 +49,11 @@ void testFuzzyLikeBothPresent() {
49
49
50
50
@ Test
51
51
void testFuzzyLikeFirstNameNull () {
52
- String fName = null ;
53
52
String lName = "Flintstone" ;
54
53
55
54
SelectStatementProvider selectStatement = select (id , firstName , lastName )
56
55
.from (person )
57
- .where (firstName , isLikeWhenPresent (fName ).map (SearchUtils ::addWildcards ))
56
+ .where (firstName , isLikeWhenPresent (( String ) null ).map (SearchUtils ::addWildcards ))
58
57
.and (lastName , isLike (lName ).map (SearchUtils ::addWildcards ))
59
58
.build ()
60
59
.render (RenderingStrategies .MYBATIS3 );
@@ -70,12 +69,11 @@ void testFuzzyLikeFirstNameNull() {
70
69
@ Test
71
70
void testFuzzyLikeLastNameNull () {
72
71
String fName = "Fred" ;
73
- String lName = null ;
74
72
75
73
SelectStatementProvider selectStatement = select (id , firstName , lastName )
76
74
.from (person )
77
75
.where (firstName , isLike (fName ).map (SearchUtils ::addWildcards ))
78
- .and (lastName , isLikeWhenPresent (lName ).map (SearchUtils ::addWildcards ))
76
+ .and (lastName , isLikeWhenPresent (( String ) null ).map (SearchUtils ::addWildcards ))
79
77
.build ()
80
78
.render (RenderingStrategies .MYBATIS3 );
81
79
@@ -89,13 +87,10 @@ void testFuzzyLikeLastNameNull() {
89
87
90
88
@ Test
91
89
void testFuzzyLikeBothNull () {
92
- String fName = null ;
93
- String lName = null ;
94
-
95
90
SelectStatementProvider selectStatement = select (id , firstName , lastName )
96
91
.from (person )
97
- .where (firstName , isLikeWhenPresent (fName ).map (SearchUtils ::addWildcards ))
98
- .and (lastName , isLikeWhenPresent (lName ).map (SearchUtils ::addWildcards ))
92
+ .where (firstName , isLikeWhenPresent (( String ) null ).map (SearchUtils ::addWildcards ))
93
+ .and (lastName , isLikeWhenPresent (( String ) null ).map (SearchUtils ::addWildcards ))
99
94
.configureStatement (c -> c .setNonRenderingWhereClauseAllowed (true ))
100
95
.build ()
101
96
.render (RenderingStrategies .MYBATIS3 );
0 commit comments