summaryrefslogtreecommitdiffstats
path: root/infra
diff options
context:
space:
mode:
authorMarek Gradzki <mgradzki@cisco.com>2018-08-21 08:52:12 +0200
committerMarek Gradzki <mgradzki@cisco.com>2018-08-21 08:52:12 +0200
commit1991028af9ea255606bd14523234fe317bdb4b1c (patch)
treee71477688460ef92ab3ebfad47edb2de484437b8 /infra
parente9d3785d0603bf6e024affafc735641ee312b675 (diff)
RWUtils: move fields to comply with Java Code Conventions
Change-Id: I2ab95afb733885b3034dfc6a8cbad795fbf5ba6c Signed-off-by: Marek Gradzki <mgradzki@cisco.com>
Diffstat (limited to 'infra')
-rw-r--r--infra/translate-utils/src/main/java/io/fd/honeycomb/translate/util/RWUtils.java23
1 files changed, 12 insertions, 11 deletions
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<SubtreeManager<? extends DataObject>, Class<? extends DataObject>>
+ MANAGER_CLASS_FUNCTION = input -> input.getManagedDataObjectType().getTargetType();
+
+ public static final Function<SubtreeManager<? extends Augmentation<?>>, Class<? extends DataObject>>
+ MANAGER_CLASS_AUG_FUNCTION = input -> {
+ final Class<? extends Augmentation<?>> targetType = input.getManagedDataObjectType().getTargetType();
+ Preconditions.checkArgument(DataObject.class.isAssignableFrom(targetType));
+ return (Class<? extends DataObject>) targetType;
+ };
private RWUtils() {}
@@ -129,16 +140,6 @@ public final class RWUtils {
return objectObjectLinkedHashMap;
}
- public static final Function<SubtreeManager<? extends DataObject>, Class<? extends DataObject>>
- MANAGER_CLASS_FUNCTION = input -> input.getManagedDataObjectType().getTargetType();
-
- public static final Function<SubtreeManager<? extends Augmentation<?>>, Class<? extends DataObject>>
- MANAGER_CLASS_AUG_FUNCTION = input -> {
- final Class<? extends Augmentation<?>> targetType = input.getManagedDataObjectType().getTargetType();
- Preconditions.checkArgument(DataObject.class.isAssignableFrom(targetType));
- return (Class<? extends DataObject>) targetType;
- };
-
/**
* Transform a keyed instance identifier into a wildcarded one.
* <p/>