Community
Participate
Working Groups
from JAXB 2.2 spec (8.9.1.2): If the property or field type is a parametric collection type, then @XmlElement.type() must be DEFAULT.class or the collection item type (since the type of the collection is already known).
This is not actually correct. The @XmlElement.type() must actually *agree* with (be a subtype of) the attribute base type. This may actually be trying to say that if @XmlElement.type() is not specified, then it is assumed to be the attribute's base type, which is already taken into consideration in our defaults calculation. The above validation test (agreement) has now been committed to head.