Uploaded image for project: 'JaxMe'
  1. JaxMe
  2. JAXME-47

When using default values initialization of vars doesn't work for all types

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • None
    • current (nightly)
    • JaxMe Core
    • None

    Description

      Consider the definition of the following element:

      <element name="elt">
      <complexType>
      <attribute name="a" default="1" type="decimal" />
      <attribute name="b" default="0" type="hexBinary" />
      <attribute name="c" default="none">
      <simpleType>
      <union>
      <simpleType>
      <restriction base="NMTOKEN"/>
      </simpleType>
      <simpleType>
      <restriction base="anyURI" />
      </simpleType>
      </union>
      </simpleType>
      </attribute>
      <attribute name="d" default="1" type="integer" />
      <attribute name="e" default="-1" type="nonPositiveInteger" />
      <attribute name="f" default="1" type="positiveInteger" />
      <attribute name="g" default="1" type="unsignedLong" />
      </complexType>
      </element>

      When compiling the schema we get the following result:

      private java.math.BigDecimal A = 1;
      private byte[] B = 01;
      private java.lang.Object C = none;
      private java.math.BigInteger D = 1;
      private java.math.BigInteger E = -1;
      private java.math.BigInteger F = 1;
      private java.math.BigInteger G = 1;

      having multiple compile errors.

      Further investigation is required to determine exactly all cases.

      Attachments

        1. defaultValues.patch
          25 kB
          Nacho G. Mac Dowell

        Activity

          People

            Unassigned Unassigned
            ignaciogmd Nacho G. Mac Dowell
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: