File tree Expand file tree Collapse file tree
main/java/nonapi/io/github/classgraph/json
test/java/nonapi/io/github/classgraph/json Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -248,7 +248,7 @@ private Number parseNumber() throws ParseException {
248248 throw new ParseException (this , "Expected digits after decimal point" );
249249 }
250250 }
251- final boolean hasExponentPart = peek () == '. ' ;
251+ final boolean hasExponentPart = peek () == 'e' || peek () == 'E ' ;
252252 if (hasExponentPart ) {
253253 next ();
254254 final char sign = peek ();
Original file line number Diff line number Diff line change 11package nonapi .io .github .classgraph .json ;
22
3- import nonapi .io .github .classgraph .types .ParseException ;
43import org .junit .Test ;
54
6- import java .lang .reflect .Constructor ;
7- import java .lang .reflect .Method ;
8-
9- import static org .junit .Assert .*;
5+ import nonapi .io .github .classgraph .types .ParseException ;
106
7+ /**
8+ * Unit test.
9+ */
1110public class JSONParserTest {
11+ /** Test double value. */
1212 @ Test
1313 public void test1 () throws ParseException {
1414 JSONParser .parseJSON ("{\" doubleValue\" :-2.147483648}" );
1515 }
1616
17+ /** Test double value with exponent. */
1718 @ Test
1819 public void test2 () throws ParseException {
1920 JSONParser .parseJSON ("{\" doubleValue\" :-2.147483648E9}" );
You can’t perform that action at this time.
0 commit comments