File tree Expand file tree Collapse file tree 1 file changed +14
-0
lines changed
src/test/java/com/fasterxml/jackson/core/read Expand file tree Collapse file tree 1 file changed +14
-0
lines changed Original file line number Diff line number Diff line change @@ -243,6 +243,20 @@ void leadingDotInNegativeDecimalAllowedReader() throws Exception {
243
243
_testLeadingDotInNegativeDecimalAllowed (jsonFactory (), MODE_READER_THROTTLED );
244
244
}
245
245
246
+ // https://github.com/FasterXML/jackson-databind/issues/4694
247
+ @ Test
248
+ void databind4694 () throws Exception {
249
+ final String str = "-11000.0000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000" ;
250
+ final BigDecimal expected = new BigDecimal (str );
251
+ for (int mode : ALL_MODES ) {
252
+ try (JsonParser p = createParser (mode , String .format (" %s " , str ))) {
253
+ assertEquals (JsonToken .VALUE_NUMBER_FLOAT , p .nextToken ());
254
+ assertEquals (expected , p .getDecimalValue ());
255
+ assertFalse (p .isNaN ());
256
+ }
257
+ }
258
+ }
259
+
246
260
private void _testLeadingDotInDecimalAllowed (JsonFactory f , int mode ) throws Exception
247
261
{
248
262
try (JsonParser p = createParser (f , mode , " .125 " )) {
You can’t perform that action at this time.
0 commit comments