[QFJ-279] Fields in groups will not be checked. Created: 24/Dec/07  Updated: 07/Aug/08  Resolved: 03/Feb/08

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: 1.2.1
Fix Version/s: 1.3.2

Type: Bug Priority: Default
Reporter: CaiQi Assignee: Unassigned
Resolution: Cannot Reproduce Votes: 0
Labels: None

Issue Links:
Duplicate
duplicates QFJ-168 Add repeating group validation in mes... Closed

 Description   

If there are repeating groups or fields in a group, they will not be verified when received.

1. When verify the field in a fieldMap, fields in groups must be vevified.
DataDictionary.iterate(FieldMap map, String msgType) is the method to verify fields. It could be invoked in recursion.

Add this into DataDictionary:
// Check the fields and groups in groups.
if (isGroup(msgType, field.getField())) {
checkGroupCount(field, map, msgType);
List groupMembers = map.getGroups(field.getField());
Group originalGroup = (Group) groupMembers.get(0);

for (int i = 0; i < groupMembers.size(); i++)

{ originalGroup = (Group) groupMembers.get(i); GroupInfo rg = getGroup(msgType, field.getField()); DataDictionary group_dataDictionary = rg.getDataDictionary(); group_dataDictionary.hasVersion = this.hasVersion; group_dataDictionary.beginString = this.beginString; group_dataDictionary.fieldValues = this.fieldValues; group_dataDictionary.fieldTypes = this.fieldTypes; group_dataDictionary.iterate(originalGroup, msgType); }

}

2. Groups must be added into memory from *.xml.
Add this into DataDictionary.addXMLGroup():
groupDD.addMsgField(msgtype, field);



 Comments   
Comment by CaiQi [ 24/Dec/07 ]

Initiator:send a message which the NoGroup is wrong.
Acceptor:different problems occur.

For example, such are parts of some messages. 802:Number of group.
802=156 523=777 803=1. The acceptor cannot find the CheckSum. The message will be dropped on the bottom when decoded.
802=1 523=777 803=1. This will be well received.
802=20 523=777 803=1. The acceptor will consider the CheckSum is wrong and reject it.
802=156 . No 523 or 803. This will be received.

This is because fields in groups and groups in groups are not verified when received. We must verify them (In QFJ-279).

Comment by Steve Bate [ 03/Feb/08 ]

I'm not sure if this was fixed as a side-effect of other changes, but I can't reproduce these errors with the code in the SVN trunk. I've added a test in RepeatingGroupTest to specifically test for high and incorrect group counts in the message.

Generated at Sat Nov 23 07:27:04 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.