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

Bug 334527

Summary: Simple Lists should use xsi:represents null when @XmlElement(nillable = true)
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
Version: unspecified   
Target Milestone: ---   
Hardware: PC   
OS: Windows XP   
Whiteboard:
Bug Depends on: 334432    
Bug Blocks: 332770    
Attachments:
Description Flags
MOXy - Test Cases
none
MOXy - Fix none

Description Blaise Doughan CLA 2011-01-17 10:55:50 EST
When @XmlElement(nillable=true) is used on a List of simple types.  The null policy should be set to xsi:nil represents null.

    @XmlElement(nillable=true)
    private List<String> strings;

When the list contains 1 null entry should marshal to:

   <strings xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:nil="true"/>
Comment 1 Blaise Doughan CLA 2011-01-20 14:07:36 EST
Created attachment 187225 [details]
MOXy - Test Cases
Comment 2 Blaise Doughan CLA 2011-01-20 15:15:14 EST
Created attachment 187235 [details]
MOXy - Fix
Comment 3 Blaise Doughan CLA 2011-01-21 14:36:21 EST
Fix checked into trunk at:  8865

Code reviewed by:  Matt MacIvor

Fix Description:
If the element is nillable set the null policy accordingly.
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:22:04 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink