From 229c634a83a3f298e560f761e12c342af9794499 Mon Sep 17 00:00:00 2001 From: Claus Ibsen Date: Sun, 7 Oct 2012 10:51:52 +0000 Subject: [PATCH] AMQ-1719: Avoid potential NPE in connection state tracker. git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1395272 13f79535-47bb-0310-9956-ffa450edef68 --- .../org/apache/activemq/state/ConnectionStateTracker.java | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java b/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java index c4ae81b349..6a1ca36323 100755 --- a/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java +++ b/activemq-core/src/main/java/org/apache/activemq/state/ConnectionStateTracker.java @@ -98,7 +98,9 @@ public class ConnectionStateTracker extends CommandVisitorAdapter { 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()); + } } }