Skip to content

Commit a0fb296

Browse files
committed
Merge branch '2.21' into 2.x
2 parents 1135e6b + 7d2313e commit a0fb296

2 files changed

Lines changed: 16 additions & 0 deletions

File tree

cbor/src/test/java/com/fasterxml/jackson/dataformat/cbor/CBORTestBase.java

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,18 @@ protected CBORGenerator stringrefCborGenerator(ByteArrayOutputStream result)
110110
.createGenerator(result);
111111
}
112112

113+
/*
114+
/**********************************************************
115+
/* Parser construction
116+
/**********************************************************
117+
*/
118+
119+
protected JsonParser createParserUsingStream(TokenStreamFactory f, byte[] input)
120+
throws IOException
121+
{
122+
return f.createParser(new ByteArrayInputStream(input));
123+
}
124+
113125
/*
114126
/**********************************************************
115127
/* Additional assertion methods

smile/src/test/java/com/fasterxml/jackson/dataformat/smile/BaseTestForSmile.java

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -269,6 +269,10 @@ protected static byte[] utf8Bytes(String str) {
269269
return str.getBytes(StandardCharsets.UTF_8);
270270
}
271271

272+
protected static String utf8String(ByteArrayOutputStream bytes) {
273+
return new String(bytes.toByteArray(), StandardCharsets.UTF_8);
274+
}
275+
272276
protected static byte[] concat(byte[] ... chunks)
273277
{
274278
int len = 0;

0 commit comments

Comments
 (0)