summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-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/>