avoid unnecessary comparisons

git-svn-id: https://svn.apache.org/repos/asf/incubator/activemq/trunk@377724 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
James Strachan 2006-02-14 13:38:09 +00:00
parent a603c40b64
commit 06f44c7245
1 changed files with 8 additions and 8 deletions

View File

@ -49,21 +49,21 @@ class CommandParser {
StompCommand command = null;
if (line.startsWith(Stomp.Commands.CONNECT))
command = new Connect(format);
if (line.startsWith(Stomp.Commands.SUBSCRIBE))
else if (line.startsWith(Stomp.Commands.SUBSCRIBE))
command = new Subscribe(format);
if (line.startsWith(Stomp.Commands.SEND))
else if (line.startsWith(Stomp.Commands.SEND))
command = new Send(format);
if (line.startsWith(Stomp.Commands.DISCONNECT))
else if (line.startsWith(Stomp.Commands.DISCONNECT))
command = new Disconnect();
if (line.startsWith(Stomp.Commands.BEGIN))
else if (line.startsWith(Stomp.Commands.BEGIN))
command = new Begin(format);
if (line.startsWith(Stomp.Commands.COMMIT))
else if (line.startsWith(Stomp.Commands.COMMIT))
command = new Commit(format);
if (line.startsWith(Stomp.Commands.ABORT))
else if (line.startsWith(Stomp.Commands.ABORT))
command = new Abort(format);
if (line.startsWith(Stomp.Commands.UNSUBSCRIBE))
else if (line.startsWith(Stomp.Commands.UNSUBSCRIBE))
command = new Unsubscribe(format);
if (line.startsWith(Stomp.Commands.ACK))
else if (line.startsWith(Stomp.Commands.ACK))
command = new Ack(format);
if (command == null) {