@@ -49,12 +49,11 @@ void testFuzzyLikeBothPresent() {
4949
5050 @ Test
5151 void testFuzzyLikeFirstNameNull () {
52- String fName = null ;
5352 String lName = "Flintstone" ;
5453
5554 SelectStatementProvider selectStatement = select (id , firstName , lastName )
5655 .from (person )
57- .where (firstName , isLikeWhenPresent (fName ).map (SearchUtils ::addWildcards ))
56+ .where (firstName , isLikeWhenPresent (( String ) null ).map (SearchUtils ::addWildcards ))
5857 .and (lastName , isLike (lName ).map (SearchUtils ::addWildcards ))
5958 .build ()
6059 .render (RenderingStrategies .MYBATIS3 );
@@ -70,12 +69,11 @@ void testFuzzyLikeFirstNameNull() {
7069 @ Test
7170 void testFuzzyLikeLastNameNull () {
7271 String fName = "Fred" ;
73- String lName = null ;
7472
7573 SelectStatementProvider selectStatement = select (id , firstName , lastName )
7674 .from (person )
7775 .where (firstName , isLike (fName ).map (SearchUtils ::addWildcards ))
78- .and (lastName , isLikeWhenPresent (lName ).map (SearchUtils ::addWildcards ))
76+ .and (lastName , isLikeWhenPresent (( String ) null ).map (SearchUtils ::addWildcards ))
7977 .build ()
8078 .render (RenderingStrategies .MYBATIS3 );
8179
@@ -89,13 +87,10 @@ void testFuzzyLikeLastNameNull() {
8987
9088 @ Test
9189 void testFuzzyLikeBothNull () {
92- String fName = null ;
93- String lName = null ;
94-
9590 SelectStatementProvider selectStatement = select (id , firstName , lastName )
9691 .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 ))
9994 .configureStatement (c -> c .setNonRenderingWhereClauseAllowed (true ))
10095 .build ()
10196 .render (RenderingStrategies .MYBATIS3 );
0 commit comments