| Summary: | Empty @XmlAttribute List should be marshalled to XML | ||||||||
|---|---|---|---|---|---|---|---|---|---|
| Product: | z_Archived | Reporter: | Rick Barkhouse <rick.barkhouse> | ||||||
| Component: | Eclipselink | Assignee: | Nobody - feel free to take it <nobody> | ||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||
| Severity: | normal | ||||||||
| Priority: | P3 | CC: | blaise.doughan | ||||||
| Version: | unspecified | ||||||||
| Target Milestone: | --- | ||||||||
| Hardware: | PC | ||||||||
| OS: | Windows XP | ||||||||
| Whiteboard: | |||||||||
| Attachments: |
|
||||||||
Created attachment 212490 [details]
Patch - 2.3
Created attachment 212491 [details]
Patch - trunk
Fixed in 2.3 and trunk, reviewed by bdoughan The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink |
The way in which MOXy marshalls empty collections annotated with @XmlAttribute differs from the way the Sun implementation works: @XmlRootElement public class TestClass { @XmlAttribute(name="attribute-referenced-id") public List<String> collection8; } class org.eclipse.persistence.jaxb.JAXBContext Null Collection: <?xml version="1.0" encoding="UTF-8"?> <testClass/> Empty Collection: <?xml version="1.0" encoding="UTF-8"?> <testClass/> class com.sun.xml.bind.v2.runtime.JAXBContextImpl Null Collection: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <testClass/> Empty Collection: <?xml version="1.0" encoding="UTF-8" standalone="yes"?> <testClass attribute-referenced-id=""/>