Remove deprecated ActionSerializerKey constructor 67/92667/3
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 24 Sep 2020 11:18:34 +0000 (13:18 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 24 Sep 2020 14:50:32 +0000 (16:50 +0200)
Legacy widened-type constructor is not used anywhere, remove it.

Change-Id: Ib1b4225657c5bba3455e2b7edbf53a659b02ce40
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
openflowjava/openflow-protocol-api/src/main/java/org/opendaylight/openflowjava/protocol/api/keys/ActionSerializerKey.java
openflowjava/openflow-protocol-impl/src/test/java/org/opendaylight/openflowjava/protocol/impl/util/TypeKeyMakerFactoryTest.java
openflowplugin/src/main/java/org/opendaylight/openflowplugin/openflow/md/core/extension/ActionExtensionHelper.java

index f1835d861ff85e459b28ffe5b755d6023338297d..b07989d05102c7ef3fbbdab53a63ce94d3d2c67e 100644 (file)
@@ -36,18 +36,6 @@ public class ActionSerializerKey<T extends ActionChoice> extends MessageTypeKey<
         this.experimenterId = experimenterId;
     }
 
-    /**
-     * Constructor.
-     *
-     * @param msgVersion protocol wire version
-     * @param actionType type of action
-     * @param experimenterId experimenter / vendor ID
-     */
-    @Deprecated(forRemoval = true)
-    public ActionSerializerKey(final short msgVersion, final Class<T> actionType, final Long experimenterId) {
-        this(msgVersion, actionType, experimenterId == null ? (Uint32) null : Uint32.valueOf(experimenterId));
-    }
-
     @Override
     public int hashCode() {
         final int prime = 31;
index 3438179831bfe71030193954f5bfdf24934300ea..36f09b43a90b037756fac7a3f96d0399b2785bfc 100644 (file)
@@ -59,7 +59,7 @@ public class TypeKeyMakerFactoryTest {
 
         Assert.assertNotNull("Null key", key);
         Assert.assertEquals("Wrong key", new ActionSerializerKey<>(EncodeConstants.OF13_VERSION_ID,
-                        OutputActionCase.class, (Uint32) null), key);
+                        OutputActionCase.class, null), key);
     }
 
     /**
@@ -72,14 +72,14 @@ public class TypeKeyMakerFactoryTest {
 
         org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping
             .ActionBuilder builder = new ActionBuilder();
-        builder.setExperimenterId(new ExperimenterId(42L));
+        builder.setExperimenterId(new ExperimenterId(Uint32.valueOf(42)));
         builder.setActionChoice(new CopyTtlInCaseBuilder().build());
         Action action = builder.build();
         MessageTypeKey<?> key = keyMaker.make(action);
 
         Assert.assertNotNull("Null key", key);
         Assert.assertEquals("Wrong key", new ActionSerializerKey<>(EncodeConstants.OF13_VERSION_ID,
-                CopyTtlInCase.class, 42L), key);
+                CopyTtlInCase.class, Uint32.valueOf(42)), key);
     }
 
     /**
@@ -111,7 +111,7 @@ public class TypeKeyMakerFactoryTest {
         Assert.assertNotNull("Null keyMaker", keyMaker);
 
         InstructionBuilder builder = new InstructionBuilder();
-        builder.setExperimenterId(new ExperimenterId(42L));
+        builder.setExperimenterId(new ExperimenterId(Uint32.valueOf(42)));
         builder.setInstructionChoice(new ClearActionsCaseBuilder().build());
         Instruction instruction = builder.build();
         MessageTypeKey<?> key = keyMaker.make(instruction);
@@ -158,7 +158,7 @@ public class TypeKeyMakerFactoryTest {
         builder.setHasMask(true);
         ExperimenterIdCaseBuilder caseBuilder = new ExperimenterIdCaseBuilder();
         ExperimenterBuilder expBuilder = new ExperimenterBuilder();
-        expBuilder.setExperimenter(new ExperimenterId(42L));
+        expBuilder.setExperimenter(new ExperimenterId(Uint32.valueOf(42)));
         caseBuilder.setExperimenter(expBuilder.build());
         builder.setMatchEntryValue(caseBuilder.build());
         MatchEntry entry = builder.build();
index 60a5a9fe1cbfeb131ee7ea09c1e108f4961d8792..6e1c409dc02c4430d4ff32ac537cda2939b5471f 100644 (file)
@@ -17,7 +17,6 @@ import org.opendaylight.openflowplugin.extension.api.path.ActionPath;
 import org.opendaylight.openflowplugin.openflow.md.core.session.OFSessionUtil;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.augments.rev150225.action.container.action.choice.ExperimenterIdCase;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.action.rev150203.actions.grouping.Action;
-import org.opendaylight.yangtools.yang.common.Uint32;
 
 public final class ActionExtensionHelper {
 
@@ -56,7 +55,7 @@ public final class ActionExtensionHelper {
             convertor = extensionConvertorProvider.getActionConverter(key);
         } else if (action.getActionChoice() != null) {
             ActionSerializerKey<?> key = new ActionSerializerKey(EncodeConstants.OF13_VERSION_ID,
-                    action.getActionChoice().implementedInterface(), (Uint32) null);
+                    action.getActionChoice().implementedInterface(), null);
             convertor = extensionConvertorProvider.getActionConverter(key);
         }