Skip to content

Commit 8ab4268

Browse files
committed
Merge branch '2.10' into 2.11
2 parents ef06772 + 21f8159 commit 8ab4268

File tree

1 file changed

+30
-0
lines changed

1 file changed

+30
-0
lines changed
Lines changed: 30 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,30 @@
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+
}

0 commit comments

Comments
 (0)