-
-
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
BasicClassIntrospector.forSerialization(...).findProperties
should respect MapperFeature.AUTO_DETECT_GETTERS/SETTERS
#1223
Comments
@headw01 with quick look, that looks like a flaw: if you disable auto-detection, only More common way nowadays is to set visibility levels low enough (to |
Actually if you try serialization, only one property is serialized, so I think this has more to do with introspection: mechanism you are using is not quite how Jackson itself detects properties. I'll check out this bit more and code sample of how introspection would work. |
Actually I take that back: access is just fine. But it does look like there is a minor flaw in handling; due to (earlier) optimizations, auto-detection settings are only considered for "relevant" parts, and setter-visibility is not considered relevant for serialization. Long story short, this leads to So I think I'll have a fix to make here. Just need to think carefully whether fix is safe to add for 2.7.5, or just 2.8.0. |
BasicClassIntrospector.forSerialization(...).findProperties
should respect MapperFeature.AUTO_DETECT_GETTERS/SETTERS?
BasicClassIntrospector.forSerialization(...).findProperties
should respect MapperFeature.AUTO_DETECT_GETTERS/SETTERS?BasicClassIntrospector.forSerialization(...).findProperties
should respect MapperFeature.AUTO_DETECT_GETTERS/SETTERS
When I set the ObjectMapper MapperConfig to not AutoDetect and use the BasicClassIntrospector to get the properties, I seem to still be getting the Methods. I am currently using version 2.7.3.
The following code produces this output:
Found property count 2, there should only be one??
Found property: name=name, internalName=name
Found property: name=groupname, internalName=groupname
I think it should produce only this output:
Found property: name=groupname, internalName=groupname
The text was updated successfully, but these errors were encountered: