File tree 1 file changed +9
-5
lines changed
spring-data-mongodb/src/main/java/org/springframework/data/mongodb/core/convert
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) {
1490
1490
1491
1491
static boolean isPositionalParameter (String partial ) {
1492
1492
1493
+ if (!StringUtils .hasText (partial )) {
1494
+ return false ;
1495
+ }
1496
+
1493
1497
if ("$" .equals (partial )) {
1494
1498
return true ;
1495
1499
}
@@ -1499,12 +1503,12 @@ static boolean isPositionalParameter(String partial) {
1499
1503
return true ;
1500
1504
}
1501
1505
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
+ }
1507
1510
}
1511
+ return true ;
1508
1512
}
1509
1513
}
1510
1514
}
You can’t perform that action at this time.
0 commit comments