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 @@ -133,20 +133,20 @@ public void checkLeadinZero() throws ParseException {
133
133
134
134
protected Number extractFloat () throws ParseException {
135
135
if (!acceptLeadinZero )
136
- checkLeadinZero ();
137
-
138
- try {
139
- if (!useHiPrecisionFloat )
136
+ checkLeadinZero ();
137
+
138
+ try {
139
+ if (!useHiPrecisionFloat )
140
140
return Float .parseFloat (xs );
141
-
142
- if (xs .length () > 18 ) // follow JSonIJ parsing method
141
+
142
+ if (xs .length () > 18 ) // follow JSonIJ parsing method
143
143
return new BigDecimal (xs );
144
144
145
- return Double .parseDouble (xs );
145
+ return Double .parseDouble (xs );
146
146
147
- } catch (Exception e ){
148
- throw new ParseException (pos , ERROR_UNEXPECTED_TOKEN , xs );
149
- }
147
+ } catch (NumberFormatException e ){
148
+ throw new ParseException (pos , ERROR_UNEXPECTED_TOKEN , xs );
149
+ }
150
150
}
151
151
152
152
/**
You can’t perform that action at this time.
0 commit comments