Fix raw types in openflowjava-extension-nicira test 45/92345/2
authorRobert Varga <robert.varga@pantheon.tech>
Mon, 31 Aug 2020 12:46:58 +0000 (14:46 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Mon, 7 Sep 2020 08:12:51 +0000 (10:12 +0200)
We have a few warnings here, fix them up.

Change-Id: Ie0aa8ae6f73a8c282e85cf24acd126052dab05cf
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
extension/openflowjava-extension-nicira/src/test/java/org/opendaylight/openflowjava/nx/NiciraExtensionCodecRegistratorImplTest.java

index b8c4b78d48679dd9daee302880c0cf23c0c50ec6..a3a564ae09ee238cb6446419bdfe6c05a5511620 100644 (file)
@@ -41,13 +41,11 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
 
 @RunWith(MockitoJUnitRunner.class)
 public class NiciraExtensionCodecRegistratorImplTest {
-
-
     NiciraExtensionCodecRegistratorImpl niciraExtensionCodecRegistrator;
     List<SwitchConnectionProvider> providers = new LinkedList<>();
     NiciraActionSerializerKey actionSerializerKey;
     NiciraActionDeserializerKey actionDeserializerKey;
-    MatchEntrySerializerKey matchSerializerKey;
+    MatchEntrySerializerKey<?, ?> matchSerializerKey;
     MatchEntryDeserializerKey matchDeserializerKey;
 
     @Mock
@@ -59,13 +57,10 @@ public class NiciraExtensionCodecRegistratorImplTest {
     @Mock
     OFDeserializer<MatchEntry> matchDeserializer;
 
-
     public static final short VERSION = 4;
     public static final byte VERSION1 = EncodeConstants.OF10_VERSION_ID;
     public static final byte VERSION2 = EncodeConstants.OF13_VERSION_ID;
 
-
-
     @Mock
     SwitchConnectionProvider provider;
 
@@ -75,7 +70,7 @@ public class NiciraExtensionCodecRegistratorImplTest {
         actionSerializerKey = new NiciraActionSerializerKey(VERSION, PopVlanCase.class);
         //subtype = 10
         actionDeserializerKey = new NiciraActionDeserializerKey(VERSION, 10);
-        matchSerializerKey = new MatchEntrySerializerKey(VERSION, Nxm0Class.class, MatchField.class);
+        matchSerializerKey = new MatchEntrySerializerKey<>(VERSION, Nxm0Class.class, MatchField.class);
         //OxmClass 1, OxmField 2
         matchDeserializerKey = new MatchEntryDeserializerKey(VERSION, 1, 2);
 
@@ -93,14 +88,14 @@ public class NiciraExtensionCodecRegistratorImplTest {
     @Test
     public void registerActionSerializerTest() {
         niciraExtensionCodecRegistrator.registerActionSerializer(actionSerializerKey, actionSerializer);
-        ActionSerializerKey key1 = NiciraUtil.createOfJavaKeyFrom(actionSerializerKey);
+        ActionSerializerKey<?> key1 = NiciraUtil.createOfJavaKeyFrom(actionSerializerKey);
         Mockito.verify(provider).registerActionSerializer(eq(key1), any(OFGeneralSerializer.class));
     }
 
     @Test
     public void unregisterActionSerializerTest() {
         niciraExtensionCodecRegistrator.registerActionSerializer(actionSerializerKey, actionSerializer);
-        ActionSerializerKey key1 = NiciraUtil.createOfJavaKeyFrom(actionSerializerKey);
+        ActionSerializerKey<?> key1 = NiciraUtil.createOfJavaKeyFrom(actionSerializerKey);
         niciraExtensionCodecRegistrator.unregisterActionSerializer(actionSerializerKey);
         Mockito.verify(provider).unregisterSerializer(eq(key1));
     }