This repository was archived by the owner on Jan 22, 2019. It is now read-only.
This repository was archived by the owner on Jan 22, 2019. It is now read-only.
Default name ignored on @XmlElementWrapper #25
Closed
Description
@XmlElementWrapper (with USE_WRAPPER_NAME_AS_PROPERTY_NAME enabled) only works if the name parameter is given an explicit value. By default it should use the property name, but Jackson uses the name given in the @xmlelement attribute instead. e.g.,
@xmlelement( name = "a" )
@XmlElementWrapper
public List< String > b;
Should result in:
"b": [ ]
but is instead:
"a": [ ]
I believe this is because JaxbAnnotationIntrospector.findWrapperName simply passes "" as the default name to _combineNames, which then fails the !wrapperName.hasSimpleName( ) test in POJOPropertiesCollector._renameWithWrappers( ).
Metadata
Metadata
Assignees
Labels
No labels