-
-
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
@JsonIgnoreProperties does not stack #1037
Comments
@JsonIgnoreProperties
does not stack
Correct, this is the current behavior, with the exception that if Class has annotation as well as property with value of that type, then both sets are combined (union is used). This is not an optimal behavior, but it is driven by the way all annotations are handled, with respect to inheritance: since annotation handler (which also weaves in mix-ins) has no knowledge of semantics of particular annotations (nor is there a way to actually instantiate Annotation types even if it did), there is simply no way to merge annotations from super-types. This is not to say this could never be done, but it would require significant improvements to annotation handling. I have actually thought about this, and one particular example was indeed So I will keep this issue open and I hope we can figure out the way to get this done in future; along with a marker that indicates alternative of full override (current behavior) as well. Thank you for suggesting this. |
Hi, is there any update on this? Or can I vote on this change? |
@huehnerlady No -- there is no invisible magical update that just happened to be done without updating issue. We don't do that. As to voting: if github has a mechanism feel free to. The problem here unfortunately that of implementation: to make this happen, the whole annotation processing system would need to be rewritten as per earlier comment. I hope this can be done for 3.0, but it will be ways off. |
@cowtowncoder thank you for your quick answer, I will keep watching this issue then and hopefully this will be done in 3.0 :) |
I'd like to be able to aggregate
@JsonIgnoreProperties
, but it looks like it's only accepting the "top" one.Here's a test case:
When the
@JsonIgnoreProperties
is on a mixin, the mixin's annotation trumps all.Would it be possible to aggregate all the
@JsonIgnoreProperties
?The text was updated successfully, but these errors were encountered: