brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From henev...@apache.org
Subject [07/11] brooklyn-server git commit: remove unnecessary marker default value
Date Mon, 20 Mar 2017 15:57:32 GMT
remove unnecessary marker default value


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

Branch: refs/heads/master
Commit: ed81635e3d4f85bf5d9bf978447d50080140e7e8
Parents: 1744145
Author: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Authored: Tue Mar 7 15:20:42 2017 +0000
Committer: Alex Heneveld <alex.heneveld@cloudsoftcorp.com>
Committed: Tue Mar 7 15:20:42 2017 +0000

----------------------------------------------------------------------
 .../core/objs/AbstractConfigurationSupportInternal.java        | 6 ------
 1 file changed, 6 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/ed81635e/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 113daac..95b6312 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
@@ -131,19 +131,13 @@ public abstract class AbstractConfigurationSupportInternal implements
BrooklynOb
         // getRaw returns Maybe(val) if the key was explicitly set (where val can be null)
         // or Absent if the config key was unset.
         Object unresolved = getRaw(key).or(key.getDefaultValue());
-        final Object marker = new Object();
         Maybe<Object> resolved = Tasks.resolving(unresolved)
                 .as(Object.class)
-                .defaultValue(marker)
                 .immediately(true)
                 .deep(true)
                 .context(getContext())
                 .getMaybe();
         if (resolved.isAbsent()) return Maybe.Absent.<T>castAbsent(resolved);
-        if (resolved.get()==marker) {
-            // TODO changed Feb 2017, previously returned absent, in contrast to what the
javadoc says
-            return Maybe.of((T)null);
-        }
         return TypeCoercions.tryCoerce(resolved.get(), key.getTypeToken());
     }
 


Mime
View raw message