X-Git-Url: https://git.opendaylight.org/gerrit/gitweb?a=blobdiff_plain;f=bgp%2Fparser-spi%2Fsrc%2Fmain%2Fjava%2Forg%2Fopendaylight%2Fprotocol%2Fbgp%2Fparser%2Fspi%2Fpojo%2FSimpleExtendedCommunityRegistry.java;h=14a0fc877d7a5d6afca543ccef6b2d21a8080c6e;hb=0fdeddbe3d072a88428599421191f0f60b2864e4;hp=eb8a87a918ef09060b5d6ebd1d3575597f6b28a6;hpb=310f15691a6235382a40320faaca6e5a6e3a4484;p=bgpcep.git diff --git a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleExtendedCommunityRegistry.java b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleExtendedCommunityRegistry.java index eb8a87a918..14a0fc877d 100644 --- a/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleExtendedCommunityRegistry.java +++ b/bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleExtendedCommunityRegistry.java @@ -19,9 +19,8 @@ import org.opendaylight.protocol.bgp.parser.spi.extended.community.ExtendedCommu import org.opendaylight.protocol.bgp.parser.spi.extended.community.ExtendedCommunityRegistry; import org.opendaylight.protocol.bgp.parser.spi.extended.community.ExtendedCommunitySerializer; import org.opendaylight.protocol.concepts.HandlerRegistry; -import org.opendaylight.protocol.util.ByteBufWriteUtil; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.ExtendedCommunities; -import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.attributes.ExtendedCommunitiesBuilder; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.ExtendedCommunities; +import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev200120.path.attributes.attributes.ExtendedCommunitiesBuilder; import org.opendaylight.yangtools.concepts.Registration; import org.opendaylight.yangtools.yang.binding.DataContainer; import org.slf4j.Logger; @@ -64,14 +63,13 @@ final class SimpleExtendedCommunityRegistry implements ExtendedCommunityRegistry if (serializer == null) { return; } - ByteBufWriteUtil.writeUnsignedByte(Shorts.checkedCast(serializer.getType(extendedCommunity.isTransitive())), - byteAggregator); - ByteBufWriteUtil.writeUnsignedByte(Shorts.checkedCast(serializer.getSubType()), byteAggregator); + byteAggregator.writeByte(Shorts.checkedCast(serializer.getType(extendedCommunity.isTransitive()))); + byteAggregator.writeByte(Shorts.checkedCast(serializer.getSubType())); serializer.serializeExtendedCommunity(extendedCommunity.getExtendedCommunity(), byteAggregator); } synchronized Registration registerExtendedCommunitySerializer( - final Class extendedCommunityClass, final ExtendedCommunitySerializer serializer) { return this.handlers.registerSerializer(extendedCommunityClass, serializer);