Add ByteBufUtils
[bgpcep.git] / bgp / extensions / evpn / src / main / java / org / opendaylight / protocol / bgp / evpn / impl / esi / types / ASGenParser.java
index bf63114936bab8674f5a31f81c92d51177518c2e..da03b1a9b4aef5d25fde6f89f2313606bdb3e24a 100644 (file)
@@ -13,6 +13,7 @@ import static org.opendaylight.protocol.bgp.evpn.impl.esi.types.EsiModelUtil.ext
 import static org.opendaylight.protocol.util.ByteBufWriteUtil.writeUnsignedInt;
 
 import io.netty.buffer.ByteBuf;
+import org.opendaylight.protocol.util.ByteBufUtils;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.AsNumber;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.EsiType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.esi.Esi;
@@ -52,8 +53,8 @@ final class ASGenParser extends AbstractEsiType {
     public Esi parseEsi(final ByteBuf buffer) {
         return new AsGeneratedCaseBuilder()
                 .setAsGenerated(new AsGeneratedBuilder()
-                    .setAs(new AsNumber(buffer.readUnsignedInt()))
-                    .setLocalDiscriminator(buffer.readUnsignedInt())
+                    .setAs(new AsNumber(ByteBufUtils.readUint32(buffer)))
+                    .setLocalDiscriminator(ByteBufUtils.readUint32(buffer))
                     .build())
                 .build();
     }