brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From tbou...@apache.org
Subject [1/2] brooklyn-library git commit: Fix NPE in CouchbaseCluster enricher
Date Thu, 21 Dec 2017 09:14:00 GMT
Repository: brooklyn-library
Updated Branches:
  refs/heads/master d3562cd7c -> 99695bc21


Fix NPE in CouchbaseCluster enricher


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

Branch: refs/heads/master
Commit: 4a5208e582ae94e552cc9cb4135487696c61dac3
Parents: d3562cd
Author: Aled Sage <aled.sage@gmail.com>
Authored: Wed Dec 20 23:57:41 2017 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Wed Dec 20 23:57:41 2017 +0000

----------------------------------------------------------------------
 .../brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java       | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-library/blob/4a5208e5/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
----------------------------------------------------------------------
diff --git a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
index 1c9a37c..ed8b7ee 100644
--- a/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
+++ b/software/nosql/src/main/java/org/apache/brooklyn/entity/nosql/couchbase/CouchbaseClusterImpl.java
@@ -290,6 +290,7 @@ public class CouchbaseClusterImpl extends DynamicClusterImpl implements
Couchbas
     private final static class ListOfHostAndPort implements Function<Set<Entity>,
List<String>> {
         @Override public List<String> apply(Set<Entity> input) {
             List<String> addresses = Lists.newArrayList();
+            if (input == null) return addresses;
             for (Entity entity : input) {
                 addresses.add(String.format("%s",
                         BrooklynAccessUtils.getBrooklynAccessibleAddress(entity, entity.getAttribute(CouchbaseNode.COUCHBASE_WEB_ADMIN_PORT))));


Mime
View raw message