From df45a0027a1b433829e67c8bac5381da3b2a02da Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Wed, 2 Nov 2022 15:30:48 +0100 Subject: [PATCH] Remove BindingReflections.isAugmentationChild() This method is not used anywhere, remove it. JIRA: MDSAL-786 Change-Id: I6ed40aab7432f59e2e2a8bcb51e161cac2fcb33e Signed-off-by: Robert Varga --- .../spec/reflect/BindingReflections.java | 23 ------------------- .../spec/reflect/BindingReflectionsTest.java | 1 - 2 files changed, 24 deletions(-) diff --git a/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java b/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java index 901e09ba97..95a5d9a86b 100644 --- a/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java +++ b/binding/mdsal-binding-spec-util/src/main/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflections.java @@ -207,29 +207,6 @@ public final class BindingReflections { .orElseThrow(() -> new IllegalStateException("Failed to resolve QName of " + contract)); } - /** - * Checks if class is child of augmentation. - * - * @deprecated This method is unused and scheduled for removal. - */ - @Deprecated(since = "10.0.3", forRemoval = true) - public static boolean isAugmentationChild(final Class clazz) { - // FIXME: Current resolver could be still confused when child node was added by grouping - checkArgument(clazz != null); - - @SuppressWarnings({ "rawtypes", "unchecked" }) - Class parent = findHierarchicalParent((Class) clazz); - if (parent == null) { - LOG.debug("Did not find a parent for class {}", clazz); - return false; - } - - String clazzModelPackage = getModelRootPackageName(clazz.getPackage()); - String parentModelPackage = getModelRootPackageName(parent.getPackage()); - - return !clazzModelPackage.equals(parentModelPackage); - } - /** * Returns root package name for supplied package. * diff --git a/binding/mdsal-binding-spec-util/src/test/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflectionsTest.java b/binding/mdsal-binding-spec-util/src/test/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflectionsTest.java index 605b8d1727..04a6ec23b7 100644 --- a/binding/mdsal-binding-spec-util/src/test/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflectionsTest.java +++ b/binding/mdsal-binding-spec-util/src/test/java/org/opendaylight/mdsal/binding/spec/reflect/BindingReflectionsTest.java @@ -39,7 +39,6 @@ public class BindingReflectionsTest { assertEquals("Module info should be empty Set", Collections.emptySet(), BindingReflections.loadModuleInfos()); assertFalse("Should not be RpcType", BindingReflections.isRpcType(DataObject.class)); - assertFalse("Should not be AugmentationChild", BindingReflections.isAugmentationChild(DataObject.class)); assertTrue("Should be BindingClass", BindingReflections.isBindingClass(DataObject.class)); assertFalse("Should not be Notification", BindingReflections.isNotification(DataObject.class)); -- 2.36.6