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

NPE during message parsing if repeating group's first tag is undefined

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.6.4, 2.1.1
    • Fix Version/s: 2.2.0
    • Component/s: Engine
    • Labels:
      None

      Description

      If a message contains a repeating group in which the first tag is not defined in the dictionary, a NullPointerException is thrown while parsing the message/group.

      To reproduce, you can use this FIX string with the standard 4.2 dictionary.
      It contains an undefined tag (9876) as the first tag of the NoAllocs (78) repeating group.

      8=FIX.4.2|9=130|35=D|34=2|49=SND1|52=20190719-04:56:39.042|56=TGT1|11=1|78=1|9876=npe|79=a|80=1|21=1|55=x|54=1|60=20190719-04:56:53.826|38=1|40=1|10=169|

      Here is the stack trace for 1.6.4:

      Exception in thread "main" java.lang.NullPointerException
      	at quickfix.Message.checkFieldValidation(Message.java:662)
      	at quickfix.Message.parseGroup(Message.java:633)
      	at quickfix.Message.parseBody(Message.java:559)
      	at quickfix.Message.parse(Message.java:470)
      	at quickfix.Message.fromString(Message.java:453)
      	[...]
      

      and for 2.1.1:

      Exception in thread "main" java.lang.NullPointerException
      	at quickfix.Message.checkFieldValidation(Message.java:748)
      	at quickfix.Message.parseGroup(Message.java:711)
      	at quickfix.Message.parseBody(Message.java:637)
      	at quickfix.Message.parse(Message.java:548)
      	at quickfix.Message.fromString(Message.java:531)
      	[...]
      

        Attachments

          Activity

            People

            • Assignee:
              chrjohn Christoph John
              Reporter:
              emil.rakadjiev Emil Rakadjiev
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: