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 <[email protected]> Authored: Wed Oct 22 14:39:21 2014 +0530 Committer: reka <[email protected]> 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
