You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@stratos.apache.org by ud...@apache.org on 2013/12/18 12:59:01 UTC

git commit: fixing npe in autoscaler in member fault handler

Updated Branches:
  refs/heads/master 70c184f87 -> 08b6427d7


 fixing npe in autoscaler in member fault handler


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

Branch: refs/heads/master
Commit: 08b6427d7de9e05614429dcd3eca9610e010d23a
Parents: 70c184f
Author: Udara Liyanage <ud...@wso2.com>
Authored: Wed Dec 18 17:28:13 2013 -0500
Committer: Udara Liyanage <ud...@wso2.com>
Committed: Wed Dec 18 17:28:13 2013 -0500

----------------------------------------------------------------------
 .../org/apache/stratos/autoscaler/monitor/LbClusterMonitor.java  | 4 ++--
 .../stratos/autoscaler/topology/AutoscalerTopologyReceiver.java  | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/08b6427d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/LbClusterMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/LbClusterMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/LbClusterMonitor.java
index 72a7ddc..f180999 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/LbClusterMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/LbClusterMonitor.java
@@ -220,7 +220,7 @@ public class LbClusterMonitor extends AbstractMonitor{
         for(Service service: TopologyManager.getTopology().getServices()){
             for(Cluster cluster: service.getClusters()){
                 if(cluster.memberExists(memberId)){
-                    cluster.getMember(memberId).getPartitionId();
+                    return cluster.getMember(memberId).getPartitionId();
                 }
             }
         }
@@ -251,7 +251,7 @@ public class LbClusterMonitor extends AbstractMonitor{
 
                        String networkPartitionId = cluster.getMember(memberId).getNetworkPartitionId();
    	                if(networkPartitionCtxts.containsKey(networkPartitionId)) {
-                           networkPartitionCtxts.get(networkPartitionId);
+                           return networkPartitionCtxts.get(networkPartitionId);
                        }
    	            }
    	      }

http://git-wip-us.apache.org/repos/asf/incubator-stratos/blob/08b6427d/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/topology/AutoscalerTopologyReceiver.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/topology/AutoscalerTopologyReceiver.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/topology/AutoscalerTopologyReceiver.java
index 61ea11c..cdf6dd5 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/topology/AutoscalerTopologyReceiver.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/topology/AutoscalerTopologyReceiver.java
@@ -92,7 +92,7 @@ public class AutoscalerTopologyReceiver implements Runnable {
                         for(Cluster cluster : service.getClusters()) {
                         	    Thread th; 
                         		if(cluster.isLbCluster()){
-                        			th= new Thread(new LBClusterMonitorAdder(cluster));
+                        			th = new Thread(new LBClusterMonitorAdder(cluster));
                         		}else{
                         			th = new Thread(new ClusterMonitorAdder(cluster));
                         		}