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/30 12:18:50 UTC

git commit: fixing to read empty list

Repository: stratos
Updated Branches:
  refs/heads/4.0.0-grouping 255087dda -> dcf4e24f2


fixing to read empty list


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

Branch: refs/heads/4.0.0-grouping
Commit: dcf4e24f24093947bab4e4aae672f3f3fb5c0244
Parents: 255087d
Author: reka <rt...@gmail.com>
Authored: Thu Oct 30 16:48:30 2014 +0530
Committer: reka <rt...@gmail.com>
Committed: Thu Oct 30 16:48:30 2014 +0530

----------------------------------------------------------------------
 .../stratos/autoscaler/monitor/ParentComponentMonitor.java     | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/stratos/blob/dcf4e24f/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ParentComponentMonitor.java
----------------------------------------------------------------------
diff --git a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ParentComponentMonitor.java b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ParentComponentMonitor.java
index 58cdb1a..ced698c 100644
--- a/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ParentComponentMonitor.java
+++ b/components/org.apache.stratos.autoscaler/src/main/java/org/apache/stratos/autoscaler/monitor/ParentComponentMonitor.java
@@ -179,7 +179,7 @@ public abstract class ParentComponentMonitor extends Monitor {
 
     protected void onChildTerminatedEvent(String idOfEvent) {
         List<ApplicationContext> terminationList;
-        boolean allDependentTerminated = true;
+        boolean allDependentTerminated = false;
 
         ApplicationContext context = this.dependencyTree.findApplicationContextWithId(idOfEvent);
         context.setTerminated(true);
@@ -200,8 +200,8 @@ public abstract class ParentComponentMonitor extends Monitor {
             parentsTerminated = allParentTerminated(parentContexts);
         }
 
-        if ((terminationList != null && allDependentTerminated || terminationList == null) &&
-                (parentContexts != null && parentsTerminated || parentContexts == null)) {
+        if ((terminationList != null && allDependentTerminated || terminationList.isEmpty()) &&
+                (parentContexts != null && parentsTerminated || parentContexts.isEmpty())) {
             //Find the non existent monitor by traversing dependency tree
             try {
                 this.startDependencyOnTermination();