From 1991028af9ea255606bd14523234fe317bdb4b1c Mon Sep 17 00:00:00 2001 From: Marek Gradzki Date: Tue, 21 Aug 2018 08:52:12 +0200 Subject: RWUtils: move fields to comply with Java Code Conventions Change-Id: I2ab95afb733885b3034dfc6a8cbad795fbf5ba6c Signed-off-by: Marek Gradzki --- .../io/fd/honeycomb/translate/util/RWUtils.java | 23 +++++++++++----------- 1 file changed, 12 insertions(+), 11 deletions(-) (limited to 'infra') diff --git a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java index 3e1582fd8..71bcd9def 100644 --- a/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java +++ b/infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java @@ -37,7 +37,18 @@ import org.opendaylight.yangtools.yang.binding.InstanceIdentifier; public final class RWUtils { - // TODO HONEYCOMB-172 update the utils methods considering Java8. Make sure they still work by wiring a detailed unit test first + // TODO(HONEYCOMB-172): update the utils methods considering Java8. + // Make sure they still work by wiring a detailed unit test first + + public static final Function, Class> + MANAGER_CLASS_FUNCTION = input -> input.getManagedDataObjectType().getTargetType(); + + public static final Function>, Class> + MANAGER_CLASS_AUG_FUNCTION = input -> { + final Class> targetType = input.getManagedDataObjectType().getTargetType(); + Preconditions.checkArgument(DataObject.class.isAssignableFrom(targetType)); + return (Class) targetType; + }; private RWUtils() {} @@ -129,16 +140,6 @@ public final class RWUtils { return objectObjectLinkedHashMap; } - public static final Function, Class> - MANAGER_CLASS_FUNCTION = input -> input.getManagedDataObjectType().getTargetType(); - - public static final Function>, Class> - MANAGER_CLASS_AUG_FUNCTION = input -> { - final Class> targetType = input.getManagedDataObjectType().getTargetType(); - Preconditions.checkArgument(DataObject.class.isAssignableFrom(targetType)); - return (Class) targetType; - }; - /** * Transform a keyed instance identifier into a wildcarded one. *

-- cgit 1.2.3-korg