Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 336093 - Class with an abstract superclass is marshalled with superfluous attributes from xsi namespace
Summary: Class with an abstract superclass is marshalled with superfluous attributes f...
Status: RESOLVED FIXED
Alias: None
Product: z_Archived
Classification: Eclipse Foundation
Component: Eclipselink (show other bugs)
Version: unspecified   Edit
Hardware: PC Windows 7
: P4 normal (vote)
Target Milestone: ---   Edit
Assignee: Nobody - feel free to take it CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-02 11:26 EST by Zdenek Farana CLA
Modified: 2022-06-09 10:33 EDT (History)
3 users (show)

See Also:


Attachments
Test Cases (2.10 KB, application/octet-stream)
2011-02-02 11:34 EST, Zdenek Farana CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Zdenek Farana CLA 2011-02-02 11:26:35 EST
Build Identifier: 2.3.0-SNAPSHOT (20110202.060516-27)

If the class Foo with an abstract superclass is marshalled, the output looks like:

<Foo xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="foo"></Foo>

instead of

<Foo></Foo>

It causes another problems when you try to unmarshal such string. If there is any such class in JAXBContext, every other class marshalled with the marshaller (created from such context) has similar redundant attributes. Reinitializating JAXBContext doesn't help.

Reproducible: Always

Steps to Reproduce:
See the attached test cases.
Comment 1 Zdenek Farana CLA 2011-02-02 11:34:09 EST
Created attachment 188162 [details]
Test Cases

FooTest - how it should work
FooWithAncestor - how it doesn't work
Comment 2 Denise Smith CLA 2011-05-16 16:03:01 EDT
 Fixed related bug 340671 which covered this use case as well.
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:15:29 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink
Comment 4 Eclipse Webmaster CLA 2022-06-09 10:33:20 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink