brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [20/22] brooklyn-server git commit: restore the postLocalEvaluation invocation (was accidentally deleted)
Date Thu, 22 Sep 2016 21:09:52 GMT
restore the postLocalEvaluation invocation (was accidentally deleted)


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

Branch: refs/heads/master
Commit: 98c342ccd5c22f8834104a0f1ac9fe7689d90d4d
Parents: 8156322
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Thu Sep 22 20:35:30 2016 +0100
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Thu Sep 22 20:36:20 2016 +0100

----------------------------------------------------------------------
 .../brooklyn/core/config/internal/AbstractConfigMapImpl.java   | 6 ++++--
 .../apache/brooklyn/core/entity/internal/EntityConfigMap.java  | 2 --
 .../brooklyn/core/location/internal/LocationConfigMap.java     | 2 ++
 3 files changed, 6 insertions(+), 4 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/98c342cc/core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java
b/core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java
index 8716cec..788e5da 100644
--- a/core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java
+++ b/core/src/main/java/org/apache/brooklyn/core/config/internal/AbstractConfigMapImpl.java
@@ -296,7 +296,7 @@ public abstract class AbstractConfigMapImpl<TContainer extends BrooklynObject>
i
      * current impl just uses the key to extract again which is a little bit wasteful but
simpler. 
      * <p>
      * this does not do any resolution with respect to ancestors. */
-    protected Maybe<Object> resolveRawValueFromContainer(TContainer container, ConfigKey<?>
key, Object value) {
+    protected Maybe<Object> resolveRawValueFromContainer(TContainer container, ConfigKey<?>
key, Maybe<Object> value) {
         Map<ConfigKey<?>, Object> oc = ((AbstractConfigMapImpl<?>) ((BrooklynObjectInternal)container).config().getInternalConfigMap()).ownConfig;
         if (key instanceof ConfigKeySelfExtracting) {
             if (((ConfigKeySelfExtracting<?>)key).isSet(oc)) {
@@ -305,7 +305,9 @@ public abstract class AbstractConfigMapImpl<TContainer extends BrooklynObject>
i
                     // wasteful to make a copy to look up; maybe try once opportunistically?
                     ownCopy = MutableMap.copyOf(oc);
                 }
-                return Maybe.of((Object) ((ConfigKeySelfExtracting<?>) key).extractValue(ownCopy,
getExecutionContext(container)) );
+                Maybe<Object> result = Maybe.of((Object) ((ConfigKeySelfExtracting<?>)
key).extractValue(ownCopy, getExecutionContext(container)) );
+                postLocalEvaluate(key, bo, value, result);
+                return result;
             } else {
                 return Maybe.absent();
             }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/98c342cc/core/src/main/java/org/apache/brooklyn/core/entity/internal/EntityConfigMap.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/entity/internal/EntityConfigMap.java
b/core/src/main/java/org/apache/brooklyn/core/entity/internal/EntityConfigMap.java
index 480e1ed..5529cef 100644
--- a/core/src/main/java/org/apache/brooklyn/core/entity/internal/EntityConfigMap.java
+++ b/core/src/main/java/org/apache/brooklyn/core/entity/internal/EntityConfigMap.java
@@ -27,11 +27,9 @@ import org.apache.brooklyn.api.entity.Entity;
 import org.apache.brooklyn.api.mgmt.ExecutionContext;
 import org.apache.brooklyn.api.mgmt.Task;
 import org.apache.brooklyn.api.objs.BrooklynObject;
-import org.apache.brooklyn.api.objs.EntityAdjunct;
 import org.apache.brooklyn.config.ConfigKey;
 import org.apache.brooklyn.core.config.internal.AbstractConfigMapImpl;
 import org.apache.brooklyn.core.entity.EntityInternal;
-import org.apache.brooklyn.core.objs.AbstractEntityAdjunct;
 import org.apache.brooklyn.core.objs.BrooklynObjectInternal.ConfigurationSupportInternal;
 import org.apache.brooklyn.util.guava.Maybe;
 import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/98c342cc/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
b/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
index 9b38946..4c82188 100644
--- a/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
+++ b/core/src/main/java/org/apache/brooklyn/core/location/internal/LocationConfigMap.java
@@ -61,10 +61,12 @@ public class LocationConfigMap extends AbstractConfigMapImpl<Location>
{
 
     @Override
     protected void postLocalEvaluate(ConfigKey<?> key, BrooklynObject bo, Maybe<?>
rawValue, Maybe<?> resolvedValue) {
+        /* nothing needed */
     }
 
     @Override
     protected void postSetConfig() {
+        /* nothing needed */
     }
 
     @Override


Mime
View raw message