Community
Participate
Working Groups
Build Identifier: I20110428-0848 Given a class like the one below: @XmlAccessorType(XmlAccessType.PROPERTY) <-- @XmlType(name="test") public class Test { @XmlAttribute <-- private int id; public int getId() { return id; } public void setId(int id) { this.id = id; } } If annotating a field (id in this example) with @XmlAttribtue or @XmlElement, you would get two mappings for that field in the JAXB content if not specifying @XmlAccessorType annotation or specifying the access type as PROPERTY with @XmlAccessorType(XmlAccessType.PROPERTY). Reproducible: Always
OK. This is a valid case based on the spec. (8.12.5 Property / Field).