File tree 1 file changed +7
-4
lines changed
cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/fuzz
1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change 1
- package com .fasterxml .jackson .dataformat .cbor .failing ;
1
+ package com .fasterxml .jackson .dataformat .cbor .fuzz ;
2
2
3
- import java .math .BigInteger ;
3
+ import java .math .BigDecimal ;
4
4
5
5
import com .fasterxml .jackson .databind .JsonNode ;
6
6
import com .fasterxml .jackson .databind .ObjectMapper ;
@@ -42,7 +42,10 @@ public void testBigDecimalOverflow() throws Exception
42
42
43
43
JsonNode root = MAPPER .readTree (input );
44
44
assertTrue (root .isNumber ());
45
- assertTrue (root .isBigInteger ());
46
- assertEquals (BigInteger .ZERO , root .bigIntegerValue ());
45
+ assertTrue (root .isBigDecimal ());
46
+
47
+ // No point checking the actual value... could have a look at scale?
48
+ BigDecimal dec = root .decimalValue ();
49
+ assertEquals (Integer .MIN_VALUE + 1 , dec .scale ());
47
50
}
48
51
}
You can’t perform that action at this time.
0 commit comments