You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@brooklyn.apache.org by he...@apache.org on 2017/03/20 15:57:35 UTC

[10/11] brooklyn-server git commit: address PR review -- just with comments here

address PR review -- just with comments here


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

Branch: refs/heads/master
Commit: f4dc19d9631801c4472e46367e2c94e12e6446f4
Parents: d4e4107
Author: Alex Heneveld <al...@cloudsoftcorp.com>
Authored: Mon Mar 20 15:54:34 2017 +0000
Committer: Alex Heneveld <al...@cloudsoftcorp.com>
Committed: Mon Mar 20 15:54:41 2017 +0000

----------------------------------------------------------------------
 .../core/objs/AbstractConfigurationSupportInternal.java       | 3 +++
 .../org/apache/brooklyn/util/core/task/ValueResolver.java     | 7 +++++++
 2 files changed, 10 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/f4dc19d9/core/src/main/java/org/apache/brooklyn/core/objs/AbstractConfigurationSupportInternal.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/objs/AbstractConfigurationSupportInternal.java b/core/src/main/java/org/apache/brooklyn/core/objs/AbstractConfigurationSupportInternal.java
index 95b6312..4b3876b 100644
--- a/core/src/main/java/org/apache/brooklyn/core/objs/AbstractConfigurationSupportInternal.java
+++ b/core/src/main/java/org/apache/brooklyn/core/objs/AbstractConfigurationSupportInternal.java
@@ -138,6 +138,9 @@ public abstract class AbstractConfigurationSupportInternal implements BrooklynOb
                 .context(getContext())
                 .getMaybe();
         if (resolved.isAbsent()) return Maybe.Absent.<T>castAbsent(resolved);
+        
+        // likely we don't need this coercion if we set  as(key.getType())  above, 
+        // but that needs confirmation and quite a lot of testing 
         return TypeCoercions.tryCoerce(resolved.get(), key.getTypeToken());
     }
 

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/f4dc19d9/core/src/main/java/org/apache/brooklyn/util/core/task/ValueResolver.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/util/core/task/ValueResolver.java b/core/src/main/java/org/apache/brooklyn/util/core/task/ValueResolver.java
index e98bb92..ffaa817 100644
--- a/core/src/main/java/org/apache/brooklyn/util/core/task/ValueResolver.java
+++ b/core/src/main/java/org/apache/brooklyn/util/core/task/ValueResolver.java
@@ -392,6 +392,13 @@ public class ValueResolver<T> implements DeferredSupplier<T>, Iterable<Maybe<Obj
                 // (the latter could be tried here, with bailOut false, but in most cases it will just throw so we still need to
                 // have the timings as in SHORT_WAIT etc as a fallack)
                 
+                // TODO svet suggested at https://github.com/apache/brooklyn-server/pull/565#pullrequestreview-27124074
+                // that we might flip the immediately bit if interrupted -- or maybe instead (alex's idea)
+                // enter this block
+                // if (allowImmediateExecution && (isEvaluatingImmediately() || Thread.isInterrupted())
+                // -- feels right, and would help with some recursive immediate values but no compelling 
+                // use case yet and needs some deep thought which we're deferring for now
+                
                 Maybe<T> result = null;
                 try {
                     result = exec.getImmediately(v);