diff -ruN quickfixj.orig/src/quickfix/Message.java quickfixj/src/quickfix/Message.java --- quickfixj.orig/src/quickfix/Message.java 2006-08-14 21:40:56.000000000 -0400 +++ quickfixj/src/quickfix/Message.java 2006-08-16 12:07:29.668313500 -0400 @@ -503,24 +503,27 @@ group = new Group(groupCountTag, firstField, rg.getDataDictionary().getOrderedFields()); group.setField(field); firstFieldFound = true; - } else { - if (rg.getDataDictionary().isGroup(getMsgType(), field.getField())) { - if (firstFieldFound) { - parseGroup(field, rg.getDataDictionary(), group); - } else { - throw new InvalidMessage("The group " + groupCountTag + " must set the delimiter field " + firstField); - } + } + else if (rg.getDataDictionary().isGroup(getMsgType(), field.getField())) { + if (firstFieldFound) { + parseGroup(field, rg.getDataDictionary(), group); + } else { + throw new InvalidMessage("The group " + groupCountTag + " must set the delimiter field " + firstField); + } + } + else if (rg.getDataDictionary().isField(field.getTag())) { + if (firstFieldFound) { + group.setField(field); } else { - if (rg.getDataDictionary().isField(field.getTag())) { - group.setField(field); - } else { - if (group != null) { - parent.addGroup(group); - } - pushBack(field); - inGroupParse = false; - } + throw new InvalidMessage("The group " + groupCountTag + " must set the delimiter field " + firstField); + } + } + else { + if (group != null) { + parent.addGroup(group); } + pushBack(field); + inGroupParse = false; } } } @@ -666,4 +669,4 @@ public int getInvalidStructureTag() { return isValidStructureTag; } -} \ No newline at end of file +}