[QFJ-445] Problem with Acceptance Test Suite Created: 21/Jun/09  Updated: 20/May/11  Resolved: 20/May/11

Status: Closed
Project: QuickFIX/J
Component/s: Engine
Affects Version/s: None
Fix Version/s: 1.5.1

Type: Bug Priority: Default
Reporter: Bill Harts Assignee: Unassigned
Resolution: Fixed Votes: 0
Labels: None


 Description   

When writing a custom acceptance test script there is a bug if you include a tag with '10' as the last two digits. This is because module InitiateMessageStep.java:line 47 contains a regex pattern that scans for a Checksum tag in the message.

// Matches FIX.X.X or FIXT.X.X style begin string
private static final Pattern MESSAGE_PATTERN = Pattern.compile("I(\\d,)(8=FIXT?\\.\\d\\.\\d
001)(.
?)(10=.*|)$");

The problem is that the regex expression doesn't look to see if the '10=' falls at the beginning of a tag, thus it will erroneously match against any tag with '10=' in it such as '110=' (MinQty), '210=' (MaxShow), etc.

The fix for this is quite simple. Merely add the field separator before the '10=' which will allow a match only if '10=' falls at the beginning of a field.

// Matches FIX.X.X or FIXT.X.X style begin string
private static final Pattern MESSAGE_PATTERN = Pattern.compile("I(\\d,)(8=FIXT?\\.\\d\\.\\d\\001)(.?)(
00110=.*|)$");



 Comments   
Comment by Eric Deshayes [ 26/Apr/11 ]

Committed on integration branch rev 1021

Generated at Sun May 19 23:34:39 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.