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 2018/05/09 02:11:00 UTC
[2/3] activemq-artemis git commit: NO-JIRA avoiding possible NPE on
SharedNothingBackupActivation
NO-JIRA avoiding possible NPE on SharedNothingBackupActivation
Project: http://git-wip-us.apache.org/repos/asf/activemq-artemis/repo
Commit: http://git-wip-us.apache.org/repos/asf/activemq-artemis/commit/eaf935ec
Tree: http://git-wip-us.apache.org/repos/asf/activemq-artemis/tree/eaf935ec
Diff: http://git-wip-us.apache.org/repos/asf/activemq-artemis/diff/eaf935ec
Branch: refs/heads/master
Commit: eaf935ecec96e821f2e6f24a1329d933a21665d8
Parents: 845f03d
Author: Clebert Suconic <cl...@apache.org>
Authored: Tue May 8 18:40:49 2018 -0400
Committer: Clebert Suconic <cl...@apache.org>
Committed: Tue May 8 18:55:59 2018 -0400
----------------------------------------------------------------------
.../artemis/core/server/impl/SharedNothingBackupActivation.java | 4 +++-
1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/activemq-artemis/blob/eaf935ec/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
----------------------------------------------------------------------
diff --git a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
index 58742de..5ca6fda 100644
--- a/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
+++ b/artemis-server/src/main/java/org/apache/activemq/artemis/core/server/impl/SharedNothingBackupActivation.java
@@ -220,12 +220,14 @@ public final class SharedNothingBackupActivation extends Activation {
clusterControl = clusterController.connectToNodeInReplicatedCluster(possibleLive.getA());
} catch (Exception e) {
logger.debug(e.getMessage(), e);
- if (possibleLive.getB() != null) {
+ if (possibleLive != null && possibleLive.getB() != null) {
try {
clusterControl = clusterController.connectToNodeInReplicatedCluster(possibleLive.getB());
} catch (Exception e1) {
clusterControl = null;
}
+ } else {
+ clusterControl = null;
}
}
if (clusterControl == null) {