File tree Expand file tree Collapse file tree 1 file changed +9
-5
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert Expand file tree Collapse file tree 1 file changed +9
-5
lines changed Original file line number Diff line number Diff line change @@ -1490,6 +1490,10 @@ protected String mapPropertyName(MongoPersistentProperty property) {
14901490
14911491 static boolean isPositionalParameter (String partial ) {
14921492
1493+ if (!StringUtils .hasText (partial )) {
1494+ return false ;
1495+ }
1496+
14931497 if ("$" .equals (partial )) {
14941498 return true ;
14951499 }
@@ -1499,12 +1503,12 @@ static boolean isPositionalParameter(String partial) {
14991503 return true ;
15001504 }
15011505
1502- try {
1503- Long .valueOf (partial );
1504- return true ;
1505- } catch (NumberFormatException e ) {
1506- return false ;
1506+ for (int i = 0 ; i < partial .length (); i ++) {
1507+ if (!Character .isDigit (partial .charAt (i ))) {
1508+ return false ;
1509+ }
15071510 }
1511+ return true ;
15081512 }
15091513 }
15101514 }
You can’t perform that action at this time.
0 commit comments