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

Problem with Acceptance Test Suite

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Default
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 1.5.1
    • Component/s: Engine
    • Labels:
      None

      Description

      When writing a custom acceptance test script there is a bug if you include a tag with '10' as the last two digits. This is because module InitiateMessageStep.java:line 47 contains a regex pattern that scans for a Checksum tag in the message.

      // Matches FIX.X.X or FIXT.X.X style begin string
      private static final Pattern MESSAGE_PATTERN = Pattern.compile("I(\\d,)(8=FIXT?\\.\\d\\.\\d
      001)(.
      ?)(10=.*|)$");

      The problem is that the regex expression doesn't look to see if the '10=' falls at the beginning of a tag, thus it will erroneously match against any tag with '10=' in it such as '110=' (MinQty), '210=' (MaxShow), etc.

      The fix for this is quite simple. Merely add the field separator before the '10=' which will allow a match only if '10=' falls at the beginning of a field.

      // Matches FIX.X.X or FIXT.X.X style begin string
      private static final Pattern MESSAGE_PATTERN = Pattern.compile("I(\\d,)(8=FIXT?\\.\\d\\.\\d\\001)(.?)(
      00110=.*|)$");

        Attachments

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              prgtrdr Bill Harts
            • Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: