[QFJ-425] Performance and type safety improvment in MessageCracker.crack Created: 27/Mar/09 Updated: 10/Oct/12 Resolved: 10/Oct/12 |
|
| Status: | Closed |
| Project: | QuickFIX/J |
| Component/s: | Message Generation |
| Affects Version/s: | 1.4.0 |
| Fix Version/s: | None |
| Type: | Improvement | Priority: | Minor |
| Reporter: | Bill Nokes | Assignee: | Unassigned |
| Resolution: | Won't Fix | Votes: | 0 |
| Labels: | None | ||
| Environment: |
All |
||
| Description |
|
Hi, Low priority, but using instanceof instead of msgType.equals(XXX) pattern in MesageCracker.crack Instead of: if (msgTypeValue.equals(Heartbeat.MSGTYPE)) { onMessage((Heartbeat) message, sessionID); } else if (msgTypeValue.equals(Logon.MSGTYPE)) {Use: if (message instanceof Heartbeat) { onMessage((Heartbeat) message, sessionID); } else if (message instanceof Logon) { Also drops requirement to dig into header to get message type. Hope this helps, |
| Comments |
| Comment by Christoph John [ 10/Oct/12 ] |
|
The MessageCracker implementation has been completely changed with QF/J 1.5.1 so this ticket has become obsolete. |