@@ -18,12 +18,11 @@ class NumberOverflowTest
1818 extends JacksonCoreTestBase
1919{
2020 private final JsonFactory FACTORY = JsonFactory .builder ()
21- .streamReadConstraints (StreamReadConstraints .builder ().maxNumberLength (1000000 ).build ())
21+ .streamReadConstraints (StreamReadConstraints .builder ().maxNumberLength (1_000_000 ).build ())
2222 .build ();
2323
2424 // NOTE: this should be long enough to trigger perf problems
25- // 19-
26- private final static int BIG_NUM_LEN = 199999 ;
25+ private final static int BIG_NUM_LEN = 199_999 ;
2726 private final static String BIG_POS_INTEGER ;
2827 static {
2928 StringBuilder sb = new StringBuilder (BIG_NUM_LEN );
@@ -73,13 +72,12 @@ void simpleLongOverflow() throws Exception
7372 }
7473
7574 // Note: only 4 cardinal types; `short`, `byte` and `char` use same code paths
76- // Note: due to [jackson-core#493], we'll skip DataInput-backed parser
7775
7876 // [jackson-core#488]
7977 @ Test
8078 void maliciousLongOverflow () throws Exception
8179 {
82- for (int mode : ALL_STREAMING_MODES ) {
80+ for (int mode : ALL_MODES ) {
8381 for (String doc : new String [] { BIG_POS_DOC , BIG_NEG_DOC }) {
8482 JsonParser p = createParser (FACTORY , mode , doc );
8583 assertToken (JsonToken .START_ARRAY , p .nextToken ());
@@ -102,7 +100,7 @@ void maliciousLongOverflow() throws Exception
102100 @ Test
103101 void maliciousIntOverflow () throws Exception
104102 {
105- for (int mode : ALL_STREAMING_MODES ) {
103+ for (int mode : ALL_MODES ) {
106104 for (String doc : new String [] { BIG_POS_DOC , BIG_NEG_DOC }) {
107105 JsonParser p = createParser (FACTORY , mode , doc );
108106 assertToken (JsonToken .START_ARRAY , p .nextToken ());
@@ -125,7 +123,7 @@ void maliciousIntOverflow() throws Exception
125123 @ Test
126124 void maliciousBigIntToDouble () throws Exception
127125 {
128- for (int mode : ALL_STREAMING_MODES ) {
126+ for (int mode : ALL_MODES ) {
129127 final String doc = BIG_POS_DOC ;
130128 JsonParser p = createParser (FACTORY , mode , doc );
131129 assertToken (JsonToken .START_ARRAY , p .nextToken ());
@@ -141,7 +139,7 @@ void maliciousBigIntToDouble() throws Exception
141139 @ Test
142140 void maliciousBigIntToFloat () throws Exception
143141 {
144- for (int mode : ALL_STREAMING_MODES ) {
142+ for (int mode : ALL_MODES ) {
145143 final String doc = BIG_POS_DOC ;
146144 JsonParser p = createParser (FACTORY , mode , doc );
147145 assertToken (JsonToken .START_ARRAY , p .nextToken ());
0 commit comments