-
-
Notifications
You must be signed in to change notification settings - Fork 2.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
[BUG] The subclass field does not overwrite the parent class #3769
Comments
Things probably changed when Lombok started copying certain annotation to the setter with 1.18.16, including With 1.18.12, the I tend towards "this is a Jackson bug", although you could argue that the setter method is overridden and thus it's the same method. On the other hand, From a lombok POV, this is another example why it's a bad idea to copy those Jackson annotations in the first place. (Except, of course, for builders, because Jackson does not combine the builder's setter methods with the property.) |
@janrieke |
If @ JsonIgnore must be added to the method, should both the get and set methods be added; However, I personally feel that @ JsonIgnore should not be added to the method. The historical code encountered problems and now I want to upgrade to a higher version of Lombok, but I cannot do it |
You should be able to mitigate by adding |
It's a bit awkward, the historical code is that the parent class defaults to @ JsonIgnore, and some special subclasses need to remove @ JsonIgnore |
You can always add a custom setter without annotation to the parent class. I agree with @janrieke that this is probably a jackson bug/issue. |
Subclass fields have removed annotations @JsonIgnore
version 1.8.12 can runsuccess
but High version failed to run
The text was updated successfully, but these errors were encountered: