-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Fix #4629 @JsonIncludeProperties & @JsonIgnoreProperties is ignored when deserializing Records #5433
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
Conversation
…ignored when deserializing Records
...est/java/tools/jackson/databind/records/tofix/RecordsWithJsonIncludeAndIgnorals4629Test.java
Show resolved
Hide resolved
…ignored when deserializing Records
src/test-jdk21/java/tools/jackson/databind/jdk21/Java21CollectionsTest.java
Outdated
Show resolved
Hide resolved
|
@JacksonJang Looks good, thank you for contributing this! One thing we need before I can merge the fix is we need CLA from: https://github.com/FasterXML/jackson/blob/main/contributor-agreement.pdf it only needs to be sent once, before the first contribution and is valid for all future Jackson contributions. |
cowtowncoder
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM, just need CLA
|
I sent an email to cla@fasterxml.com after reading your message Have a good day :) |
|
CLA received, can proceed. |
|
Hmmmh. I think this fix broke this Kotlin test: FasterXML/jackson-module-kotlin#308 which is unfortunate... |
|
Is there any test case where that behavior occurs? |
|
Just the Kotlin test: which may be tricky to convert into Java one.... (this is why I didn't catch it before merging -- we have cascading build across modules but only after merging) |
|
Thank you for the answer :) The change I made specifically resolves the conflict between a creator property and an ignored property name. |


resolves #4629
I moved the IgnorePropertiesUtil.shouldIgnore() check to the top of the loop, before the creatorProp check.
This ensures that ignored properties are skipped correctly before any creator property processing happens.