Deprecate BindingReflections.findHierarchicalParent() 18/103018/2
authorRobert Varga <robert.varga@pantheon.tech>
Wed, 2 Nov 2022 14:33:33 +0000 (15:33 +0100)
committerRobert Varga <nite@hq.sk>
Wed, 2 Nov 2022 15:42:04 +0000 (15:42 +0000)
These methods are not used, deprecate them for removal.

Change-Id: Idee358f004fb36fb01a3c5222430a808dd68bbfd
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java

index 95a5d9a86b61f6ec96ddc39cf7d75e53588cd647..f4f218a4647e0d2f721628b486743badfb500e3f 100644 (file)
@@ -106,10 +106,11 @@ public final class BindingReflections {
      * Find data hierarchy parent from concrete Data class. This method uses first generic argument of implemented
      * {@link ChildOf} interface.
      *
-     * @param childClass
-     *            child class for which we want to find the parent class.
+     * @param childClass child class for which we want to find the parent class.
      * @return Parent class, e.g. class of which the childClass is ChildOf.
+     * @deprecated This method is unused and scheduled for removal
      */
+    @Deprecated(since = "10.0.3", forRemoval = true)
     public static Class<?> findHierarchicalParent(final Class<? extends ChildOf<?>> childClass) {
         return ClassLoaderUtils.findFirstGenericArgument(childClass, ChildOf.class).orElse(null);
     }
@@ -118,10 +119,11 @@ public final class BindingReflections {
      * Find data hierarchy parent from concrete Data class. This method is shorthand which gets DataObject class by
      * invoking {@link DataObject#implementedInterface()} and uses {@link #findHierarchicalParent(Class)}.
      *
-     * @param child
-     *            Child object for which the parent needs to be located.
+     * @param child Child object for which the parent needs to be located.
      * @return Parent class, or null if a parent is not found.
+     * @deprecated This method is unused and scheduled for removal
      */
+    @Deprecated(since = "10.0.3", forRemoval = true)
     public static Class<?> findHierarchicalParent(final DataObject child) {
         if (child instanceof ChildOf) {
             return ClassLoaderUtils.findFirstGenericArgument(child.implementedInterface(), ChildOf.class).orElse(null);