Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 317334 - Dynamic JAXB - Problem with List Properties
Summary: Dynamic JAXB - Problem with List 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: Blaise Doughan CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2010-06-18 15:56 EDT by Blaise Doughan CLA
Modified: 2022-06-09 10:06 EDT (History)
1 user (show)

See Also:


Attachments
MOXy - Test Cases (11.54 KB, patch)
2010-06-18 16:00 EDT, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (1.45 KB, patch)
2010-06-18 16:01 EDT, Blaise Doughan CLA
no flags Details | Diff
Dynamic MOXy - Fix (1.19 KB, patch)
2010-06-18 16:02 EDT, Blaise Doughan CLA
no flags Details | Diff
Dynamic MOXy - Fix (2.34 KB, patch)
2010-06-23 14:20 EDT, Blaise Doughan CLA
no flags Details | Diff

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