QuickFIX/J

The repeating group count check doesn't work if the count == 0

Details

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

Description

1) repro steps:
===========
send any message with valid repeating group fields except in the count, set the value to zero.

2) bad behavior:
============
No error is thrown. the repeating group is not ignored and is parsed anyway even though the group count is zero. Note: i don't think fix protocol states how to handle this case but i would assume this is an error.

3) expected behavior:
================
normally, if the count value doesn't match the actual number of "repeating group" you get this error: "Incorrect NumInGroup count for repeating group"

Activity

Hide
Francis Uy added a comment - 12/Mar/09 4:19 AM

forgot to put the code that ignores zero in FieldMap.java ...

protected void setGroupCount(int countTag, int groupSize) {
if (groupSize == 0) { return; }
...
...
}

Show
Francis Uy added a comment - 12/Mar/09 4:19 AM forgot to put the code that ignores zero in FieldMap.java ... protected void setGroupCount(int countTag, int groupSize) { if (groupSize == 0) { return; } ... ... }
Hide
Francis Uy added a comment - 12/Mar/09 4:20 AM

this is called in Message.java->parseGroup() ... at the bottom you have ...

// For later validation that the group size matches the parsed group count
parent.setGroupCount(groupCountTag, declaredGroupCount);

Show
Francis Uy added a comment - 12/Mar/09 4:20 AM this is called in Message.java->parseGroup() ... at the bottom you have ... // For later validation that the group size matches the parsed group count parent.setGroupCount(groupCountTag, declaredGroupCount);
Hide
Francis Uy added a comment - 27/Mar/09 8:15 PM

possible fix is to put this as a check above the previous comment.

if (declaredGroupCount == 0 && parent.getGroupCount(groupCountTag) != 0)

{ throw new FieldException( SessionRejectReason.VALUE_IS_INCORRECT, field.getTag()); }
Show
Francis Uy added a comment - 27/Mar/09 8:15 PM possible fix is to put this as a check above the previous comment. if (declaredGroupCount == 0 && parent.getGroupCount(groupCountTag) != 0) { throw new FieldException( SessionRejectReason.VALUE_IS_INCORRECT, field.getTag()); }
Hide
Steve Bate added a comment - 06/Apr/10 4:49 AM

Just to clarify... this is an issue if the group count is zero and yet the groups are actually there.

Show
Steve Bate added a comment - 06/Apr/10 4:49 AM Just to clarify... this is an issue if the group count is zero and yet the groups are actually there.
Hide
Steve Bate added a comment - 23/May/11 6:45 PM

SVN #1036.

Show
Steve Bate added a comment - 23/May/11 6:45 PM SVN #1036.

People

Vote (1)
Watch (0)

Dates

  • Created:
    12/Mar/09 4:06 AM
    Updated:
    23/May/11 6:45 PM
    Resolved:
    23/May/11 6:45 PM