activemq-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r1395272 - /activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
Date Sun, 07 Oct 2012 10:51:53 GMT
Author: davsclaus
Date: Sun Oct  7 10:51:52 2012
New Revision: 1395272

URL: http://svn.apache.org/viewvc?rev=1395272&view=rev
Log:
AMQ-1719: Avoid potential NPE in connection state tracker.

Modified:
    activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java

Modified: activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
URL: http://svn.apache.org/viewvc/activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java?rev=1395272&r1=1395271&r2=1395272&view=diff
==============================================================================
--- activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
(original)
+++ activemq/trunk/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java
Sun Oct  7 10:51:52 2012
@@ -98,7 +98,9 @@ public class ConnectionStateTracker exte
         public void onResponse(Command response) {
             ConnectionId connectionId = info.getConnectionId();
             ConnectionState cs = connectionStates.get(connectionId);
-            cs.removeTransactionState(info.getTransactionId());
+            if (cs != null) {
+                cs.removeTransactionState(info.getTransactionId());
+            }
         }
     }
     



Mime
View raw message