File tree Expand file tree Collapse file tree 1 file changed +30
-0
lines changed
cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/failing Expand file tree Collapse file tree 1 file changed +30
-0
lines changed Original file line number Diff line number Diff line change 1+ package com .fasterxml .jackson .dataformat .cbor .failing ;
2+
3+ import com .fasterxml .jackson .core .*;
4+
5+ import com .fasterxml .jackson .dataformat .cbor .*;
6+
7+ public class TagParsing185Test extends CBORTestBase
8+ {
9+ private final CBORFactory CBOR_F = new CBORFactory ();
10+
11+ public void testRecursiveTags () throws Exception
12+ {
13+ _testRecursiveTags (20000 );
14+ }
15+
16+ private void _testRecursiveTags (int levels ) throws Exception
17+ {
18+ byte [] data = new byte [levels * 2 ];
19+ for (int i = 0 ; i < levels ; i ++) {
20+ data [i * 2 ] = (byte )(CBORConstants .PREFIX_TYPE_TAG +
21+ CBORConstants .TAG_DECIMAL_FRACTION );
22+ data [(i * 2 ) + 1 ] = (byte )(CBORConstants .PREFIX_TYPE_ARRAY +
23+ 2 );
24+ }
25+
26+ JsonParser p = CBOR_F .createParser (data );
27+
28+ assertToken (JsonToken .START_ARRAY , p .nextToken ());
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments