Move ipv4/ipv6 ByteBuf utilities to Ipv{4,6}Util
[bgpcep.git] / bgp / extensions / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / handlers / FSIpv4DestinationPrefixHandler.java
index f12849d14511a746dff2e5bfd693e0eb66c83d85..1c5ed2b4b305f672aee909dca761680a7a4a3f63 100644 (file)
@@ -11,7 +11,6 @@ import static com.google.common.base.Preconditions.checkArgument;
 import static java.util.Objects.requireNonNull;
 
 import io.netty.buffer.ByteBuf;
-import org.opendaylight.protocol.util.ByteBufWriteUtil;
 import org.opendaylight.protocol.util.Ipv4Util;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.flowspec.FlowspecType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.flowspec.destination.group.ipv4.flowspec.flowspec.type.DestinationPrefixCase;
@@ -24,7 +23,7 @@ public final class FSIpv4DestinationPrefixHandler implements FlowspecTypeParser,
     public void serializeType(final FlowspecType value, final ByteBuf output) {
         checkArgument(value instanceof DestinationPrefixCase, "DestinationPrefixCase class is mandatory!");
         output.writeByte(DESTINATION_PREFIX_VALUE);
-        ByteBufWriteUtil.writeMinimalPrefix(((DestinationPrefixCase) value).getDestinationPrefix(), output);
+        Ipv4Util.writeMinimalPrefix(((DestinationPrefixCase) value).getDestinationPrefix(), output);
     }
 
     @Override