brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From aleds...@apache.org
Subject [1/5] incubator-brooklyn git commit: Fix Entities.waitForServiceUp to avoid NPE
Date Mon, 17 Nov 2014 15:47:06 GMT
Repository: incubator-brooklyn
Updated Branches:
  refs/heads/master cb043e22a -> 5d2faf64c


Fix Entities.waitForServiceUp to avoid NPE

- Never return null for repeater’s `until`; always return TRUE or FALSE.
  Otherwise it will NPE.

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

Branch: refs/heads/master
Commit: 79b2cac02edf21e3ada14f62c122dd091d797f1f
Parents: de1d8bc
Author: Aled Sage <aled.sage@gmail.com>
Authored: Sat Nov 15 23:39:02 2014 +0000
Committer: Aled Sage <aled.sage@gmail.com>
Committed: Sat Nov 15 23:39:02 2014 +0000

----------------------------------------------------------------------
 core/src/main/java/brooklyn/entity/basic/Entities.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/79b2cac0/core/src/main/java/brooklyn/entity/basic/Entities.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/brooklyn/entity/basic/Entities.java b/core/src/main/java/brooklyn/entity/basic/Entities.java
index d073372..51f86f6 100644
--- a/core/src/main/java/brooklyn/entity/basic/Entities.java
+++ b/core/src/main/java/brooklyn/entity/basic/Entities.java
@@ -1022,7 +1022,7 @@ public class Entities {
                     .rethrowException().backoffTo(Duration.ONE_SECOND)
                     .until(new Callable<Boolean>() {
                         public Boolean call() {
-                            return entity.getAttribute(Startable.SERVICE_UP);
+                            return Boolean.TRUE.equals(entity.getAttribute(Startable.SERVICE_UP));
                         }})
                     .run()) {
                 throw new IllegalStateException("Timeout waiting for SERVICE_UP from "+entity);


Mime
View raw message