Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 338722 - JAXB Schemagen: A Derived Type Is Generated Differently From JAXB-RI
Summary: JAXB Schemagen: A Derived Type Is Generated Differently From JAXB-RI
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: 2011-03-02 14:44 EST by Rick Barkhouse CLA
Modified: 2022-06-09 10:28 EDT (History)
0 users

See Also:


Attachments
Patch. (15.38 KB, patch)
2011-03-02 14:55 EST, Rick Barkhouse CLA
no flags Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Rick Barkhouse CLA 2011-03-02 14:44:36 EST
Given the following two classes:

public abstract class Car implements Vehicle{
    private String model;
    private String year;
    private String make;
    // + getters and setters ...

public class Toyota extends Car {
    private String color;
    private final String make="Toyota";
    // + getters and setters ... 

The generated schema will contain "make" properties on both Car and Toyota.  However, the "getMake" method on Toyota is overriding the getter on Car, so a new Property should not be created.
Comment 1 Rick Barkhouse CLA 2011-03-02 14:55:41 EST
Created attachment 190197 [details]
Patch.
Comment 2 Rick Barkhouse CLA 2011-03-02 14:57:01 EST
Fixed, reviewed by mmacivor.

New test cases: SchemaGenInheritanceTestCases
Comment 3 Eclipse Webmaster CLA 2022-06-09 10:28:34 EDT
The Eclipselink project has moved to Github: https://github.com/eclipse-ee4j/eclipselink