activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r377724 - /incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/CommandParser.java
Date Tue, 14 Feb 2006 13:38:11 GMT
Author: jstrachan
Date: Tue Feb 14 05:38:09 2006
New Revision: 377724

URL: http://svn.apache.org/viewcvs?rev=377724&view=rev
Log:
avoid unnecessary comparisons

Modified:
    incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/CommandParser.java

Modified: incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/CommandParser.java
URL: http://svn.apache.org/viewcvs/incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/CommandParser.java?rev=377724&r1=377723&r2=377724&view=diff
==============================================================================
--- incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/CommandParser.java
(original)
+++ incubator/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/stomp/CommandParser.java
Tue Feb 14 05:38:09 2006
@@ -49,21 +49,21 @@
         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) {



Mime
View raw message