-
-
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
@JsonProperty
and equivalents should merge with AnnotationIntrospectorPair
#4364
Comments
This changed existing behaviour, which is currently causing us trouble. Any advice on how to migrate? We have a custom XML annotation introspector which explicitly sets the wrapper name to
This used to work in Jackson 2.15. Unfortunately, due to this change, I have not found a way to fix this. Is there a way to get rid of the default annotation processor? Should I raise an issue? |
@SimonCockx you should file an issue for One way you could avoid this would be to sub-class |
@cowtowncoder Thanks for the response. Actually I only need one, but I have not found a way to disable the default annotation processor, which seems to be somewhat "hardcoded" in the |
NOTE: #4595 changes behavior for 2.17.2 to not merge |
Describe your Issue
If a property has multiple naming annotations -- such as standard
@JsonProperty
, and@JacksonXmlProperty
fromjackson-dataformat-xml
-- and there are 2AnnotationIntrospector
s, thenAnnotationIntrospectorPair
should merge parts so that if the Primary introspector has no value (empty String or null), value from secondary should be used, for:so that, for example:
where first annotation has precedence (annotation introspector that handles it is the first introspector configured for
AnnotationIntrospectorPair
) we should have localName and namespace from@JsonProperty
sinceJacksonXmlProperty
defines neither (that is, has defaults of "").Currently this is not the case.
The text was updated successfully, but these errors were encountered: