Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331033 - JAXB: Issues with array types and reference properties
Summary: JAXB: Issues with array types and reference properties
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows XP
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-11-24 10:38 EST by David McCann CLA
Modified: 2022-06-09 10:35 EDT (History)
0 users

See Also:


Attachments
Proposed fix (3.65 KB, patch)
2010-11-24 12:53 EST, David McCann CLA
no flags Details | Diff
Supporting tests (17.54 KB, patch)
2010-11-24 12:53 EST, David McCann CLA
no flags Details | Diff

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