Remove EncodeConstants.SIZE_OF_{BYTE,SHORT,INT,LONG}_IN_BYTES
[openflowplugin.git] / openflowjava / openflow-protocol-impl / src / main / java / org / opendaylight / openflowjava / protocol / impl / deserialization / match / OxmIpv6ExtHdrDeserializer.java
index 2c44a66ba03e481bec7ed553498addc4047a2cad..9444aa7118b9d78589fe1f340943e29045dd9d75 100644 (file)
@@ -9,7 +9,6 @@ package org.opendaylight.openflowjava.protocol.impl.deserialization.match;
 
 import io.netty.buffer.ByteBuf;
 import org.opendaylight.openflowjava.protocol.api.extensibility.OFDeserializer;
-import org.opendaylight.openflowjava.protocol.api.util.EncodeConstants;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.common.types.rev130731.Ipv6ExthdrFlags;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.Ipv6Exthdr;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.MatchField;
@@ -27,7 +26,6 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.openflow.oxm.rev150225.matc
  */
 public class OxmIpv6ExtHdrDeserializer extends AbstractOxmMatchEntryDeserializer
         implements OFDeserializer<MatchEntry> {
-
     @Override
     public MatchEntry deserialize(ByteBuf input) {
         MatchEntryBuilder builder = processHeader(getOxmClass(), getOxmField(), input);
@@ -40,8 +38,7 @@ public class OxmIpv6ExtHdrDeserializer extends AbstractOxmMatchEntryDeserializer
         Ipv6ExthdrBuilder extHdrBuilder = new Ipv6ExthdrBuilder();
         extHdrBuilder.setPseudoField(convertPseudofields(input));
         if (builder.isHasMask()) {
-            extHdrBuilder.setMask(OxmDeserializerHelper
-                    .convertMask(input, EncodeConstants.SIZE_OF_SHORT_IN_BYTES));
+            extHdrBuilder.setMask(OxmDeserializerHelper.convertMask(input, Short.BYTES));
         }
         caseBuilder.setIpv6Exthdr(extHdrBuilder.build());
         builder.setMatchEntryValue(caseBuilder.build());