[QFJ-524] Session responder lock fix for QFJ-421 got reverted in SVN Created: 14/May/10  Updated: 15/Nov/12  Resolved: 08/Jul/10

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

Type: Bug Priority: Default
Reporter: Scott Harrington Assignee: Unassigned
Resolution: Duplicate Votes: 0
Labels: None


 Description   

The one-line fix for QFJ-421 in Mar 2009 (r921) seems to have been accidentally reverted in Jan 2010 by r928.

Why not use an idiom such as:

private final Object responderSync = new byte[0];

Others may prefer simply a new Object() for a lock like this. I think the debate[1] over bytecode size or whatever is moot, but clearly a String was a bad choice here for maintainability reasons, i.e. it just looks like a constant value suitable to be interned.

[1] http://java.itags.org/java-core-apis/32998/ "Java Core APIs: locks: Object versus empty byte array"



 Comments   
Comment by Scott Harrington [ 15/May/10 ]

Ooh even better, use a ReentrantLock as suggested in QFJ-484.

Comment by Laurent Danesi [ 08/Jul/10 ]

Duplicate QFJ-484

Generated at Sat Nov 23 14:42:26 UTC 2024 using JIRA 7.5.2#75007-sha1:9f5725bb824792b3230a5d8716f0c13e296a3cae.