cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Jan Arend Jansen (JIRA)" <>
Subject [jira] Created: (CXF-2707) CXF-XJC-DV doesn not respect Abstract schema types
Date Thu, 11 Mar 2010 16:55:29 GMT
CXF-XJC-DV doesn not respect Abstract schema types

                 Key: CXF-2707
             Project: CXF
          Issue Type: Bug
    Affects Versions: 2.2.1
            Reporter: Jan Arend Jansen
            Priority: Minor

The cxf-xjc-dv plugin creates default values for complex types that have default simpl typed
elements as fixed in CXF-1206.
<xs:complexType name="pageColor">
     <xs:element name="background" type="xs:string" default="red"/>
     <xs:element name="foreground" type="xs:string" default="blue"/>

<xs:element name="pageColor" type="tns:pageColor" minOccurs="0"></xs:element>

results in 

protected PageColor pageColor = new PageColor();

This fails if PageColor is defined as abstract="true" in the schema (used as polymorphic type
in element pageColor). In that case the line above will create a compilation error. 

It can be fixed by simply skipping the generation of the default 'new PageColor();' in those
Line 81 in would become
            if (classOutline.implClass == field.getRawType() && !classOutline.implClass.isAbstract())

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message