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

Bug 366450

Summary: Handling of List/Map that return null when iterators or Sets are expected
Product: z_Archived Reporter: Blaise Doughan <blaise.doughan>
Component: EclipselinkAssignee: Blaise Doughan <blaise.doughan>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3    
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 (Part 2)
none
Core - Fix (Part 2)
none
MOXy - Test Cases (Part 2)
none
Core - Fix (Part 2) none

Description Blaise Doughan CLA 2011-12-12 14:23:01 EST
There appear to be some implementations of List & Map out there that can return null iterators or entry/key sets.  This bug is to add tolerance into MOXy for these types of containers.
Comment 1 Blaise Doughan CLA 2011-12-12 14:24:13 EST
Created attachment 208280 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2011-12-12 14:24:52 EST
Created attachment 208281 [details]
Core - Fix
Comment 3 Blaise Doughan CLA 2011-12-12 14:25:50 EST
Created attachment 208282 [details]
MOXy - Fix
Comment 4 Blaise Doughan CLA 2011-12-12 15:38:09 EST
Fix checked into trunk at revision:  10546

Code reviewed by:  Denise Smith

Fix Details:
Check to see if the iterator returned from a List, or the entrySet/keySet returned from a Map is not null before processing it.
Comment 5 Blaise Doughan CLA 2011-12-12 17:00:41 EST
This issue is also occuring for Lists mapped with @XmlAnyElement, @XmlElements, and @XmlList.
Comment 6 Blaise Doughan CLA 2011-12-12 17:06:06 EST
Created attachment 208293 [details]
MOXy - Test Cases (Part 2)
Comment 7 Blaise Doughan CLA 2011-12-12 17:06:26 EST
Created attachment 208294 [details]
Core - Fix (Part 2)
Comment 8 Blaise Doughan CLA 2011-12-12 17:30:27 EST
Created attachment 208297 [details]
MOXy - Test Cases (Part 2)
Comment 9 Blaise Doughan CLA 2011-12-12 17:31:10 EST
Created attachment 208298 [details]
Core - Fix (Part 2)
Comment 10 Blaise Doughan CLA 2011-12-12 17:48:22 EST
Fix checked into trunk at rev:  10549

Code reviewed by:  Rick Barkhouse

Fix Details:
Extended original fix to cover @XmlElements, @XmlAnyElement, and @XmlList for both Marshaller and Binder
Comment 11 Eclipse Webmaster CLA 2022-06-09 10:09:14 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 12 Eclipse Webmaster CLA 2022-06-09 10:15:59 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink