Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Major
-
Resolution: Fixed
-
Affects Version/s: 0.9.7
-
Fix Version/s: 1.0.4
-
Component/s: XML code generator
-
Labels:None
-
Environment:Most
-
Number of attachments :
Description
Incorrect java code generated, well maybe should issue an error, with this fragment
<xs:element name="UniqueID">
<xs:complexType>
<xs:choice>
<xs:element name="OID" type="xs:long"/>
<xs:element name="Name">
<xs:annotation>
<xs:documentation>Only currently supported for locating to topics</xs:documentation>
</xs:annotation>
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:maxLength value="255"/>
</xs:restriction>
</xs:simpleType>
</xs:element>
</xs:choice>
</xs:complexType>
generates ...
/**
- Sets the value of field 'name'. The field 'name' has the
- following description: Only currently supported for locating
- to topics
- @param name the value of field 'name'.
*/
public void setName(java.lang.String name)
{ this._name = name; this._choiceValue = name; }//-- void setName(java.lang.String)
/**
- Sets the value of field 'OID'.
- @param OID the value of field 'OID'.
*/
public void setOID(long OID)
{ this._OID = OID; this._choiceValue = OID; this._has_OID = true; }//-- void setOID(long)
which fails trying to set choiceValue (Object) to a long ...
C:\svn-migrate\workspace\XPL_ALL\XPL_EJB\target\castor\src\com\syntegra\sbs\bg\x
pl\persistence\auto\UniqueID.java:196: incompatible types
found : long
required: java.lang.Object
this._choiceValue = OID;
^
This works on 0.9.5.2
Issue Links
- is depended upon by
-
CASTOR-1568
When I try to generate the classes, the source generator simply hangs.
-
- is related to
-
CASTOR-1602
Add new test case type to read schema only
-
1. |
Provide a test case for CASTOR-1335 | |
|
Werner Guttmann |
|
What does the source code generated with 0.9.5.2 actually look like for setOID() method ?