Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 368863 - Collections/Arrays should default to null not empty
Summary: Collections/Arrays should default to null not empty
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: 2012-01-17 13:43 EST by Blaise Doughan CLA
Modified: 2022-06-09 10:30 EDT (History)
2 users (show)

See Also:


Attachments
MOXy - Test Cases (2.45 KB, patch)
2012-01-17 13:44 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (9.43 KB, patch)
2012-01-17 13:44 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (1.95 KB, patch)
2012-01-17 13:45 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (34.12 KB, patch)
2012-01-17 16:05 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (35.94 KB, patch)
2012-01-18 16:07 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (24.50 KB, patch)
2012-01-18 16:26 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (9.02 KB, patch)
2012-01-18 16:28 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (25.97 KB, patch)
2012-01-18 16:51 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (56.19 KB, patch)
2012-01-18 16:54 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (27.10 KB, patch)
2012-01-18 20:23 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Test Cases (57.30 KB, patch)
2012-01-19 09:28 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (8.58 KB, patch)
2012-01-19 09:28 EST, Blaise Doughan CLA
no flags Details | Diff
Core - Fix (32.75 KB, patch)
2012-01-19 09:29 EST, 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 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