brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [16/27] incubator-brooklyn git commit: Fixes broken cluster location logic
Date Fri, 29 May 2015 17:22:09 GMT
Fixes broken cluster location logic


Project: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/commit/96f2f1c2
Tree: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/tree/96f2f1c2
Diff: http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/diff/96f2f1c2

Branch: refs/heads/master
Commit: 96f2f1c2ef5c6ece333ece8879ca6e992da5024c
Parents: d205bb5
Author: Martin Harris <github@nakomis.com>
Authored: Wed May 6 14:18:13 2015 +0100
Committer: Richard Downer <richard@apache.org>
Committed: Thu May 28 17:27:35 2015 +0100

----------------------------------------------------------------------
 core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/96f2f1c2/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
index 7d82e2e..5c168aa 100644
--- a/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
+++ b/core/src/main/java/brooklyn/entity/group/DynamicClusterImpl.java
@@ -588,8 +588,8 @@ public class DynamicClusterImpl extends AbstractGroupImpl implements DynamicClus
 
         // choose locations to be deployed to
         List<Location> chosenLocations;
-        chosenLocations = getMemberSpec().getLocations();
-        if (chosenLocations == null) {
+        chosenLocations = getMemberSpec() == null ? null : getMemberSpec().getLocations();
+        if (chosenLocations == null || chosenLocations.size() == 0) {
             if (isAvailabilityZoneEnabled()) {
                 List<Location> subLocations = getNonFailedSubLocations();
                 Multimap<Location, Entity> membersByLocation = getMembersByLocation();


Mime
View raw message