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

Bug 361578

Summary: JAXBException logged when @XmlAnyAttribute is on property of sub-type of Map
Product: z_Archived Reporter: Paul Fullbright <paul.fullbright>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: martin.grebac, rick.barkhouse, vikram.jeet.bhatia
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows 7   
Whiteboard:
Attachments:
Description Flags
Proposed patch none

Description Paul Fullbright CLA 2011-10-20 14:08:57 EDT
ex:

public class SuperFoo {
	
	@XmlAnyAttribute
	public HashMap others;
}

When creating JAXB context for this root class, the following exception is logged.


javax.xml.bind.JAXBException: 
Exception Description: XmlAnyAttribute is invalid on property others. Must be used with a property of type Map.


I tried also with SortedMap and TreeMap.

The RI allows this.
Comment 1 Rick Barkhouse CLA 2012-01-04 11:18:57 EST
Created attachment 209023 [details]
Proposed patch
Comment 2 Rick Barkhouse CLA 2012-01-04 16:25:38 EST
Reviewed by rbarkhouse - patch is good, JUnit and JAXB TCK all pass.
Comment 3 Vikram Bhatia CLA 2012-01-05 01:28:06 EST
Fixed in main trunk with r10649.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:35:25 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink