File tree Expand file tree Collapse file tree 1 file changed +6
-2
lines changed
jnosql-tinkerpop/src/main/java/org/eclipse/jnosql/databases/tinkerpop/communication Expand file tree Collapse file tree 1 file changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -24,11 +24,12 @@ enum LikeToRegex {
2424
2525 /**
2626 * Converts like pattern to regex pattern.
27+ *
2728 * @param text the like pattern to convert
2829 * @return the regex pattern
2930 */
3031 String likeToRegex (Object text ) {
31- String like = text == null ? null : text .toString ();
32+ String like = text == null ? null : text .toString ();
3233 if (like == null ) {
3334 return "(?!)" ;
3435 }
@@ -37,7 +38,10 @@ String likeToRegex(Object text) {
3738 for (int i = 0 ; i < like .length (); i ++) {
3839 char c = like .charAt (i );
3940 if (c == '%' || c == '_' ) {
40- if (!lit .isEmpty ()) { rx .append (java .util .regex .Pattern .quote (lit .toString ())); lit .setLength (0 ); }
41+ if (!lit .isEmpty ()) {
42+ rx .append (java .util .regex .Pattern .quote (lit .toString ()));
43+ lit .setLength (0 );
44+ }
4145 rx .append (c == '%' ? ".*" : "." );
4246 } else {
4347 lit .append (c );
You can’t perform that action at this time.
0 commit comments