-
-
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
2.15.0 does not seem to honor PropertyAccessor.IS_GETTER visibility anymore #3904
Comments
Could you move this to the jackson kotlin module? Noone in core jackson team uses Kotlin. |
As you wish, but I can also edit it to write the same code in Java :) |
try a Java example but as long as this remains a Kotlin example, it will probably require us to pass this off to the Kotlin module team to look at |
I could not reproduce in Java, and with the cleaner example shown in the updated description, the issue disappears when removing the KotlinModule... Let me close this issue and open a new one in the Kotlin module repo. Sorry for the inconvenience, |
@fleiber Thank you for checking this. I think this is related to the nasty incompatibility between Kotlin's handling of "isXxx" properties wrt Java Beans handling. I think Kotlin will retain "is" part for logical property name (as per Kotlin spec, perfectly fine), but that does not necessarily play nicely with databind as the rules are different. |
Here is a small main reproducing the behaviour change:
We serialize these classes with
setVisibility(PropertyAccessor.IS_GETTER, Visibility.NONE)
to ignore the isXXX methods, and please note that we cannot use@JsonIgnore
("This annotation is not applicable to target 'member property without backing field or delegate'").Starting with Jackson 2.15.0, the
isZero
property is serialized, then the deserialization fails.The way we use the visibility feature looks fine to me, this property was correctly ignored at serialization with version 2.14.2, so I would say the 2.15 change does look like a regression.
The text was updated successfully, but these errors were encountered: