Move ipv4/ipv6 ByteBuf utilities to Ipv{4,6}Util
[bgpcep.git] / bgp / extensions / flowspec / src / main / java / org / opendaylight / protocol / bgp / flowspec / extended / communities / RedirectIpv4EcHandler.java
index d31b5eed5a78e80fc6bc3ed19dfcc25110eff25b..3c3cf7ec4b8d477c9fbab88518f0f703691f3369 100644 (file)
@@ -12,7 +12,6 @@ import static com.google.common.base.Preconditions.checkArgument;
 import io.netty.buffer.ByteBuf;
 import org.opendaylight.protocol.bgp.parser.spi.extended.community.ExtendedCommunityParser;
 import org.opendaylight.protocol.bgp.parser.spi.extended.community.ExtendedCommunitySerializer;
-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.redirect.ipv4.extended.community.RedirectIpv4;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.redirect.ipv4.extended.community.RedirectIpv4Builder;
@@ -31,7 +30,7 @@ public class RedirectIpv4EcHandler implements ExtendedCommunityParser, ExtendedC
                 "The extended community %s is not RedirectIpv4ExtendedCommunityCase type.", extendedCommunity);
         final RedirectIpv4 redirect = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec
                 .rev180329.RedirectIpv4ExtendedCommunity) extendedCommunity).getRedirectIpv4();
-        ByteBufWriteUtil.writeIpv4Address(redirect.getGlobalAdministrator(), byteAggregator);
+        Ipv4Util.writeIpv4Address(redirect.getGlobalAdministrator(), byteAggregator);
         ByteBufUtils.writeOrZero(byteAggregator, redirect.getLocalAdministrator());
     }