JiBX
  1. JiBX
  2. JIBX-148

non ordered structure in non ordered structure

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Critical Critical
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: JiBX 1.1.3
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      The following mapping works fine for me:

      <mapping name="..." class="de....">
      <structure set-method="set..." get-method="get..." usage="optional" ordered="false">
      <value name="..." field="..." usage="optional"/>
      <structure name="..." usage="optional">
      <value name="..." field="..." usage="optional" type="java.util.Date"/>
      <value name="..." field="..." usage="optional" type="java.util.Date"/>
      </structure>
      </structure>
      </mapping>

      When i change the second structure to ordered="false" (and that is what i need) i get this stacktrace:

      Error running binding compiler

          • Error during code generation - please enter a bug report for this error in Jira if the problem is not listed as fixed on the online status page ***

      java.lang.ArrayIndexOutOfBoundsException: -1
      at java.util.ArrayList.get(ArrayList.java(Compiled Code))
      at org.jibx.binding.classes.MethodBuilder.appendLoadLocal(MethodBuilder.java:1094)
      at org.jibx.binding.def.NestedStructure.genFlagTest(NestedStructure.java:327)
      at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:244)
      at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:795)
      at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:940)
      at org.jibx.binding.def.ComponentProperty.genContentUnmarshal(ComponentProperty.java:256)
      at org.jibx.binding.def.NestedStructure.genContentUnmarshal(NestedStructure.java:193)
      at org.jibx.binding.def.ObjectBinding.genUnmarshalContentCall(ObjectBinding.java:795)
      at org.jibx.binding.def.ObjectBinding.genContentUnmarshal(ObjectBinding.java:940)
      at org.jibx.binding.def.ElementWrapper.genContentUnmarshal(ElementWrapper.java:315)
      at org.jibx.binding.def.MappingDefinition.generateCode(MappingDefinition.java:582)
      at org.jibx.binding.def.DefinitionContext.generateCode(DefinitionContext.java:603)
      at org.jibx.binding.def.BindingDefinition.generateCode(BindingDefinition.java:661)
      at org.jibx.binding.Compile.compile(Compile.java:305)
      at org.jibx.binding.Compile.main(Compile.java:385)
      at de.fraunhofer.iao.arpos.utils.JiBX.compileKostenvoranschlag(JiBX.java:44)
      at de.fraunhofer.iao.arpos.utils.JiBX.main(JiBX.java:29)

        Activity

        Hide
        Dennis Sosnoski added a comment -

        Can you try this with the current cvs code (or even the 1.1.2 jars from http://www.jibx.org/maven/jibx/jars)? I believe this has been corrected, but if it breaks please supply a zip with sample project demonstrating the problem.

        Show
        Dennis Sosnoski added a comment - Can you try this with the current cvs code (or even the 1.1.2 jars from http://www.jibx.org/maven/jibx/jars)? I believe this has been corrected, but if it breaks please supply a zip with sample project demonstrating the problem.
        Hide
        Dennis Sosnoski added a comment -

        No further reports of problems, so assumed fixed in 1.1.3.

        Show
        Dennis Sosnoski added a comment - No further reports of problems, so assumed fixed in 1.1.3.

          People

          • Assignee:
            Dennis Sosnoski
            Reporter:
            Tobias Anstett
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: