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

@JsonAnySetter does not deserialize null to Deserializer's NullValue #1228

Closed
ejsolberg opened this issue May 11, 2016 · 3 comments
Closed
Milestone

Comments

@ejsolberg
Copy link

ejsolberg commented May 11, 2016

Issue became apparent when using an @JsonAnySetter with the Immutables Library. The underlying implementation uses a guava ImmutableMap which throws an exception when a null entry is added.

I'm using the following interface method declaration for the anySetter. The expectation is that null values would be deserialized as an instance of NullNode instead of null

@JsonAnySetter
Map<String, JsonNode> setUnknownProperties();

I believe the issue is here:
https://github.com/FasterXML/jackson-databind/blob/master/src/main/java/com/fasterxml/jackson/databind/deser/SettableAnyProperty.java#L132-L134

@cowtowncoder
Copy link
Member

Thanks! As per my note on PR, all I need is CLA and I'll merge this fix, backporting to 2.7 as well (or if you want, you can change it for branch 2.7).

@ejsolberg
Copy link
Author

I've just submitted the CLA. I've opened the PR against 2.6. Are you still accepting changes to this branch? I would ideally like to patch it into all open branches.

Thanks!

@cowtowncoder cowtowncoder added this to the 2.7.5 milestone May 13, 2016
@cowtowncoder
Copy link
Member

@ejsolberg I did apply it against 2.6 (thank you for doing it there -- that's perfect), although it is uncertain whether new releases will be made -- branch is closed from full releases. But it is possible that micro-patches could be done, so it'd be in 2.6.6.1. Fix will go in 2.7.5 for sure, and of course in 2.8.0 release candidates once we start that process.

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

No branches or pull requests

2 participants