-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Fixes #1573 #1574
Fixes #1573 #1574
Conversation
Would it be possible to have a unit test for this? Part of this would be to ensure fix, but most importantly guard against regression. Also would be good to know if |
Absolutely. I apologize for not already providing tests for this. I was in a hurry, and just shoved everything I had up. I'll provide the tests sometime tonight or this weekend. |
@jjware np at all, thank you for submitting this! |
I will have tests published to this pull request shortly. I just wanted to mention that while building my tests, I found out that using a builder constructor parameter annotated with @JsonUnwrapped does not work and yields an exception pertaining to unknown fields. This makes me think that the parser is not picking up on the @JsonProperty annotations of the unwrapped class. This is a separate issue that I will try to address after finishing with this one. |
@jjware Problems with unwrapping are not entirely unexpected, since no introspection is or can be done from that point: all code knows is that POJO in question contains some properties, and so anything otherwise unknown must be buffered, and attempt to bind them must be done at a later point. I really wish I had not implemented In the meantime it sounds like initial problem is resolved so I'll merge this. |
@cowtowncoder I can completely understand how the |
@jjware Thank you for sharing this. I do know that it is widely used (if not for nothing else due to bug reports :) ), and due to wide usage will do my best to try to keep it working. Thank you for helping with this. For Jackson 3.x I think it should be possible to rewrite handling to work much better; and this could also help with some other related things, such as "any" properties. |
Please excuse the trailing whitespace removal. My IDE likes to keep things tidy.
Essentially, the logic was cutting short the processing of settable properties. I deleted the code which caused the premature return, and now all settable properties are able to be processed appropriately with the object construction happening at the end of the function after the primary loop.