Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 361578 - JAXBException logged when @XmlAnyAttribute is on property of sub-type of Map
Summary: JAXBException logged when @XmlAnyAttribute is on property of sub-type of Map
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-10-20 14:08 EDT by Paul Fullbright CLA
Modified: 2022-06-09 10:35 EDT (History)
3 users (show)

See Also:


Attachments
Proposed patch (3.15 KB, patch)
2012-01-04 11:18 EST, Rick Barkhouse CLA
no flags Details | Diff

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