[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 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 |
| Comment by Laurent Danesi [ 08/Jul/10 ] |
|
Duplicate |