@@ -30,7 +30,8 @@ of this software and associated documentation files (the "Software"), to deal
30
30
import java .lang .reflect .Field ;
31
31
import java .lang .reflect .Method ;
32
32
import java .lang .reflect .Modifier ;
33
- import java .math .*;
33
+ import java .math .BigDecimal ;
34
+ import java .math .BigInteger ;
34
35
import java .util .Collection ;
35
36
import java .util .Enumeration ;
36
37
import java .util .HashMap ;
@@ -1500,19 +1501,19 @@ public static Object stringToValue(String string) {
1500
1501
if ((b >= '0' && b <= '9' ) || b == '-' ) {
1501
1502
try {
1502
1503
if (string .indexOf ('.' ) > -1 || string .indexOf ('e' ) > -1
1503
- || string .indexOf ('E' ) > -1 ) {
1504
+ || string .indexOf ('E' ) > -1
1505
+ || "0" .equals (string .substring (1 ))) {
1504
1506
d = Double .valueOf (string );
1505
1507
if (!d .isInfinite () && !d .isNaN ()) {
1506
1508
return d ;
1507
1509
}
1508
1510
} else {
1509
1511
Long myLong = new Long (string );
1510
1512
if (string .equals (myLong .toString ())) {
1511
- if (myLong == myLong .intValue ()) {
1512
- return myLong .intValue ();
1513
- } else {
1514
- return myLong ;
1513
+ if (myLong .longValue () == myLong .intValue ()) {
1514
+ return Integer .valueOf (myLong .intValue ());
1515
1515
}
1516
+ return myLong ;
1516
1517
}
1517
1518
}
1518
1519
} catch (Exception ignore ) {
0 commit comments