You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@activemq.apache.org by cl...@apache.org on 2015/03/12 15:57:07 UTC
[2/3] activemq-6 git commit: ACTIVEMQ6-55: prevent NPE when closing a
link that didnt get as far as having a context added
ACTIVEMQ6-55: prevent NPE when closing a link that didnt get as far as having a context added
Project: http://git-wip-us.apache.org/repos/asf/activemq-6/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-6/commit/983effca
Tree: http://git-wip-us.apache.org/repos/asf/activemq-6/tree/983effca
Diff: http://git-wip-us.apache.org/repos/asf/activemq-6/diff/983effca
Branch: refs/heads/master
Commit: 983effca9d9ab95f9babe488847cd75b68cc24a8
Parents: d47fba4
Author: Robert Gemmell <ro...@apache.org>
Authored: Thu Mar 12 11:42:29 2015 +0000
Committer: Clebert Suconic <cl...@apache.org>
Committed: Thu Mar 12 10:54:17 2015 -0400
----------------------------------------------------------------------
.../org/proton/plug/context/AbstractConnectionContext.java | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-6/blob/983effca/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java
----------------------------------------------------------------------
diff --git a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java
index 35d52bf..20b2d8b 100644
--- a/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java
+++ b/activemq-protocols/activemq-proton-plug/src/main/java/org/proton/plug/context/AbstractConnectionContext.java
@@ -255,7 +255,11 @@ public abstract class AbstractConnectionContext extends ProtonInitializable impl
public void onRemoteClose(Link link) throws Exception
{
link.close();
- ((ProtonDeliveryHandler) link.getContext()).close();
+ ProtonDeliveryHandler linkContext = (ProtonDeliveryHandler) link.getContext();
+ if (linkContext != null)
+ {
+ linkContext.close();
+ }
}