Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Don't generate a spurious NullNode after parsing an embedded object. #1052

Merged
merged 1 commit into from
Dec 19, 2015

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.

None yet

2 participants