[QFJ-760] NullPointerException in Message.parseGroup Created: 22/Nov/13  Updated: 02/Apr/15  Resolved: 29/Nov/13

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.5.3
Fix Version/s: 1.6.0

Type: Bug Priority: Default
Reporter: Christoph John Assignee: Christoph John
Resolution: Fixed Votes: 0
Labels: None


 Description   

problem

java.lang.NullPointerException
at quickfix.Message.parseGroup(Message.java:600)
at quickfix.Message.parseBody(Message.java:569)
at quickfix.Message.parse(Message.java:480)
at quickfix.MessageUtils.parse(MessageUtils.java:148)

At that position in the code the result of extractField is NULL. This happens on parsing the message because the position counter is greater than the length of the message. Line 758 in Message.java:

if (position >= messageData.length())

{ return null; }

This is expected in some cases when parsing groups.
However in this current problem it happened because there were problems with the message length and checksum which went undetected by the FixMessageDecoder.
The FixMessageDecoder checks if the message ends with a checksum, i.e. tag 10=xxx. The message in question ended with that information but the SOH delimiter before tag 10 was missing.



 Comments   
Comment by Christoph John [ 29/Nov/13 ]

Committed as rev 1120 http://sourceforge.net/p/quickfixj/code/1120/

Generated at Mon Apr 29 12:07:58 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.