You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by re...@apache.org on 2014/10/22 11:09:35 UTC

git commit: fixig an NPE while adding cluster monitor

Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping 4b0ef9864 -> 473f25b2c


fixig an NPE while adding cluster monitor


Project: http://git-wip-us.apache.org/repos/asf/stratos/repo
Commit: http://git-wip-us.apache.org/repos/asf/stratos/commit/473f25b2
Tree: http://git-wip-us.apache.org/repos/asf/stratos/tree/473f25b2
Diff: http://git-wip-us.apache.org/repos/asf/stratos/diff/473f25b2

Branch: refs/heads/4.0.0-grouping
Commit: 473f25b2c3e8c4c9a621db69e96b987dddd3aabb
Parents: 4b0ef98
Author: reka <rt...@gmail.com>
Authored: Wed Oct 22 14:39:21 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Wed Oct 22 14:39:21 2014 +0530

----------------------------------------------------------------------
 .../stratos/autoscaler/status/checker/StatusChecker.java       | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/473f25b2/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/checker/StatusChecker.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/checker/StatusChecker.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/checker/StatusChecker.java
index 9b39c5a..1366bf8 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/checker/StatusChecker.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/status/checker/StatusChecker.java
@@ -56,7 +56,11 @@ public class StatusChecker {
      */
     public void onMemberStatusChange(String clusterId) {
         ClusterMonitor monitor = (ClusterMonitor) AutoscalerContext.getInstance().getMonitor(clusterId);
-        boolean clusterActive = clusterActive(monitor);
+        boolean clusterActive = false;
+        if(monitor != null) {
+            clusterActive = clusterActive(monitor);
+
+        }
         log.info("Status checker running for [cluster] " + clusterId +
                 " the status [clusterActive] " + clusterActive);
         // if active then notify upper layer