Skip to content

Commit

Permalink
reidentation and new exception
Browse files Browse the repository at this point in the history
  • Loading branch information
tmayer committed Feb 26, 2021
1 parent 4ad165d commit 3db4106
Showing 1 changed file with 10 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -133,20 +133,20 @@ public void checkLeadinZero() throws ParseException {

protected Number extractFloat() throws ParseException {
if (!acceptLeadinZero)
checkLeadinZero();
try {
if (!useHiPrecisionFloat)
checkLeadinZero();

try {
if (!useHiPrecisionFloat)
return Float.parseFloat(xs);
if (xs.length() > 18) // follow JSonIJ parsing method

if (xs.length() > 18) // follow JSonIJ parsing method
return new BigDecimal(xs);

return Double.parseDouble(xs);
return Double.parseDouble(xs);

} catch(Exception e){
throw new ParseException(pos, ERROR_UNEXPECTED_TOKEN, xs);
}
} catch(NumberFormatException e){
throw new ParseException(pos, ERROR_UNEXPECTED_TOKEN, xs);
}
}

/**
Expand Down

0 comments on commit 3db4106

Please sign in to comment.