Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 348098

Summary: [Validation] @XmlElement validation enhancements
Product: [WebTools] Dali JPA Tools Reporter: Paul Fullbright <paul.fullbright>
Component: JAXBAssignee: Paul Fullbright <paul.fullbright>
Status: RESOLVED FIXED QA Contact:
Severity: enhancement    
Priority: P3 CC: neil.hauge
Version: 3.0   
Target Milestone: 3.1 M2   
Hardware: PC   
OS: Windows Vista   
Whiteboard:

Description Paul Fullbright CLA 2011-06-02 12:15:03 EDT
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).
Comment 1 Paul Fullbright CLA 2011-08-16 16:56:04 EDT
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.