Bug 419802 - Marshalling target object derived from Collection produces empty string
Summary: Marshalling target object derived from Collection produces empty string
Status: NEW
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Mac OS X
: P3 normal (vote)
Target Milestone: ---   Edit
Assignee: Project Inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2013-10-18 01:05 EDT by Wolfgang Fahl CLA
Modified: 2022-06-09 10:05 EDT (History)
0 users

See Also:


Attachments
JUnit Test case for MOXy marshalling bug when target object is derived from Collection (4.87 KB, text/plain)
2013-10-18 01:05 EDT, Wolfgang Fahl CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Wolfgang Fahl CLA 2013-10-18 01:05:27 EDT
Created attachment 236634 [details]
JUnit Test case for MOXy marshalling bug when target object is derived from  Collection

If the target object to be marshalled ultimately is derived from a collection
MOXy's behavior is different from the JAXB reference implementation.

The attached JUnit test has the following object hierachy:

    ItemManager -extends-> MyMoxyManager
    MyMoxyManager -extends-> MoxyManagerImpl
    MoxyManagerImpl -implements-> MoxyManager
    MoxyManager -extends-> MoxyList
    MoxyList -extends-> Collection


The expected resulting XML is:

<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<itemManager>
    <items>
        <value>2</value>
    </items>
</itemManager>

but MOXy JAXB marshalls to an empty string. This seems to be a bug.

see
http://stackoverflow.com/questions/19347743/why-does-moxy-jaxb-marshal-to-empty-string-while-jaxb-reference-implementation-d

and the attached JUnit test.
Comment 1 Eclipse Webmaster CLA 2022-06-09 10:05:17 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink