File tree Expand file tree Collapse file tree 1 file changed +10
-10
lines changed
json-smart/src/main/java/net/minidev/json/parser Expand file tree Collapse file tree 1 file changed +10
-10
lines changed Original file line number Diff line number Diff line change @@ -138,20 +138,20 @@ public void checkLeadinZero() throws ParseException {
138
138
139
139
protected Number extractFloat () throws ParseException {
140
140
if (!acceptLeadinZero )
141
- checkLeadinZero ();
142
-
143
- try {
144
- if (!useHiPrecisionFloat )
141
+ checkLeadinZero ();
142
+
143
+ try {
144
+ if (!useHiPrecisionFloat )
145
145
return Float .parseFloat (xs );
146
-
147
- if (xs .length () > 18 ) // follow JSonIJ parsing method
146
+
147
+ if (xs .length () > 18 ) // follow JSonIJ parsing method
148
148
return new BigDecimal (xs );
149
149
150
- return Double .parseDouble (xs );
150
+ return Double .parseDouble (xs );
151
151
152
- } catch (Exception e ){
153
- throw new ParseException (pos , ERROR_UNEXPECTED_TOKEN , xs );
154
- }
152
+ } catch (NumberFormatException e ){
153
+ throw new ParseException (pos , ERROR_UNEXPECTED_TOKEN , xs );
154
+ }
155
155
}
156
156
157
157
/**
You can’t perform that action at this time.
0 commit comments