brooklyn-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From drigod...@apache.org
Subject [1/4] brooklyn-server git commit: Compile with jdk 8
Date Mon, 06 Feb 2017 10:37:08 GMT
Repository: brooklyn-server
Updated Branches:
  refs/heads/master 68a07aa10 -> 55ec074f4


Compile with jdk 8

 - minor source changes (generics)


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

Branch: refs/heads/master
Commit: a560c7cfa3229816a511e4f7e57aa548f876d29a
Parents: 7f1846c
Author: Guglielmo Nigri <guglielmo.nigri@cloudsoftcorp.com>
Authored: Tue Dec 13 16:19:01 2016 +0100
Committer: Guglielmo Nigri <guglielmo.nigri@cloudsoftcorp.com>
Committed: Tue Dec 13 17:13:38 2016 +0100

----------------------------------------------------------------------
 .../brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java   | 6 +++---
 .../core/config/MapListAndOtherStructuredConfigKeyTest.java    | 6 +++---
 .../brooklyn/util/javalang/coerce/EnumTypeCoercions.java       | 4 ++--
 3 files changed, 8 insertions(+), 8 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a560c7cf/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java
----------------------------------------------------------------------
diff --git a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java
b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java
index 7274b2e..cfe5878 100644
--- a/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java
+++ b/camp/camp-brooklyn/src/main/java/org/apache/brooklyn/camp/brooklyn/spi/dsl/methods/DslComponent.java
@@ -486,8 +486,8 @@ public class DslComponent extends BrooklynDslDeferredSupplier<Entity>
{
             if (targetEntityMaybe.isAbsent()) return Maybe.absent("Target entity not available");
             EntityInternal targetEntity = (EntityInternal) targetEntityMaybe.get();
 
-            ConfigKey<?> key = targetEntity.getEntityType().getConfigKey(keyName);
-            Maybe<? extends Object> result = targetEntity.config().getNonBlocking(key
!= null ? key : ConfigKeys.newConfigKey(Object.class, keyName));
+            ConfigKey key = targetEntity.getEntityType().getConfigKey(keyName);
+            Maybe result = targetEntity.config().getNonBlocking(key != null ? key : ConfigKeys.newConfigKey(Object.class,
keyName));
             return Maybe.<Object>cast(result);
         }
 
@@ -501,7 +501,7 @@ public class DslComponent extends BrooklynDslDeferredSupplier<Entity>
{
                         @Override
                         public Object call() throws Exception {
                             Entity targetEntity = component.get();
-                            ConfigKey<?> key = targetEntity.getEntityType().getConfigKey(keyName);
+                            ConfigKey key = targetEntity.getEntityType().getConfigKey(keyName);
                             return targetEntity.getConfig(key != null ? key : ConfigKeys.newConfigKey(Object.class,
keyName));
                         }})
                     .build();

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a560c7cf/core/src/test/java/org/apache/brooklyn/core/config/MapListAndOtherStructuredConfigKeyTest.java
----------------------------------------------------------------------
diff --git a/core/src/test/java/org/apache/brooklyn/core/config/MapListAndOtherStructuredConfigKeyTest.java
b/core/src/test/java/org/apache/brooklyn/core/config/MapListAndOtherStructuredConfigKeyTest.java
index bfe1126..3e2d9c6 100644
--- a/core/src/test/java/org/apache/brooklyn/core/config/MapListAndOtherStructuredConfigKeyTest.java
+++ b/core/src/test/java/org/apache/brooklyn/core/config/MapListAndOtherStructuredConfigKeyTest.java
@@ -225,7 +225,7 @@ public class MapListAndOtherStructuredConfigKeyTest extends BrooklynAppUnitTestS
     @Test
     public void testSetConfigKeyClear() throws Exception {
         entity.config().set(TestEntity.CONF_SET_THING.subKey(), "aval");
-        entity.config().set((ConfigKey)TestEntity.CONF_SET_THING, SetModifications.clearing());
+        entity.config().set((ConfigKey)TestEntity.CONF_SET_THING, (Object) SetModifications.clearing());
         // for now defaults to null, but empty list might be better? or whatever the default
is?
         assertEquals(entity.getConfig(TestEntity.CONF_SET_THING), null);
     }
@@ -286,7 +286,7 @@ public class MapListAndOtherStructuredConfigKeyTest extends BrooklynAppUnitTestS
     @Test // ListConfigKey deprecated, as order no longer guaranteed
     public void testListConfigKeyClear() throws Exception {
         entity.config().set(TestEntity.CONF_LIST_THING.subKey(), "aval");
-        entity.config().set((ConfigKey)TestEntity.CONF_LIST_THING, ListModifications.clearing());
+        entity.config().set((ConfigKey)TestEntity.CONF_LIST_THING, (Object) ListModifications.clearing());
         // for now defaults to null, but empty list might be better? or whatever the default
is?
         assertEquals(entity.getConfig(TestEntity.CONF_LIST_THING), null);
     }
@@ -342,7 +342,7 @@ public class MapListAndOtherStructuredConfigKeyTest extends BrooklynAppUnitTestS
     @Test
     public void testMapConfigClearMod() throws Exception {
         entity.config().set(TestEntity.CONF_MAP_THING.subKey("akey"), "aval");
-        entity.config().set((ConfigKey)TestEntity.CONF_MAP_THING, MapModifications.clearing());
+        entity.config().set((ConfigKey)TestEntity.CONF_MAP_THING, (Object) MapModifications.clearing());
         // for now defaults to null, but empty map might be better? or whatever the default
is?
         assertEquals(entity.getConfig(TestEntity.CONF_MAP_THING), null);
     }

http://git-wip-us.apache.org/repos/asf/brooklyn-server/blob/a560c7cf/utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/EnumTypeCoercions.java
----------------------------------------------------------------------
diff --git a/utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/EnumTypeCoercions.java
b/utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/EnumTypeCoercions.java
index b57625a..00cb545 100644
--- a/utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/EnumTypeCoercions.java
+++ b/utils/common/src/main/java/org/apache/brooklyn/util/javalang/coerce/EnumTypeCoercions.java
@@ -43,7 +43,7 @@ public class EnumTypeCoercions {
      * <p>
      * Returns {@code defaultValue} if the string cannot be converted.
      *
-     * @see TypeCoercions#coerce(Object, Class)
+     * @see EnumTypeCoercions#tryCoerce(String, Class)
      * @see Enum#valueOf(Class, String)
      */
     public static <E extends Enum<E>> Function<String, E> stringToEnum(final
Class<E> type, @Nullable final E defaultValue) {
@@ -74,7 +74,7 @@ public class EnumTypeCoercions {
         if (input==null) return null;
         if (targetType==null) return Maybe.absent("Null enum type");
         if (!targetType.isEnum()) return Maybe.absent("Type '"+targetType+"' is not an enum");
-        return tryCoerce(input, (Class<Enum>)targetType);
+        return tryCoerce(input, (Class)targetType);
     }
     
     public static <E extends Enum<E>> Maybe<E> tryCoerce(String input,
Class<E> targetType) {


Mime
View raw message