Details
-
Bug
-
Status: Open
-
Critical
-
Resolution: Unresolved
-
Version 2.4
-
None
-
None
-
JDK 1.5.0
Description
When generating java code from an XSD, one of the generated classes ends up with this bit of magic in it:
static final null.Enum SMIME = null.SMIME;
static final null.Enum PGPMIME = null.PGPMIME;
static final int INT_SMIME = null.INT_SMIME;
static final int INT_PGPMIME = null.INT_PGPMIME;
Interestingly enough, these constants are used exactly nowhere else in the code, and deleting them fixes all of the compilation errors, but I can't help but think that something more subtle is going wrong.
Here's the bit of XSD (it's converted from RNG, so please ignore any weird formatting) that leads to this code:
<xs:element name="security_format">
<xs:complexType>
<xs:simpleContent>
<xs:restriction base="xs:anyType">
<xs:simpleType>
<xs:restriction base="xs:token">
<xs:enumeration value="smime"/>
<xs:enumeration value="pgpmime"/>
</xs:restriction>
</xs:simpleType>
<xs:attribute name="version">
<xs:simpleType>
<xs:restriction base="xs:string">
<xs:pattern value="[1-9](\.[0-9](\.[0-9])?)?"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
</xs:restriction>
</xs:simpleContent>
</xs:complexType>
</xs:element>