Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 334527 - Simple Lists should use xsi:represents null when @XmlElement(nillable = true)
Summary: Simple Lists should use xsi:represents null when @XmlElement(nillable = true)
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: 334432
Blocks: 332770
  Show dependency tree
 
Reported: 2011-01-17 10:55 EST by Blaise Doughan CLA
Modified: 2022-06-09 10:22 EDT (History)
1 user (show)

See Also:


Attachments
MOXy - Test Cases (1.46 KB, patch)
2011-01-20 14:07 EST, Blaise Doughan CLA
no flags Details | Diff
MOXy - Fix (1.22 KB, patch)
2011-01-20 15:15 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 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