brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [2/2] incubator-brooklyn git commit: strings.join does not throw NPE
Date Tue, 14 Apr 2015 00:05:51 GMT
strings.join does not throw NPE

useful when using the joiner enricher if the inputted list is null


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

Branch: refs/heads/master
Commit: c7e20ceb56c570f810b53e57241e5035b53b3fe1
Parents: 3dde5f4
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Mon Apr 13 17:19:37 2015 -0500
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Mon Apr 13 17:19:57 2015 -0500

----------------------------------------------------------------------
 utils/common/src/main/java/brooklyn/util/text/Strings.java | 1 +
 1 file changed, 1 insertion(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/c7e20ceb/utils/common/src/main/java/brooklyn/util/text/Strings.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/brooklyn/util/text/Strings.java b/utils/common/src/main/java/brooklyn/util/text/Strings.java
index d874783..c619565 100644
--- a/utils/common/src/main/java/brooklyn/util/text/Strings.java
+++ b/utils/common/src/main/java/brooklyn/util/text/Strings.java
@@ -181,6 +181,7 @@ public class Strings {
 
     /** convenience for {@link com.google.common.base.Joiner} */
     public static String join(Iterable<? extends Object> list, String seperator) {
+        if (list==null) return null;
         boolean app = false;
         StringBuilder out = new StringBuilder();
         for (Object s: list) {


Mime
View raw message