Remove EncodeConstants.SIZE_OF_{BYTE,SHORT,INT,LONG}_IN_BYTES
[openflowplugin.git] / openflowplugin-impl / src / main / java / org / opendaylight / openflowplugin / impl / protocol / deserialization / multipart / MultipartReplyFlowStatsDeserializer.java
index 694ab0beff9d9460368d45cb4a4ab25e26bf2d21..b9560995593ecf3b0bf933adea242bd2f73d4103 100644 (file)
@@ -56,7 +56,7 @@ public class MultipartReplyFlowStatsDeserializer implements OFDeserializer<Multi
         while (message.readableBytes() > 0) {
             final FlowAndStatisticsMapListBuilder itemBuilder = new FlowAndStatisticsMapListBuilder();
             final int itemLength = message.readUnsignedShort();
-            final ByteBuf itemMessage = message.readSlice(itemLength - EncodeConstants.SIZE_OF_SHORT_IN_BYTES);
+            final ByteBuf itemMessage = message.readSlice(itemLength - Short.BYTES);
 
             itemBuilder.setTableId(itemMessage.readUnsignedByte());
             itemMessage.skipBytes(PADDING_IN_FLOW_STATS_HEADER_01);
@@ -73,11 +73,11 @@ public class MultipartReplyFlowStatsDeserializer implements OFDeserializer<Multi
 
             itemMessage.skipBytes(PADDING_IN_FLOW_STATS_HEADER_02);
 
-            final byte[] cookie = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+            final byte[] cookie = new byte[Long.BYTES];
             itemMessage.readBytes(cookie);
-            final byte[] packetCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+            final byte[] packetCount = new byte[Long.BYTES];
             itemMessage.readBytes(packetCount);
-            final byte[] byteCount = new byte[EncodeConstants.SIZE_OF_LONG_IN_BYTES];
+            final byte[] byteCount = new byte[Long.BYTES];
             itemMessage.readBytes(byteCount);
 
             itemBuilder