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

Bug 317334

Summary: Dynamic JAXB - Problem with List Properties
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Blaise Doughan <blaise.doughan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.oxm-inbox
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
MOXy - Test Cases
none
MOXy - Fix
none
Dynamic MOXy - Fix
none
Dynamic MOXy - Fix none

Description Blaise Doughan CLA 2010-06-18 15:56:04 EDT
There are currently 2 issues with List properties:

1.  If a type is only referenced as the target of a many property then a NPE is thrown during JAXBContext initialization when bootstrapping from an XML schema.
2.  If a type has multiple list properties then the reference descriptor for all mappings is set to the reference descriptor for the first many property.
Comment 1 Blaise Doughan CLA 2010-06-18 16:00:14 EDT
Created attachment 172251 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2010-06-18 16:01:01 EDT
Created attachment 172252 [details]
MOXy - Fix
Comment 3 Blaise Doughan CLA 2010-06-18 16:02:34 EDT
Created attachment 172253 [details]
Dynamic MOXy - Fix
Comment 4 Blaise Doughan CLA 2010-06-23 14:20:10 EDT
Created attachment 172537 [details]
Dynamic MOXy - Fix
Comment 5 Blaise Doughan CLA 2010-06-23 16:12:46 EDT
Fix checked into trunk at rev:  7675
Fix checked into 2.1.1 at rev:  7674

1.  In AnnotationsProcessor account for the fact that a classes super class may be null.  This offered better performance than setting the super class to a wrapped version of Object which would then be ignored anyways.

2.  When a class has multiple List properties List<Address>, List<Phone>, List<Address> and you ask XJC for the generic parameter for the first property you will get {Address}, for the second parameter you will get {Address, Phone}, and for the third property you will get {Address, Phone, Address}.  Now the last parameter is assumed to be the type of the list instead of the first.

Code reviewed by:  Matt MacIvor
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:06:32 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink