You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by ha...@apache.org on 2015/10/21 23:14:36 UTC

[1/2] incubator-brooklyn git commit: Fix NPE if loginUser is not present and useJcloudsSshInit is false

Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master e3553a1df -> 24b0f3e8a


Fix NPE if loginUser is not present and useJcloudsSshInit is false


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

Branch: refs/heads/master
Commit: e07411973fc284c0f4c3d4cdee1fc00f4d8780c3
Parents: e3553a1
Author: Yavor Yanchev <ya...@yanchev.com>
Authored: Wed Oct 21 21:02:00 2015 +0300
Committer: Yavor Yanchev <ya...@yanchev.com>
Committed: Wed Oct 21 21:02:00 2015 +0300

----------------------------------------------------------------------
 .../brooklyn/location/jclouds/JcloudsLocation.java      | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/e0741197/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
----------------------------------------------------------------------
diff --git a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
index 0705d26..4c3297d 100644
--- a/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
+++ b/locations/jclouds/src/main/java/org/apache/brooklyn/location/jclouds/JcloudsLocation.java
@@ -2515,8 +2515,16 @@ public class JcloudsLocation extends AbstractCloudMachineProvisioningLocation im
         LoginCredentials nodeCreds = node.getCredentials();
         String nodeUser = nodeCreds.getUser();
         String loginUserOverride = setup.get(LOGIN_USER);
-        Set<String> users = MutableSet.<String>builder().add(nodeUser).add(loginUserOverride).build();
-        
+        Set<String> users = MutableSet.of();
+
+        if (Strings.isNonBlank(nodeUser)) {
+            users.add(nodeUser);
+        }
+
+        if (Strings.isNonBlank(loginUserOverride)) {
+            users.add(loginUserOverride);
+        }
+
         // See https://issues.apache.org/jira/browse/BROOKLYN-186
         // Handle where jclouds gives us the wrong login user (!) and both a password + ssh key.
         // Try all the permutations to find the one that works.


[2/2] incubator-brooklyn git commit: This closes #982

Posted by ha...@apache.org.
This closes #982


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

Branch: refs/heads/master
Commit: 24b0f3e8a3159e12f1a1262f97ebdbcd97cecd76
Parents: e3553a1 e074119
Author: Hadrian Zbarcea <ha...@apache.org>
Authored: Wed Oct 21 16:24:07 2015 -0400
Committer: Hadrian Zbarcea <ha...@apache.org>
Committed: Wed Oct 21 16:24:07 2015 -0400

----------------------------------------------------------------------
 .../brooklyn/location/jclouds/JcloudsLocation.java      | 12 ++++++++++--
 1 file changed, 10 insertions(+), 2 deletions(-)
----------------------------------------------------------------------