activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From kea...@apache.org
Subject git commit: Fixe for AMQ-4977, removed dead code
Date Wed, 19 Mar 2014 17:59:00 GMT
Repository: activemq
Updated Branches:
  refs/heads/trunk e06e23b9f -> a3701fcb9


Fixe for AMQ-4977, removed dead code


Project: http://git-wip-us.apache.org/repos/asf/activemq/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq/commit/a3701fcb
Tree: http://git-wip-us.apache.org/repos/asf/activemq/tree/a3701fcb
Diff: http://git-wip-us.apache.org/repos/asf/activemq/diff/a3701fcb

Branch: refs/heads/trunk
Commit: a3701fcb924594e5888d9ef266f10500e6953be2
Parents: e06e23b
Author: Kevin Earls <kevin@kevinearls.com>
Authored: Wed Mar 19 18:57:57 2014 +0100
Committer: Kevin Earls <kevin@kevinearls.com>
Committed: Wed Mar 19 18:57:57 2014 +0100

----------------------------------------------------------------------
 .../apache/activemq/transport/vm/VMTransport.java | 18 ++++++------------
 1 file changed, 6 insertions(+), 12 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq/blob/a3701fcb/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
----------------------------------------------------------------------
diff --git a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
index ca2bd90..e73af12 100755
--- a/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
+++ b/activemq-broker/src/main/java/org/apache/activemq/transport/vm/VMTransport.java
@@ -34,13 +34,15 @@ import org.apache.activemq.transport.ResponseCallback;
 import org.apache.activemq.transport.Transport;
 import org.apache.activemq.transport.TransportDisposedIOException;
 import org.apache.activemq.transport.TransportListener;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
 
 /**
  * A Transport implementation that uses direct method invocations.
  */
 public class VMTransport implements Transport, Task {
+    protected static final Logger LOG = LoggerFactory.getLogger(VMTransport.class);
 
-    private static final Object DISCONNECT = new Object();
     private static final AtomicLong NEXT_ID = new AtomicLong(0);
 
     // Transport Configuration
@@ -131,12 +133,8 @@ public class VMTransport implements Transport, Task {
     }
 
     public void doDispatch(VMTransport transport, TransportListener transportListener, Object
command) {
-        if (command == DISCONNECT) {
-            transportListener.onException(new TransportDisposedIOException("Peer (" + peer.toString()
+ ") disposed."));
-        } else {
-            transport.receiveCounter++;
-            transportListener.onCommand(command);
-        }
+        transport.receiveCounter++;
+        transportListener.onCommand(command);
     }
 
     public void start() throws Exception {
@@ -241,11 +239,7 @@ public class VMTransport implements Transport, Task {
 
         Object command = mq.poll();
         if (command != null && !disposed.get()) {
-            if( command == DISCONNECT ) {
-                tl.onException(new TransportDisposedIOException("Peer (" + peer.toString()
+ ") disposed."));
-            } else {
-                tl.onCommand(command);
-            }
+            tl.onCommand(command);
             return !mq.isEmpty() && !disposed.get();
         } else {
             if(disposed.get()) {


Mime
View raw message