Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id D92A3200C13 for ; Mon, 6 Feb 2017 11:37:10 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id D7DCC160B53; Mon, 6 Feb 2017 10:37:10 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id EFF93160B49 for ; Mon, 6 Feb 2017 11:37:09 +0100 (CET) Received: (qmail 83939 invoked by uid 500); 6 Feb 2017 10:37:09 -0000 Mailing-List: contact commits-help@brooklyn.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@brooklyn.apache.org Delivered-To: mailing list commits@brooklyn.apache.org Received: (qmail 83923 invoked by uid 99); 6 Feb 2017 10:37:09 -0000 Received: from git1-us-west.apache.org (HELO git1-us-west.apache.org) (140.211.11.23) by apache.org (qpsmtpd/0.29) with ESMTP; Mon, 06 Feb 2017 10:37:09 +0000 Received: by git1-us-west.apache.org (ASF Mail Server at git1-us-west.apache.org, from userid 33) id D4B91DFF2D; Mon, 6 Feb 2017 10:37:08 +0000 (UTC) Content-Type: text/plain; charset="us-ascii" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: drigodwin@apache.org To: commits@brooklyn.apache.org Date: Mon, 06 Feb 2017 10:37:08 -0000 Message-Id: <5fb84ee0c3cd40cba53c2e13ad7b6e10@git.apache.org> X-Mailer: ASF-Git Admin Mailer Subject: [1/4] brooklyn-server git commit: Compile with jdk 8 archived-at: Mon, 06 Feb 2017 10:37:11 -0000 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 Authored: Tue Dec 13 16:19:01 2016 +0100 Committer: Guglielmo Nigri 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 { if (targetEntityMaybe.isAbsent()) return Maybe.absent("Target entity not available"); EntityInternal targetEntity = (EntityInternal) targetEntityMaybe.get(); - ConfigKey key = targetEntity.getEntityType().getConfigKey(keyName); - Maybe 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.cast(result); } @@ -501,7 +501,7 @@ public class DslComponent extends BrooklynDslDeferredSupplier { @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 { *

* 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 > Function stringToEnum(final Class 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)targetType); + return tryCoerce(input, (Class)targetType); } public static > Maybe tryCoerce(String input, Class targetType) {