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

Bug 368863

Summary: Collections/Arrays should default to null not empty
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Nobody - feel free to take it <nobody>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: eclipselink.oxm-inbox, rick.barkhouse
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Attachments:
Description Flags
MOXy - Test Cases
none
Core - Fix
none
MOXy - Fix
none
MOXy - Test Cases
none
Core - Fix
none
Core - Fix
none
MOXy - Fix
none
Core - Fix
none
MOXy - Test Cases
none
Core - Fix
none
MOXy - Test Cases
none
MOXy - Fix
none
Core - Fix none

Description Blaise Doughan CLA 2012-01-17 13:43:32 EST
When the elements of a collection/array are not present in the XML document, then the corresponding field/property should be set to null not an empty collection/array.
Comment 1 Blaise Doughan CLA 2012-01-17 13:44:23 EST
Created attachment 209637 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2012-01-17 13:44:58 EST
Created attachment 209638 [details]
Core - Fix
Comment 3 Blaise Doughan CLA 2012-01-17 13:45:17 EST
Created attachment 209639 [details]
MOXy - Fix
Comment 4 Blaise Doughan CLA 2012-01-17 16:05:40 EST
Created attachment 209644 [details]
MOXy - Test Cases
Comment 5 Blaise Doughan CLA 2012-01-18 16:07:15 EST
Created attachment 209702 [details]
Core - Fix
Comment 6 Blaise Doughan CLA 2012-01-18 16:26:16 EST
Created attachment 209705 [details]
Core - Fix
Comment 7 Blaise Doughan CLA 2012-01-18 16:28:10 EST
Created attachment 209707 [details]
MOXy - Fix
Comment 8 Blaise Doughan CLA 2012-01-18 16:51:36 EST
Created attachment 209708 [details]
Core - Fix
Comment 9 Blaise Doughan CLA 2012-01-18 16:54:52 EST
Created attachment 209709 [details]
MOXy - Test Cases
Comment 10 Blaise Doughan CLA 2012-01-18 20:23:02 EST
Created attachment 209712 [details]
Core - Fix
Comment 11 Blaise Doughan CLA 2012-01-19 09:28:32 EST
Created attachment 209746 [details]
MOXy - Test Cases
Comment 12 Blaise Doughan CLA 2012-01-19 09:28:57 EST
Created attachment 209747 [details]
MOXy - Fix
Comment 13 Blaise Doughan CLA 2012-01-19 09:29:17 EST
Created attachment 209748 [details]
Core - Fix
Comment 14 Blaise Doughan CLA 2012-01-19 10:39:52 EST
Fix checked into trunk at rev:  10712

Code reviewed by:
- Denise Smith, Matt MacIvor, and Rick Barkhouse

Fix Details:
- Added a new property to the container mappings called "defaultEmptyContainer".  If true (default for OXM & SDO), then the field/property will be initialized with an empty container, if false (default for JAXB) then it will not.
Comment 15 Rick Barkhouse CLA 2012-02-02 15:23:22 EST
Checked into 2.3.3 as well.
Comment 16 Eclipse Webmaster CLA 2022-06-09 10:15:37 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 17 Eclipse Webmaster CLA 2022-06-09 10:30:52 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink