Fix migration warnings in openflowjava-util 68/92668/4
authorRobert Varga <robert.varga@pantheon.tech>
Thu, 24 Sep 2020 11:21:30 +0000 (13:21 +0200)
committerRobert Varga <robert.varga@pantheon.tech>
Thu, 24 Sep 2020 15:38:12 +0000 (17:38 +0200)
We have some use of legacy widened types, fix them up.

JIRA: OPNFLWPLUG-1099
Change-Id: I1266a79d5957f4ae1009258593447f0cadfff40c
Signed-off-by: Robert Varga <robert.varga@pantheon.tech>
openflowjava/openflowjava-util/src/test/java/org/opendaylight/openflowjava/util/ByteBufUtilsTest.java

index 23a9bef5cf21c95f5af81222a261d1c7a10dda0d..75bbf6769d291c0ed65eca44eae18b8a1a35a51b 100644 (file)
@@ -20,6 +20,7 @@ import org.junit.Test;
 import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInput;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.protocol.rev130731.HelloInputBuilder;
+import org.opendaylight.yangtools.yang.common.Uint32;
 
 /**
  * Unit tests for ByteBufUtils.
@@ -355,8 +356,8 @@ public class ByteBufUtilsTest {
     @Test
     public void testWriteHeader() {
         HelloInputBuilder helloBuilder = new HelloInputBuilder();
-        helloBuilder.setVersion((short) EncodeConstants.OF13_VERSION_ID);
-        helloBuilder.setXid(12345L);
+        helloBuilder.setVersion(EncodeConstants.OF_VERSION_1_3);
+        helloBuilder.setXid(Uint32.valueOf(12345));
         helloBuilder.setElements(null);
         HelloInput helloInput = helloBuilder.build();
         ByteBuf buf = PooledByteBufAllocator.DEFAULT.buffer();