brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From grk...@apache.org
Subject [3/5] incubator-brooklyn git commit: Refactor entity started check for readability
Date Tue, 13 Jan 2015 15:55:57 GMT
Refactor entity started check for readability


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

Branch: refs/heads/master
Commit: d02e107ffd7aabd88eef4334f9e868ab7a05f0bd
Parents: d5b34e1
Author: Andrew Kennedy <grkvlt@apache.org>
Authored: Wed Dec 17 13:55:18 2014 +0000
Committer: Andrew Kennedy <grkvlt@apache.org>
Committed: Mon Jan 12 21:45:01 2015 +0000

----------------------------------------------------------------------
 .../java/brooklyn/entity/basic/AbstractSoftwareProcessDriver.java | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/d02e107f/software/base/src/main/java/brooklyn/entity/basic/AbstractSoftwareProcessDriver.java
----------------------------------------------------------------------
diff --git a/software/base/src/main/java/brooklyn/entity/basic/AbstractSoftwareProcessDriver.java
b/software/base/src/main/java/brooklyn/entity/basic/AbstractSoftwareProcessDriver.java
index b9fcff0..817af29 100644
--- a/software/base/src/main/java/brooklyn/entity/basic/AbstractSoftwareProcessDriver.java
+++ b/software/base/src/main/java/brooklyn/entity/basic/AbstractSoftwareProcessDriver.java
@@ -90,10 +90,11 @@ public abstract class AbstractSoftwareProcessDriver implements SoftwareProcessDr
         boolean skipStart = false;
         Optional<Boolean> locationRunning = Optional.fromNullable(getLocation().getConfig(BrooklynConfigKeys.ENTITY_RUNNING));
         Optional<Boolean> entityRunning = Optional.fromNullable(entity.getConfig(BrooklynConfigKeys.ENTITY_RUNNING));
+        Optional<Boolean> entityStarted = Optional.fromNullable(entity.getConfig(BrooklynConfigKeys.ENTITY_STARTED));
         if (locationRunning.or(entityRunning).or(false)) {
             skipStart = isRunning();
         } else {
-            skipStart = Optional.fromNullable(entity.getConfig(BrooklynConfigKeys.ENTITY_STARTED)).or(false);
+            skipStart = entityStarted.or(false);
         }
         if (!skipStart) {
             DynamicTasks.queue("pre-install", new Runnable() { public void run() {


Mime
View raw message