activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jstrac...@apache.org
Subject svn commit: r550793 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Date Tue, 26 Jun 2007 12:56:09 GMT
Author: jstrachan
Date: Tue Jun 26 05:56:08 2007
New Revision: 550793

URL: http://svn.apache.org/viewvc?view=rev&rev=550793
Log:
added NPE check

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java?view=diff&rev=550793&r1=550792&r2=550793
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/transport/fanout/FanoutTransport.java
Tue Jun 26 05:56:08 2007
@@ -115,13 +115,13 @@
                 if( rc != null ) {
                     if( rc.ackCount.decrementAndGet() <= 0 ) {
                         requestMap.remove(id);
-                        transportListener.onCommand(command);
+                        transportListenerOnCommand(command);
                     }
                 } else {
-                    transportListener.onCommand(command);
+                    transportListenerOnCommand(command);
                 }
             } else {
-                transportListener.onCommand(command);
+                transportListenerOnCommand(command);
             }
         }
 
@@ -144,7 +144,9 @@
             }
             catch (InterruptedException e) {
                 Thread.currentThread().interrupt();
-                transportListener.onException(new InterruptedIOException());
+                if (transportListener != null) {
+                    transportListener.onException(new InterruptedIOException());
+                }
             }
         }        
     }
@@ -532,4 +534,9 @@
 		return null;
 	}
 
+    protected void transportListenerOnCommand(Command command) {
+        if (transportListener != null) {
+            transportListener.onCommand(command);
+        }
+    }
 }



Mime
View raw message