use of com.fasterxml.jackson.core.json.ReaderBasedJsonParser in project jackson-core by FasterXML.
the class JsonParserSequenceTest method testClose.
@Test
public void testClose() throws IOException {
IOContext ioContext = new IOContext(new BufferRecycler(), this, true);
ReaderBasedJsonParser readerBasedJsonParser = new ReaderBasedJsonParser(ObjectReadContext.empty(), ioContext, 2, null, CharsToNameCanonicalizer.createRoot());
JsonParserSequence jsonParserSequence = JsonParserSequence.createFlattened(true, readerBasedJsonParser, readerBasedJsonParser);
assertFalse(jsonParserSequence.isClosed());
jsonParserSequence.close();
assertTrue(jsonParserSequence.isClosed());
assertNull(jsonParserSequence.nextToken());
}
Aggregations