-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
Fix #1037: @JsonIgnoreProperties does not stack #5549
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
base: 3.x
Are you sure you want to change the base?
Conversation
|
While this could work for specific annotation (esp. if handling of interfaces was added), it:
so I don't want to approach the problem this way. |
|
Thank you for the detailed explanation. It makes sense that the solution should be implemented at the I'll give it another try. |
|
@cowtowncoder Instead, I've added I would appreciate it if you could take a look when you have time. |
|
@JacksonJang Very interesting! It is closer to something acceptable but I need to think carefully. Another further approach would be to see if it was possible to extend Annotation types to contain merge functionality (method) as part EDIT: never mind, annotation types cannot implement interfaces, nor define parameter-taking methods. |
|
Thank you for taking the time to think this through. Agreed -- that's a limitation of Java annotations. My intent was to keep the merge logic generic at the |
Issue: #1037
Previously,
@JsonIgnorePropertiesannotations didn't stack across inheritance hierarchies.When both a parent class and child class had
@JsonIgnorePropertiesannotations, only the child's annotation was recognized, ignoring the parent's configuration entirely.So, I fixed this by collecting ignored property names into ignoreNames and merging them using withIgnored().