Uploaded image for project: 'QuickFIX/J'
  1. QuickFIX/J
  2. QFJ-876

Code Generator creates bad code for nested repeating groups

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.1
    • Fix Version/s: 1.6.3
    • Component/s: Build
    • Labels:
      None

      Description

      When a component is a repeating group and the its first element is also a repeating group, the generated code is invalid. This occurred when using a custom FIX50SP2 dictionary derived from FIX 5.0 SP Expansion Pack 196.

      An example is the following definition from the dictionary file:

      <component name="PhysicalSettlTermGrp">
      <group name="NoPhysicalSettlTerms" required="Y">
      <component name="PhysicalSettlDeliverableObligationGrp" required="N"/>
      <field name="PhysicalSettlCurrency" required="N"/>
      <field name="PhysicalSettlBusinessDays" required="N"/>
      <field name="PhysicalSettlMaximumBusinessDays" required="N"/>
      <field name="PhysicalSettlTermXID" required="N"/>
      </group>
      </component>

      Where the component PhysicalSettlDeliverableObligationGrp is defined as:

      <component name="PhysicalSettlDeliverableObligationGrp">
      <group name="NoPhysicalSettlDeliverableObligations" required="Y">
      <field name="PhysicalSettlDeliverableObligationType" required="N"/>
      <field name="PhysicalSettlDeliverableObligationValue" required="N"/>
      </group>
      </component>

      This generates the source file PhysicalSettlTermGrp.java with the following extract:

      public static class NoPhysicalSettlTerms extends Group {

      static final long serialVersionUID = 20050617;

      public NoPhysicalSettlTerms() {
      super(40204, ,
      new int[]

      {40209, 40205, 40206, 40207, 40208, 0 }

      );
      }

      Looking through the source code, it appears that there may be an issue in codegenerator/Message.xsl where the group-delimiter is generated.

      I can email (or upload if possible) the entire dictionary file I'm using. To recreate, replace FIX50SP2.modified.xml file and build.

        Attachments

          Activity

            People

            • Assignee:
              seh4nc Scott Harrington
              Reporter:
              jdremillard Jeff Remillard
            • Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: