-
-
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
JsonSetter(contentNulls = FAIL)
is ignored in JsonCreator(DELEGATING)
argument
#4200
Comments
I have debugged it and it seems that all parsing related to jackson-databind/src/main/java/com/fasterxml/jackson/databind/deser/BeanDeserializerBase.java Lines 696 to 703 in 3a271be
I could not fully check the path, but it seems that the parsing of the parameters was done before this process, so I personally think it is appropriate to copy the results of that process. |
This does sound like a bug, and not related to general challenge wrt Creator property detection (since there is explicit |
@k163377 is probably right in pointing that this is why annotations are not found -- there is no property accessor (Constructor/Factory method parameter declaration) being passed and a placeholder (with no annotations) is given. And why is it not being passed? It is not being retained during Creator collection process, it looks like. |
Hmmh. Access is via I might just add a failing test for now. |
Ok doh. I am blind. But need to see how to change |
Ok, phew. Was able to figure it out, relatively cleanly. Fix will be in 2.17.0 at least, although I guess I can double-check if this might be backportable. |
Ok, and with that backporting to 2.16.1 worked fine. |
Wow, thank you for even back porting. |
No problem @k163377 -- I do it for safe fixes. Thank you for reporting this, pointing out where the problem is. Saved me lots of time. |
### What changes were proposed in this pull request? This pr aims to upgrade jackson from 2.16.0 to 2.16.1 ### Why are the changes needed? The new version bring some fix: - [#4200](FasterXML/jackson-databind#4200): JsonSetter(contentNulls = FAIL) is ignored in delegating JsonCreator argument - [#4216](FasterXML/jackson-databind#4216): Primitive array deserializer not being captured by DeserializerModifier - [#4219](FasterXML/jackson-databind#4219): JsonNode.findValues() and findParents() missing expected values in 2.16.0 The full release notes as follows: - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16.1 ### Does this PR introduce _any_ user-facing change? No ### How was this patch tested? Pass Github Actions ### Was this patch authored or co-authored using generative AI tooling? No Closes #44494 from LuciferYang/SPARK-46508. Authored-by: yangjie01 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
This pr aims to upgrade jackson from 2.16.0 to 2.16.1 The new version bring some fix: - [apache#4200](FasterXML/jackson-databind#4200): JsonSetter(contentNulls = FAIL) is ignored in delegating JsonCreator argument - [apache#4216](FasterXML/jackson-databind#4216): Primitive array deserializer not being captured by DeserializerModifier - [apache#4219](FasterXML/jackson-databind#4219): JsonNode.findValues() and findParents() missing expected values in 2.16.0 The full release notes as follows: - https://github.com/FasterXML/jackson/wiki/Jackson-Release-2.16.1 No Pass Github Actions No Closes apache#44494 from LuciferYang/SPARK-46508. Authored-by: yangjie01 <[email protected]> Signed-off-by: Dongjoon Hyun <[email protected]>
Search before asking
Describe the bug
I specified
JsonSetter(contentNulls = FAIL)
orSKIP
in the constructor argument withJsonCreator(DELEGATING)
, but it was ignored.Version Information
2.15.3
Reproduction
If other than
DELEGATING
, anInvalidNullException
is thrown as expected.Expected behavior
An
InvalidNullException
is thrown.Additional context
Fixing this issue may make it easier to resolve FasterXML/jackson-module-kotlin#399.
The text was updated successfully, but these errors were encountered: