Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 348098 - [Validation] @XmlElement validation enhancements
Summary: [Validation] @XmlElement validation enhancements
Status: RESOLVED FIXED
Alias: None
Product: Dali JPA Tools
Classification: WebTools
Component: JAXB (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows Vista
: P3 enhancement (vote)
Target Milestone: 3.1 M2   Edit
Assignee: Paul Fullbright CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-06-02 12:15 EDT by Paul Fullbright CLA
Modified: 2011-10-25 18:08 EDT (History)
1 user (show)

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.