xml-xmlbeans-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 24632] New: - xs:decimal size greater than 18 results in uncompilable java code
Date Wed, 12 Nov 2003 00:21:17 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG 
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24632>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND 
INSERTED IN THE BUG DATABASE.

http://nagoya.apache.org/bugzilla/show_bug.cgi?id=24632

xs:decimal size greater than 18 results in uncompilable java code

           Summary: xs:decimal size greater than 18 results in uncompilable
                    java code
           Product: XMLBeans
           Version: unspecified
          Platform: All
        OS/Version: All
            Status: NEW
          Severity: Minor
          Priority: Other
         Component: Compiler
        AssignedTo: xmlbeans-dev@xml.apache.org
        ReportedBy: aaron.dunlop@transcore.com


A schema including a type derived from xs:decimal and limited to a maximum
length greater than 18 digits will result in generation of incorrect java code.

e.g.
<xs:element name="sb2OfficeID" minOccurs="0">
  <xs:simpleType>
    <xs:restriction base="xs:decimal">
      <xs:totalDigits value="38"/>
      <xs:fractionDigits value="0"/>
    </xs:restriction>
  </xs:simpleType>
</xs:element>

results in:
...
        java.math.BigInteger getBigIntegerValue();
        setBigIntegerValue(java.math.BigInteger bi); // *** 'void' missing
        /** @deprecated */
        java.math.BigInteger bigIntegerValue();
...

When scomp attempts to compile this code, of course it barfs...

        [java] c:\temp\xmlschema_src\com\tcore\schema\Office.java:143:
<identifier> expected
        [java]         setBigIntegerValue(java.math.BigInteger bi);
        [java]                           ^
        [java] c:\temp\xmlschema_src\com\tcore\schema\Office.java:143: = expected
        [java]         setBigIntegerValue(java.math.BigInteger bi);
        [java]                                                    ^
        [java] c:\temp\xmlschema_src\com\tcore\schema\Office.java:143: cannot
resolve symbol
        [java] symbol  : class setBigIntegerValue 
        [java] location: interface com.tcore.schema.Office.Sb2OfficeID
        [java]         setBigIntegerValue(java.math.BigInteger bi);
        [java]         ^
        [java] Note: Some input files use or override a deprecated API.
        [java] Note: Recompile with -deprecation for details.
        [java] 3 errors

The fix is simple - patch to follow.

- ---------------------------------------------------------------------
To unsubscribe, e-mail:   xmlbeans-dev-unsubscribe@xml.apache.org
For additional commands, e-mail: xmlbeans-dev-help@xml.apache.org
Apache XMLBeans Project -- URL: http://xml.apache.org/xmlbeans/


Mime
View raw message