Skip to content

Conversation

philipa
Copy link
Contributor

@philipa philipa commented Dec 19, 2015

Add missing break statement.

I found this while playing with CBOR:

        final ByteArrayOutputStream baos = new ByteArrayOutputStream();
        final CBORFactory factory = new CBORFactory(new ObjectMapper());
        final CBORGenerator g = factory.createGenerator(baos);

        g.writeStartArray();
        g.writeBinary(new byte[] { 0x10 });
        g.writeEndArray();
        g.close();

        final TreeNode tree = factory.createParser(baos.toByteArray()).readValueAsTree();
        System.out.println(tree); // ["EA==",null]

@cowtowncoder
Copy link
Member

Ah, good catch! I'll also backport it to older versions.

cowtowncoder added a commit that referenced this pull request Dec 19, 2015
Don't generate a spurious NullNode after parsing an embedded object.
@cowtowncoder cowtowncoder merged commit 11c200b into FasterXML:master Dec 19, 2015
cowtowncoder added a commit that referenced this pull request Dec 20, 2015
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants