brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From sjcorb...@apache.org
Subject [3/7] incubator-brooklyn git commit: Trivial tidies.
Date Mon, 19 Oct 2015 09:46:52 GMT
Trivial tidies.


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

Branch: refs/heads/master
Commit: 16f9a9a214c3bd19d03093592bf91ac1f5eb0bb3
Parents: 51750e2
Author: Alasdair Hodge <github@alasdairhodge.co.uk>
Authored: Fri Oct 9 13:36:21 2015 +0100
Committer: Alasdair Hodge <github@alasdairhodge.co.uk>
Committed: Mon Oct 19 08:51:15 2015 +0100

----------------------------------------------------------------------
 .../brooklyn/util/core/task/ValueResolver.java      | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-brooklyn/blob/16f9a9a2/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 4a1d030..2809482 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
@@ -309,7 +309,7 @@ public class ValueResolver<T> implements DeferredSupplier<T>
{
                 }
 
             } else if (v instanceof DeferredSupplier<?>) {
-                final Object vf = v;
+                final DeferredSupplier<?> ds = (DeferredSupplier<?>) v;
 
                 if ((!Boolean.FALSE.equals(embedResolutionInTask) && (exec!=null
|| timeout!=null)) || Boolean.TRUE.equals(embedResolutionInTask)) {
                     if (exec==null)
@@ -318,16 +318,16 @@ public class ValueResolver<T> implements DeferredSupplier<T>
{
                     Callable<Object> callable = new Callable<Object>() {
                         public Object call() throws Exception {
                             try {
-                                Tasks.setBlockingDetails("Retrieving "+vf);
-                                return ((DeferredSupplier<?>) vf).get();
+                                Tasks.setBlockingDetails("Retrieving "+ds);
+                                return ds.get();
                             } finally {
                                 Tasks.resetBlockingDetails();
                             }
                         } };
                     String description = getDescription();
-                    TaskBuilder<Object> vb = Tasks.<Object>builder().body(callable).displayName("Resolving
dependent value").description(description);
-                    if (isTransientTask) vb.tag(BrooklynTaskTags.TRANSIENT_TASK_TAG);
-                    Task<Object> vt = exec.submit(vb.build());
+                    TaskBuilder<Object> tb = Tasks.<Object>builder().body(callable).displayName("Resolving
dependent value").description(description);
+                    if (isTransientTask) tb.tag(BrooklynTaskTags.TRANSIENT_TASK_TAG);
+                    Task<Object> vt = exec.submit(tb.build());
                     // TODO to handle immediate resolution, it would be nice to be able to
submit 
                     // so it executes in the current thread,
                     // or put a marker in the target thread or task while it is running that
the task 
@@ -340,8 +340,8 @@ public class ValueResolver<T> implements DeferredSupplier<T>
{
                     
                 } else {
                     try {
-                        Tasks.setBlockingDetails("Retrieving (non-task) "+vf);
-                        v = ((DeferredSupplier<?>) vf).get();
+                        Tasks.setBlockingDetails("Retrieving (non-task) "+ds);
+                        v = ((DeferredSupplier<?>) ds).get();
                     } finally {
                         Tasks.resetBlockingDetails();
                     }


Mime
View raw message