Skip to content
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
@Vulcannis

Description

@Vulcannis

@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

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions