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

Bug 331033

Summary: JAXB: Issues with array types and reference properties
Product: z_Archived Reporter: David McCann <david.mccann>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
Proposed fix
none
Supporting tests none

Description David McCann CLA 2010-11-24 10:38:31 EST
In mappings generator, we need to check for property.getType().isArray() and if so, set the container class to ArrayList.  If not an array the code should do what it does now.
Comment 1 David McCann CLA 2010-11-24 10:41:11 EST
The following TCK exception will be thrown in the JAXBElement array case for xml-element-refs:

Exception Description: The object [javax.xml.bind.JAXBElement[]], of class [class java.lang.String], could not be converted to [class java.lang.Class]. Ensure that the class [javax.xml.bind.JAXBElement[]] is on the CLASSPATH. You may need to use alternate API passing in the appropriate class loader as required, or setting it on the default ConversionManager Internal Exception: java.lang.ClassNotFoundException: javax/xml/bind/JAXBElement[]
Comment 2 David McCann CLA 2010-11-24 12:53:16 EST
Created attachment 183787 [details]
Proposed fix
Comment 3 David McCann CLA 2010-11-24 12:53:28 EST
Created attachment 183788 [details]
Supporting tests
Comment 4 David McCann CLA 2010-11-24 13:01:38 EST
Reviewed by:  matt.macivor@oracle.com
Tests:  all unit tests pass as expected; jaxb/externalizedmetadata/xmlelementrefs/XmlElementRefsTestCases
Revision: 8556
Comment 5 Eclipse Webmaster CLA 2022-06-09 10:35:02 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink