Deprecate RpcServiceInvoker.from(Class) 22/100822/1
authorRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Apr 2022 16:10:52 +0000 (18:10 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Tue, 26 Apr 2022 16:17:07 +0000 (18:17 +0200)
Invokers are considered an implementation detail and this particular
method is not used anywhere except tests. Schedule it for removal along
with ClassBasedRpcServiceInvoker it uses.

Change-Id: I4d8c57bbd982ea6eae21706d909af16495f29f56
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/invoke/ClassBasedRpcServiceInvoker.java
binding/mdsal-binding-dom-adapter/src/main/java/org/opendaylight/mdsal/binding/dom/adapter/invoke/RpcServiceInvoker.java
binding/mdsal-binding-dom-adapter/src/test/java/org/opendaylight/mdsal/binding/dom/adapter/invoke/ClassBasedRpcServiceInvokerTest.java
binding/mdsal-binding-dom-adapter/src/test/java/org/opendaylight/mdsal/binding/dom/adapter/invoke/RpcServiceInvokerTest.java

index 4cdfa94cc1d9cf3a6ef64f50577465456a78adbd..fdd395f752cb13e27596476749521e07de4c6ec0 100644 (file)
@@ -19,6 +19,7 @@ import org.opendaylight.mdsal.binding.spec.reflect.BindingReflections;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.opendaylight.yangtools.yang.common.QName;
 
+@Deprecated(forRemoval = true, since = "9.0.3")
 final class ClassBasedRpcServiceInvoker extends AbstractMappedRpcInvoker<String> {
     private static final LoadingCache<Class<? extends RpcService>, RpcServiceInvoker> INVOKERS =
             CacheBuilder.newBuilder().weakKeys()
index d88e4d2c49cafe35913ac0f6726373a32fd5cafd..0b8016dbffe66d207fc7d22f959983793065a974 100644 (file)
@@ -37,7 +37,9 @@ public abstract class RpcServiceInvoker {
      *
      * @param type RpcService interface, which was generated from model.
      * @return Cached instance of {@link RpcServiceInvoker} for supplied RPC type.
+     * @deprecated This method is not used by the adapter and is scheduled for removal.
      */
+    @Deprecated(forRemoval = true, since = "9.0.3")
     public static RpcServiceInvoker from(final Class<? extends RpcService> type) {
         return ClassBasedRpcServiceInvoker.instanceFor(type);
     }
index edca88fb831f7b4717680dcd7a68777f02adc0d5..65b909fb7f42ce0f025157a25b16a451916b1cfd 100644 (file)
@@ -16,8 +16,8 @@ import org.opendaylight.yangtools.yang.binding.DataContainer;
 import org.opendaylight.yangtools.yang.binding.RpcService;
 import org.opendaylight.yangtools.yang.common.QName;
 
+@Deprecated(forRemoval = true, since = "9.0.3")
 public class ClassBasedRpcServiceInvokerTest {
-
     @Test
     public void qnameToKeyTest() throws Exception {
         final ClassBasedRpcServiceInvoker classBasedRpcServiceInvoker =
index 8cdabe953003d8ef56f5424d1c80ee7d51609312..7e3ac44c424f105444b9516a517bd948a4d43f4d 100644 (file)
@@ -32,6 +32,7 @@ public class RpcServiceInvokerTest {
             QName.create(QNameModule.create(XMLNamespace.of("testURI"), Revision.of("2017-10-26")), "test"), method)));
     }
 
+    @Deprecated(forRemoval = true)
     @Test(expected = IllegalArgumentException.class)
     public void fromWithExceptionTest() {
         RpcServiceInvoker.from(RpcService.class);