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 2017/09/05 20:17:12 UTC

[1/2] activemq-artemis git commit: ARTEMIS-1389 Add non-null check to ServerSessionImpl.doClose()

Repository: activemq-artemis
Updated Branches:
  refs/heads/master 3497ae81f -> cc35b2361


ARTEMIS-1389 Add non-null check to ServerSessionImpl.doClose()

An Openwire connection creates an internal session used to track
transaction status, it doesn't have a session callback. When
the connection is closed, the core session should check if
callback is null to avoid NPE.


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

Branch: refs/heads/master
Commit: cd551bfba07ca8383bc4e738dee4dc2964a1bc6d
Parents: 3497ae8
Author: Howard Gao <ho...@gmail.com>
Authored: Mon Sep 4 18:56:57 2017 +0800
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Sep 5 16:16:33 2017 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/server/impl/ServerSessionImpl.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/cd551bfb/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
index 7f09887..4d28fc7 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/ServerSessionImpl.java
@@ -348,7 +348,9 @@ public class ServerSessionImpl implements ServerSession, FailureListener {
    }
 
    protected void doClose(final boolean failed) throws Exception {
-      callback.close(failed);
+      if (callback != null) {
+         callback.close(failed);
+      }
       synchronized (this) {
          if (!closed) {
             server.callBrokerPlugins(server.hasBrokerPlugins() ? plugin -> plugin.beforeCloseSession(this, failed) : null);


[2/2] activemq-artemis git commit: This closes #1507

Posted by cl...@apache.org.
This closes #1507


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

Branch: refs/heads/master
Commit: cc35b23613e5b1c5c531dcf3001d4a8f121ce46c
Parents: 3497ae8 cd551bf
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue Sep 5 16:17:05 2017 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue Sep 5 16:17:05 2017 -0400

----------------------------------------------------------------------
 .../activemq/artemis/core/server/impl/ServerSessionImpl.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------