File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
src/test/java/com/fasterxml/jackson/core/read Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -500,6 +500,18 @@ public void testIntWithENotation() throws Exception {
500
500
}
501
501
}
502
502
503
+ public void testLargeBigIntegerWithENotation () throws Exception {
504
+ // slightly bigger than Double.MAX_VALUE (we need to avoid parsing as double in this case)
505
+ final String DOC = "2e308 " ;
506
+ final BigInteger expected = new BigDecimal (DOC .trim ()).toBigInteger ();
507
+ for (int mode : ALL_MODES ) {
508
+ try (JsonParser p = createParser (jsonFactory (), mode , DOC )) {
509
+ assertToken (JsonToken .VALUE_NUMBER_FLOAT , p .nextToken ());
510
+ assertEquals (expected , p .getBigIntegerValue ());
511
+ }
512
+ }
513
+ }
514
+
503
515
/*
504
516
/**********************************************************************
505
517
/* Tests, floating point (basic)
You can’t perform that action at this time.
0 commit comments