Fix #1037: @JsonIgnoreProperties does not stack#5549
Fix #1037: @JsonIgnoreProperties does not stack#5549JacksonJang wants to merge 6 commits intoFasterXML:3.xfrom
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().