Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 331572 - MOXy: Attributes not handled correctly for choice mappings containing object references during unmarshal
Summary: MOXy: Attributes not handled correctly for choice mappings containing object ...
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: 2010-12-01 12:25 EST by David McCann CLA
Modified: 2022-06-09 10:33 EDT (History)
0 users

See Also:


Attachments
Proposed fix (3.46 KB, patch)
2010-12-02 12:06 EST, David McCann CLA
no flags Details | Diff
Supporting tests + updated build.xml (34.74 KB, patch)
2010-12-02 12:06 EST, David McCann CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description David McCann CLA 2010-12-01 12:25:50 EST
For unmarshal in the single case, where an attribute is used to set up an underlying reference mapping, we should be calling attribute() on the XMLChoiceObjectMappingNodeValue - which will simply call attribute() on the underlying choice element node value.  For example:


/**
 * The underlying choice element node value will handle attributes.
 * 
 */
public void attribute(UnmarshalRecord unmarshalRecord, String URI, 
    String localName, String value) {

  this.choiceElementNodeValue.attribute(unmarshalRecord, URI, 
      localName, value);
}
Comment 1 David McCann CLA 2010-12-01 13:02:54 EST
We will most-likely require this  fix in the collection case as well.
Comment 2 David McCann CLA 2010-12-02 12:06:18 EST
Created attachment 184371 [details]
Proposed fix
Comment 3 David McCann CLA 2010-12-02 12:06:55 EST
Created attachment 184372 [details]
Supporting tests + updated build.xml

build.xml was updated to exclude the choice tests for deployment xml.
Comment 4 David McCann CLA 2010-12-02 13:05:03 EST
Reviewed by:  matt.macivor@oracle.com
Tests: all SDO/MOXy unit tests pass as expected; oxm/mappings/choice/ref/XMLChoiceWithReferenceTestCases

Revision: 8601
Comment 5 David McCann CLA 2010-12-02 13:05:33 EST
Fixed.
Comment 6 Eclipse Webmaster CLA 2022-06-09 10:33:08 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink