From b6464dda4b14403bc8a3aababaf68979e9826026 Mon Sep 17 00:00:00 2001 From: Robert Varga Date: Thu, 24 Nov 2022 14:34:40 +0100 Subject: [PATCH] Deprecate BindingReflections.isSubstitutionFor() This method is used only in mdsal-binding-dom-codec, deprecate it for removal. Change-Id: I188f0d14b10f72bce2561c6e80e087a230eb5b4b Signed-off-by: Robert Varga --- .../mdsal/binding/spec/reflect/BindingReflections.java | 2 ++ 1 file changed, 2 insertions(+) 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 ccac10b728..bc5ba71e38 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 @@ -476,12 +476,14 @@ public final class BindingReflections { * @param target Class which should be used at particular subtree * @return true if and only if classes represents same data. * @throws NullPointerException if any argument is {@code null} + * @deprecated This method is used only mdsal-binding-dom-codec and is scheduled for removal. */ // FIXME: MDSAL-785: this really should live in BindingRuntimeTypes and should not be based on reflection. The only // user is binding-dom-codec and the logic could easily be performed on GeneratedType instead. For // a particular world this boils down to a matrix, which can be calculated either on-demand or // when we create BindingRuntimeTypes. Achieving that will bring us one step closer to being able // to have a pre-compiled Binding Runtime. + @Deprecated(since = "10.0.4", forRemoval = true) @SuppressWarnings({ "rawtypes", "unchecked" }) public static boolean isSubstitutionFor(final Class potential, final Class target) { Set subImplemented = new HashSet<>(Arrays.asList(potential.getInterfaces())); -- 2.36.6