Remove deprecated method 66/71166/6
authorClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Fri, 20 Apr 2018 11:41:14 +0000 (13:41 +0200)
committerClaudio D. Gasparini <claudio.gasparini@pantheon.tech>
Wed, 25 Apr 2018 08:31:55 +0000 (10:31 +0200)
Change-Id: I076db42eb6737d9712fe400958b4c9f56476fb93
Signed-off-by: Claudio D. Gasparini <claudio.gasparini@pantheon.tech>
24 files changed:
bgp/evpn/src/main/java/org/opendaylight/protocol/bgp/evpn/impl/nlri/EvpnNlriParser.java
bgp/evpn/src/test/java/org/opendaylight/protocol/bgp/evpn/impl/nlri/EvpnNlriParserTest.java
bgp/flowspec/src/main/java/org/opendaylight/protocol/bgp/flowspec/AbstractFlowspecNlriParser.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/FlowspecL3vpnIpv4NlriParserTest.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/FlowspecL3vpnIpv6NlriParserTest.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/SimpleFlowspecIpv4NlriParserTest.java
bgp/flowspec/src/test/java/org/opendaylight/protocol/bgp/flowspec/SimpleFlowspecIpv6NlriParserTest.java
bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/codec/Ipv4NlriParser.java
bgp/inet/src/main/java/org/opendaylight/protocol/bgp/inet/codec/Ipv6NlriParser.java
bgp/inet/src/test/java/org/opendaylight/protocol/bgp/inet/codec/Ipv4NlriParserTest.java
bgp/l3vpn/src/main/java/org/opendaylight/protocol/bgp/l3vpn/AbstractVpnNlriParser.java
bgp/l3vpn/src/test/java/org/opendaylight/protocol/bgp/l3vpn/ipv4/VpnIpv4NlriParserTest.java
bgp/l3vpn/src/test/java/org/opendaylight/protocol/bgp/l3vpn/ipv6/VpnIpv6NlriParserTest.java
bgp/labeled-unicast/src/main/java/org/opendaylight/protocol/bgp/labeled/unicast/LUNlriParser.java
bgp/labeled-unicast/src/test/java/org/opendaylight/protocol/bgp/labeled/unicast/LUNlriParserTest.java
bgp/linkstate/src/main/java/org/opendaylight/protocol/bgp/linkstate/impl/nlri/LinkstateNlriParser.java
bgp/linkstate/src/test/java/org/opendaylight/protocol/bgp/linkstate/LinkstateNlriParserTest.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/MPReachAttributeParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/MPUnreachAttributeParser.java
bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ReachAttributeParser.java [new file with mode: 0644]
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/AttributeParser.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/NlriParser.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/NlriRegistry.java
bgp/parser-spi/src/main/java/org/opendaylight/protocol/bgp/parser/spi/pojo/SimpleNlriRegistry.java

index 1e3a6dc1ac5a7beca393495221e7664437e35b2f..fbd2b6e542b6da6213ee9c87680ddbb4ed6ddca6 100644 (file)
@@ -22,6 +22,7 @@ import org.opendaylight.protocol.bgp.evpn.spi.pojo.SimpleEvpnNlriRegistry;
 import org.opendaylight.protocol.bgp.parser.BGPParsingException;
 import org.opendaylight.protocol.bgp.parser.spi.NlriParser;
 import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
+import org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.NlriType;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.evpn.EvpnChoice;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.evpn.rev180329.evpn.destination.EvpnDestination;
@@ -79,7 +80,8 @@ public final class EvpnNlriParser implements NlriParser, NlriSerializer {
     }
 
     @Override
-    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) throws BGPParsingException {
+    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder,
+            final PeerSpecificParserConstraint constraint) throws BGPParsingException {
         if (!nlri.isReadable()) {
             return;
         }
@@ -94,7 +96,8 @@ public final class EvpnNlriParser implements NlriParser, NlriSerializer {
     }
 
     @Override
-    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) throws BGPParsingException {
+    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder,
+            final PeerSpecificParserConstraint constraint) throws BGPParsingException {
         if (!nlri.isReadable()) {
             return;
         }
index 9967e6576e27536bf2b2a4f201ea1eae13116392..731adc69a1d039b8145b830121e5c6caf5b1eb2d 100644 (file)
@@ -50,7 +50,7 @@ public class EvpnNlriParserTest {
     private List<EvpnDestination> dest;
     private EvpnNlriParser parser;
 
-    static ChoiceNode createMACIpAdvChoice() {
+    private static ChoiceNode createMACIpAdvChoice() {
         final DataContainerNodeBuilder<NodeIdentifier, ChoiceNode> choice = Builders.choiceBuilder();
         choice.withNodeIdentifier(EVPN_CHOICE_NID);
         return choice.addChild(MACIpAdvRParserTest.createMacIpCont()).build();
@@ -67,7 +67,7 @@ public class EvpnNlriParserTest {
     }
 
     @Test
-    public void testSerializeNlri() throws BGPParsingException {
+    public void testSerializeNlri() {
         final ByteBuf buffer = Unpooled.buffer();
         EvpnNlriParser.serializeNlri(this.dest, buffer);
         assertArrayEquals(IncMultEthTagRParserTest.RESULT, ByteArray.getAllBytes(buffer));
@@ -77,7 +77,7 @@ public class EvpnNlriParserTest {
     @Test
     public void testMpUnreach() throws BGPParsingException {
         final MpUnreachNlriBuilder mpReach = new MpUnreachNlriBuilder();
-        this.parser.parseNlri(Unpooled.wrappedBuffer(IncMultEthTagRParserTest.RESULT), mpReach);
+        this.parser.parseNlri(Unpooled.wrappedBuffer(IncMultEthTagRParserTest.RESULT), mpReach, null);
         assertEquals(createUnreach(), mpReach.build());
     }
 
@@ -96,7 +96,7 @@ public class EvpnNlriParserTest {
     @Test
     public void testMpReach() throws BGPParsingException {
         final MpReachNlriBuilder mpReach = new MpReachNlriBuilder();
-        this.parser.parseNlri(Unpooled.wrappedBuffer(IncMultEthTagRParserTest.RESULT), mpReach);
+        this.parser.parseNlri(Unpooled.wrappedBuffer(IncMultEthTagRParserTest.RESULT), mpReach, null);
 
         final MpReachNlriBuilder mpReachExpected = new MpReachNlriBuilder();
         final AdvertizedRoutes wd = new AdvertizedRoutesBuilder().setDestinationType(new DestinationEvpnCaseBuilder()
@@ -109,19 +109,19 @@ public class EvpnNlriParserTest {
     @Test
     public void testNullMpReachNlri() throws BGPParsingException {
         final MpReachNlriBuilder mpb = new MpReachNlriBuilder();
-        this.parser.parseNlri(Unpooled.buffer(), mpb);
+        this.parser.parseNlri(Unpooled.buffer(), mpb, null);
         assertEquals(new MpReachNlriBuilder().build(), mpb.build());
     }
 
     @Test
     public void testNullMpUnReachNlri() throws BGPParsingException {
         final MpUnreachNlriBuilder mpb = new MpUnreachNlriBuilder();
-        this.parser.parseNlri(Unpooled.buffer(), mpb);
+        this.parser.parseNlri(Unpooled.buffer(), mpb, null);
         assertEquals(new MpUnreachNlriBuilder().build(), mpb.build());
     }
 
     @Test
-    public void testExtractEvpnDestination() throws BGPParsingException {
+    public void testExtractEvpnDestination() {
         final DataContainerNodeAttrBuilder<NodeIdentifier, UnkeyedListEntryNode> evpnBI =
                 ImmutableUnkeyedListEntryNodeBuilder.create();
         evpnBI.withNodeIdentifier(EVPN_NID);
@@ -135,7 +135,7 @@ public class EvpnNlriParserTest {
     }
 
     @Test
-    public void testExtractRouteKey() throws BGPParsingException {
+    public void testExtractRouteKey() {
         final DataContainerNodeAttrBuilder<NodeIdentifier, UnkeyedListEntryNode> evpnBI =
                 ImmutableUnkeyedListEntryNodeBuilder.create();
         evpnBI.withNodeIdentifier(EVPN_CHOICE_NID);
index be4190a3de1862d3fb90685c3cfdbe8c4b7411f0..5293646ff7a225dcabfeb593253c9ca7c9d71ace 100644 (file)
@@ -136,9 +136,9 @@ public abstract class AbstractFlowspecNlriParser implements NlriParser, NlriSeri
     /**
      * Add this constant to length value to achieve all ones in the leftmost nibble.
      */
-    protected static final int LENGTH_MAGIC = 61440;
-    protected static final int MAX_NLRI_LENGTH = 0xFFF;
-    protected static final int MAX_NLRI_LENGTH_ONE_BYTE = 0xF0;
+    private static final int LENGTH_MAGIC = 61440;
+    private static final int MAX_NLRI_LENGTH = 0xFFF;
+    private static final int MAX_NLRI_LENGTH_ONE_BYTE = 0xF0;
 
     @VisibleForTesting
     static final String DO_NOT_VALUE = "do-not";
@@ -203,16 +203,6 @@ public abstract class AbstractFlowspecNlriParser implements NlriParser, NlriSeri
         }
     }
 
-    @Override
-    public final void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) throws BGPParsingException {
-        parseNlri(nlri, builder, null);
-    }
-
-    @Override
-    public final void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) throws BGPParsingException {
-        parseNlri(nlri, builder, null);
-    }
-
     protected void serializeNlri(@Nonnull final Object[] nlriFields, @Nonnull final ByteBuf buffer) {
         final List<Flowspec> flowspecList = (List<Flowspec>) nlriFields[0];
         serializeNlri(flowspecList, buffer);
index be15e47b3414b5f6821ba6e7c41450f059668329..1009df91dec5bd4baa50b9c5a68e8bcf8eb587c8 100644 (file)
@@ -206,7 +206,7 @@ public class FlowspecL3vpnIpv4NlriParserTest {
         final MpReachNlriBuilder result = new MpReachNlriBuilder();
         result.setAfi(Ipv4AddressFamily.class);
         result.setSafi(FlowspecL3vpnSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result);
+        parser.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result, null);
 
         final DestinationFlowspecL3vpnIpv4 flowspecDst = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecL3vpnIpv4Case) result.getAdvertizedRoutes().getDestinationType())
             .getDestinationFlowspecL3vpnIpv4();
@@ -377,7 +377,7 @@ public class FlowspecL3vpnIpv4NlriParserTest {
         final MpUnreachNlriBuilder result = new MpUnreachNlriBuilder();
         result.setAfi(Ipv4AddressFamily.class);
         result.setSafi(FlowspecL3vpnSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result);
+        parser.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result, null);
 
         DestinationFlowspecL3vpnIpv4 flowspecDst = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecL3vpnIpv4Case) result.getWithdrawnRoutes().getDestinationType())
             .getDestinationFlowspecL3vpnIpv4();
index 884844b857cd74dc74568b044d3039dd1e6b3553..4273ca4e368f1412ab52ed15048b2f2e711433dd 100644 (file)
@@ -147,7 +147,7 @@ public class FlowspecL3vpnIpv6NlriParserTest {
         final MpReachNlriBuilder result = new MpReachNlriBuilder();
         result.setAfi(Ipv6AddressFamily.class);
         result.setSafi(FlowspecL3vpnSubsequentAddressFamily.class);
-        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result);
+        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result, null);
 
         DestinationFlowspecL3vpnIpv6 flowspecDst = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecL3vpnIpv6Case) result.getAdvertizedRoutes().getDestinationType())
             .getDestinationFlowspecL3vpnIpv6();
@@ -252,7 +252,7 @@ public class FlowspecL3vpnIpv6NlriParserTest {
         final MpUnreachNlriBuilder result = new MpUnreachNlriBuilder();
         result.setAfi(Ipv6AddressFamily.class);
         result.setSafi(FlowspecL3vpnSubsequentAddressFamily.class);
-        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result);
+        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result, null);
 
         final DestinationFlowspecL3vpnIpv6 flowspecDst = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecL3vpnIpv6Case) result.getWithdrawnRoutes().getDestinationType())
             .getDestinationFlowspecL3vpnIpv6();
index 037378e91fcfc2beeef7873f25896f2369f95692..c44ae2cddf91643ebe9813a0b262c9af1ebef731 100644 (file)
@@ -210,7 +210,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
         final MpReachNlriBuilder result = new MpReachNlriBuilder();
         result.setAfi(Ipv4AddressFamily.class);
         result.setSafi(FlowspecSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result);
+        parser.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result, null);
 
         final List<Flowspec> flows = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecCase) result.getAdvertizedRoutes().getDestinationType())
             .getDestinationFlowspec()
@@ -365,7 +365,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
         final MpUnreachNlriBuilder result = new MpUnreachNlriBuilder();
         result.setAfi(Ipv4AddressFamily.class);
         result.setSafi(FlowspecSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result);
+        parser.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result, null);
 
         final List<Flowspec> flows = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecCase) result.getWithdrawnRoutes().getDestinationType())
             .getDestinationFlowspec()
@@ -772,7 +772,7 @@ public class SimpleFlowspecIpv4NlriParserTest {
         result.setAfi(Ipv4AddressFamily.class);
         result.setSafi(FlowspecSubsequentAddressFamily.class);
 
-        parser.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI_BATCHED), result);
+        parser.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI_BATCHED), result, null);
         final MpReachNlri nlri = result.build();
 
         final List<Flowspec> flowspecList = ((DestinationFlowspecCase) nlri.getAdvertizedRoutes().getDestinationType())
index b1cc821d0568535c1e40aa8b46fb968acd3b4672..e865c2cd4f4a0ae68a9a04fc57f76c06fcebe504 100644 (file)
@@ -150,7 +150,7 @@ public class SimpleFlowspecIpv6NlriParserTest {
         final MpReachNlriBuilder result = new MpReachNlriBuilder();
         result.setAfi(Ipv6AddressFamily.class);
         result.setSafi(FlowspecSubsequentAddressFamily.class);
-        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result);
+        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(REACHED_NLRI), result, null);
 
         final List<Flowspec> flows = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.reach.nlri.advertized.routes.destination.type.DestinationFlowspecIpv6Case) result.getAdvertizedRoutes().getDestinationType())
             .getDestinationFlowspec().getFlowspec();
@@ -244,7 +244,7 @@ public class SimpleFlowspecIpv6NlriParserTest {
         final MpUnreachNlriBuilder result = new MpUnreachNlriBuilder();
         result.setAfi(Ipv6AddressFamily.class);
         result.setSafi(FlowspecSubsequentAddressFamily.class);
-        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result);
+        this.FS_PARSER.parseNlri(Unpooled.wrappedBuffer(UNREACHED_NLRI), result, null);
 
         final List<Flowspec> flows = ((org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.flowspec.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationFlowspecIpv6Case) result.getWithdrawnRoutes().getDestinationType())
             .getDestinationFlowspec().getFlowspec();
index e8fe494786792f92d047e885da69439e1e9a11ad..b317937e31e3135cd3d24e74509e2c65ebca8e7c 100644 (file)
@@ -55,16 +55,6 @@ public final class Ipv4NlriParser implements NlriParser, NlriSerializer {
         return new DestinationIpv4Builder().setIpv4Prefixes(prefixes).build();
     }
 
-    @Override
-    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) {
-        parseNlri(nlri, builder, null);
-    }
-
-    @Override
-    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) {
-        parseNlri(nlri, builder, null);
-    }
-
     @Override
     public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder,
             final PeerSpecificParserConstraint constraint) {
index ffada5e2ca342a4d282d8019ed286ad50f1971cc..e8ca321ecc3293d7eec853dae9c1a45d0e060e77 100644 (file)
@@ -12,7 +12,6 @@ import com.google.common.base.Preconditions;
 import io.netty.buffer.ByteBuf;
 import java.util.ArrayList;
 import java.util.List;
-import org.opendaylight.protocol.bgp.parser.BGPParsingException;
 import org.opendaylight.protocol.bgp.parser.BgpTableTypeImpl;
 import org.opendaylight.protocol.bgp.parser.spi.MultiPathSupportUtil;
 import org.opendaylight.protocol.bgp.parser.spi.NlriParser;
@@ -58,16 +57,6 @@ public final class Ipv6NlriParser implements NlriParser, NlriSerializer {
         return new DestinationIpv6Builder().setIpv6Prefixes(prefixes).build();
     }
 
-    @Override
-    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) throws BGPParsingException {
-        parseNlri(nlri, builder, null);
-    }
-
-    @Override
-    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) throws BGPParsingException {
-        parseNlri(nlri, builder, null);
-    }
-
     @Override
     public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder,
             final PeerSpecificParserConstraint constraint) {
index 18710dd86870977970203e12105767d5a5531911..b70f54948379f7aad129369a7d961f335f0aeb67 100644 (file)
@@ -128,7 +128,7 @@ public class Ipv4NlriParserTest {
     public void parseUnreachedNlriTest() {
         final MpUnreachNlriBuilder b = new MpUnreachNlriBuilder();
         b.setAfi(Ipv4AddressFamily.class).setSafi(UnicastSubsequentAddressFamily.class);
-        this.parser.parseNlri(this.inputBytes, b);
+        this.parser.parseNlri(this.inputBytes, b, null);
         assertNotNull("Withdrawn routes, destination type should not be null", b.getWithdrawnRoutes()
                 .getDestinationType());
 
@@ -143,7 +143,7 @@ public class Ipv4NlriParserTest {
     public void parseReachedNlriTest() throws BGPParsingException {
         final MpReachNlriBuilder b = new MpReachNlriBuilder();
         b.setAfi(Ipv4AddressFamily.class).setSafi(UnicastSubsequentAddressFamily.class);
-        this.parser.parseNlri(this.inputBytes, b);
+        this.parser.parseNlri(this.inputBytes, b, null);
         assertNotNull("Advertized routes, destination type should not be null", b.getAdvertizedRoutes()
                 .getDestinationType());
 
index 92a5240701342920002d1c2cbf6cd54ad79c5ad0..a61e82b701ab1f6498585857473ba0f0f3cd7f3b 100644 (file)
@@ -16,6 +16,7 @@ import org.opendaylight.protocol.bgp.labeled.unicast.LUNlriParser;
 import org.opendaylight.protocol.bgp.parser.BGPParsingException;
 import org.opendaylight.protocol.bgp.parser.spi.NlriParser;
 import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
+import org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint;
 import org.opendaylight.yang.gen.v1.urn.ietf.params.xml.ns.yang.ietf.inet.types.rev130715.IpPrefix;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.labeled.unicast.rev180329.labeled.unicast.LabelStack;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.Attributes;
@@ -104,7 +105,8 @@ public abstract class AbstractVpnNlriParser implements NlriParser, NlriSerialize
     }
 
     @Override
-    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) throws BGPParsingException {
+    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder,
+            final PeerSpecificParserConstraint constraint) throws BGPParsingException {
         if (!nlri.isReadable()) {
             return;
         }
@@ -113,7 +115,8 @@ public abstract class AbstractVpnNlriParser implements NlriParser, NlriSerialize
     }
 
     @Override
-    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) throws BGPParsingException {
+    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder,
+            final PeerSpecificParserConstraint constraint) throws BGPParsingException {
         if (!nlri.isReadable()) {
             return;
         }
index 4c700303bfb8447c7501623c85a827d3c0300732..e7870a64f2938a96c183072c94aa82cee5dc2cdd 100755 (executable)
@@ -103,7 +103,7 @@ public class VpnIpv4NlriParserTest {
 
         final MpReachNlriBuilder testBuilder = new MpReachNlriBuilder();
         testBuilder.setAfi(Ipv4AddressFamily.class);
-        PARSER.parseNlri(Unpooled.copiedBuffer(REACH_NLRI), testBuilder);
+        PARSER.parseNlri(Unpooled.copiedBuffer(REACH_NLRI), testBuilder, null);
         Assert.assertEquals(mpReachExpected, testBuilder.build());
 
         final ByteBuf output = Unpooled.buffer();
@@ -138,7 +138,7 @@ public class VpnIpv4NlriParserTest {
 
         final MpUnreachNlriBuilder testBuilder = new MpUnreachNlriBuilder();
         testBuilder.setAfi(Ipv4AddressFamily.class);
-        PARSER.parseNlri(Unpooled.copiedBuffer(UNREACH_NLRI), testBuilder);
+        PARSER.parseNlri(Unpooled.copiedBuffer(UNREACH_NLRI), testBuilder, null);
         Assert.assertEquals(mpUnreachExpected1, testBuilder.build());
 
         final ByteBuf output = Unpooled.buffer();
index ff2120c3d548b6e3446396563e8b65a982853e70..a46dc0c4e305fdf238ae0f150097595d33ac2236 100755 (executable)
@@ -102,7 +102,7 @@ public class VpnIpv6NlriParserTest {
 
         final MpReachNlriBuilder testBuilder = new MpReachNlriBuilder();
         testBuilder.setAfi(Ipv6AddressFamily.class);
-        PARSER.parseNlri(Unpooled.copiedBuffer(REACH_NLRI), testBuilder);
+        PARSER.parseNlri(Unpooled.copiedBuffer(REACH_NLRI), testBuilder, null);
         Assert.assertEquals(mpReachExpected, testBuilder.build());
 
         final ByteBuf output = Unpooled.buffer();
@@ -137,7 +137,7 @@ public class VpnIpv6NlriParserTest {
 
         final MpUnreachNlriBuilder testBuilder = new MpUnreachNlriBuilder();
         testBuilder.setAfi(Ipv6AddressFamily.class);
-        PARSER.parseNlri(Unpooled.copiedBuffer(UNREACH_NLRI), testBuilder);
+        PARSER.parseNlri(Unpooled.copiedBuffer(UNREACH_NLRI), testBuilder, null);
         Assert.assertEquals(mpUnreachExpected1, testBuilder.build());
 
         final ByteBuf output = Unpooled.buffer();
index e88a7a56b8b47b74f2b88f7e25cf034fe42ab513..59f546dbe68bca56f471b3efcc0ddda8f80047ce 100644 (file)
@@ -158,11 +158,6 @@ public class LUNlriParser implements NlriParser, NlriSerializer {
         return ByteArray.readAllBytes(buffer);
     }
 
-    @Override
-    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) throws BGPParsingException {
-        parseNlri(nlri, builder, null);
-    }
-
     private static List<CLabeledUnicastDestination> parseNlri(final ByteBuf nlri, final Class<? extends AddressFamily> afi, final boolean mPathSupported) {
         if (!nlri.isReadable()) {
             return null;
@@ -213,11 +208,6 @@ public class LUNlriParser implements NlriParser, NlriSerializer {
         return labels;
     }
 
-    @Override
-    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) throws BGPParsingException {
-        parseNlri(nlri, builder, null);
-    }
-
     @Override
     public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder,
         final PeerSpecificParserConstraint constraint) throws BGPParsingException {
index e81daaf2ae948c0f522458b1623415bc4def9836..66f593bfe8af86d617508e0600b2735b4f8dedcd 100755 (executable)
@@ -244,7 +244,7 @@ public class LUNlriParserTest {
         final MpReachNlriBuilder testBuilder = new MpReachNlriBuilder();
         testBuilder.setAfi(Ipv4AddressFamily.class);
         testBuilder.setSafi(LabeledUnicastSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.copiedBuffer(LU_REACH_NLRI_IPv4), testBuilder);
+        parser.parseNlri(Unpooled.copiedBuffer(LU_REACH_NLRI_IPv4), testBuilder, null);
         assertEquals(mpReachExpected, testBuilder.build());
 
         //test serializer
@@ -317,7 +317,7 @@ public class LUNlriParserTest {
         final MpUnreachNlriBuilder testBuilder = new MpUnreachNlriBuilder();
         testBuilder.setAfi(Ipv4AddressFamily.class);
         testBuilder.setSafi(LabeledUnicastSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.copiedBuffer(LU_UNREACH_NLRI_IPv4), testBuilder);
+        parser.parseNlri(Unpooled.copiedBuffer(LU_UNREACH_NLRI_IPv4), testBuilder, null);
         assertEquals(mpUnreachExpected1, testBuilder.build());
 
         //test serializer
@@ -401,7 +401,7 @@ public class LUNlriParserTest {
         final MpReachNlriBuilder testBuilder = new MpReachNlriBuilder();
         testBuilder.setAfi(Ipv6AddressFamily.class);
         testBuilder.setSafi(LabeledUnicastSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.copiedBuffer(LU_REACH_NLRI_IPv6), testBuilder);
+        parser.parseNlri(Unpooled.copiedBuffer(LU_REACH_NLRI_IPv6), testBuilder, null);
         assertEquals(mpReachExpected, testBuilder.build());
 
         //test serializer
@@ -472,7 +472,7 @@ public class LUNlriParserTest {
         final MpUnreachNlriBuilder testBuilder = new MpUnreachNlriBuilder();
         testBuilder.setAfi(Ipv6AddressFamily.class);
         testBuilder.setSafi(LabeledUnicastSubsequentAddressFamily.class);
-        parser.parseNlri(Unpooled.copiedBuffer(LU_UNREACH_NLRI_IPv6), testBuilder);
+        parser.parseNlri(Unpooled.copiedBuffer(LU_UNREACH_NLRI_IPv6), testBuilder, null);
         assertEquals(mpUnreachExpected1, testBuilder.build());
 
         //test serializer
index 60e5e98caf02ceffe493435b9a42a1703be2f3e2..06900ab43b9abcdbfa2bb005cc2741a140712637 100644 (file)
@@ -20,6 +20,7 @@ import org.opendaylight.protocol.bgp.linkstate.spi.pojo.SimpleNlriTypeRegistry;
 import org.opendaylight.protocol.bgp.parser.BGPParsingException;
 import org.opendaylight.protocol.bgp.parser.spi.NlriParser;
 import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
+import org.opendaylight.protocol.bgp.parser.spi.PeerSpecificParserConstraint;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.Identifier;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.ProtocolId;
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.linkstate.ObjectType;
@@ -105,20 +106,25 @@ public final class LinkstateNlriParser implements NlriParser, NlriSerializer {
     }
 
     @Override
-    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder) throws BGPParsingException {
+    public void parseNlri(final ByteBuf nlri, final MpUnreachNlriBuilder builder,
+            final PeerSpecificParserConstraint constraint) throws BGPParsingException {
         if (!nlri.isReadable()) {
             return;
         }
         final List<CLinkstateDestination> dst = parseNlri(nlri);
 
         builder.setWithdrawnRoutes(new WithdrawnRoutesBuilder().setDestinationType(
-            new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationLinkstateCaseBuilder().setDestinationLinkstate(
-                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination.type.destination.linkstate._case.DestinationLinkstateBuilder().setCLinkstateDestination(
-                    dst).build()).build()).build());
+                new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.linkstate.rev180329.update
+                        .attributes.mp.unreach.nlri.withdrawn.routes.destination.type.DestinationLinkstateCaseBuilder()
+                        .setDestinationLinkstate(new org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang
+                                .bgp.linkstate.rev180329.update.attributes.mp.unreach.nlri.withdrawn.routes.destination
+                                .type.destination.linkstate._case.DestinationLinkstateBuilder()
+                                .setCLinkstateDestination(dst).build()).build()).build());
     }
 
     @Override
-    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder) throws BGPParsingException {
+    public void parseNlri(final ByteBuf nlri, final MpReachNlriBuilder builder,
+            final PeerSpecificParserConstraint constraint) throws BGPParsingException {
         if (!nlri.isReadable()) {
             return;
         }
index 3941abf975eaea74c124bc64ed911f18a0c8cdf1..edfde7ce7eacd65d80b830d17cc829aad2386f76 100644 (file)
@@ -150,7 +150,7 @@ public class LinkstateNlriParserTest {
         final BGPExtensionProviderContext context = new SimpleBGPExtensionProviderContext();
         act.start(context);
 
-        parser.parseNlri(Unpooled.copiedBuffer(data), builder);
+        parser.parseNlri(Unpooled.copiedBuffer(data), builder, null);
 
         final DestinationLinkstate ls = ((DestinationLinkstateCase) builder.getAdvertizedRoutes().getDestinationType()).getDestinationLinkstate();
         assertEquals(1, ls.getCLinkstateDestination().size());
index 7e39d33e88a4a0102de69aea00613ed829e189bf..dbc7416c06e18c84d19d4faae1a4a51c5b30aeb4 100644 (file)
@@ -15,8 +15,6 @@ import io.netty.buffer.Unpooled;
 import org.opendaylight.protocol.bgp.parser.BGPDocumentedException;
 import org.opendaylight.protocol.bgp.parser.BGPError;
 import org.opendaylight.protocol.bgp.parser.BGPParsingException;
-import org.opendaylight.protocol.bgp.parser.spi.AttributeParser;
-import org.opendaylight.protocol.bgp.parser.spi.AttributeSerializer;
 import org.opendaylight.protocol.bgp.parser.spi.AttributeUtil;
 import org.opendaylight.protocol.bgp.parser.spi.NlriRegistry;
 import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
@@ -28,8 +26,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mult
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpReachNlri;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 
-
-public final class MPReachAttributeParser implements AttributeParser, AttributeSerializer {
+public final class MPReachAttributeParser extends ReachAttributeParser{
 
     public static final int TYPE = 14;
 
@@ -40,12 +37,10 @@ public final class MPReachAttributeParser implements AttributeParser, AttributeS
     }
 
     @Override
-    public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder) throws BGPDocumentedException {
-        parseAttribute(buffer, builder, null);
-    }
-
-    @Override
-    public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder, final PeerSpecificParserConstraint constraint)
+    public void parseAttribute(
+            final ByteBuf buffer,
+            final AttributesBuilder builder,
+            final PeerSpecificParserConstraint constraint)
             throws BGPDocumentedException {
         try {
             final MpReachNlri mpReachNlri = this.reg.parseMpReach(buffer, constraint);
@@ -58,7 +53,8 @@ public final class MPReachAttributeParser implements AttributeParser, AttributeS
 
     @Override
     public void serializeAttribute(final DataObject attribute, final ByteBuf byteAggregator) {
-        Preconditions.checkArgument(attribute instanceof Attributes, "Attribute parameter is not a PathAttribute object.");
+        Preconditions.checkArgument(attribute instanceof Attributes,
+                "Attribute parameter is not a PathAttribute object.");
         final Attributes pathAttributes = (Attributes) attribute;
         final Attributes1 pathAttributes1 = pathAttributes.getAugmentation(Attributes1.class);
         if (pathAttributes1 == null) {
index 5f973f2330cc7510574162a953772407dd26b0fe..45b6cfe5530c73ff66ed56e16f4c05b90b114c99 100644 (file)
@@ -15,8 +15,6 @@ import io.netty.buffer.Unpooled;
 import org.opendaylight.protocol.bgp.parser.BGPDocumentedException;
 import org.opendaylight.protocol.bgp.parser.BGPError;
 import org.opendaylight.protocol.bgp.parser.BGPParsingException;
-import org.opendaylight.protocol.bgp.parser.spi.AttributeParser;
-import org.opendaylight.protocol.bgp.parser.spi.AttributeSerializer;
 import org.opendaylight.protocol.bgp.parser.spi.AttributeUtil;
 import org.opendaylight.protocol.bgp.parser.spi.NlriRegistry;
 import org.opendaylight.protocol.bgp.parser.spi.NlriSerializer;
@@ -28,7 +26,7 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mult
 import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.multiprotocol.rev180329.update.attributes.MpUnreachNlri;
 import org.opendaylight.yangtools.yang.binding.DataObject;
 
-public final class MPUnreachAttributeParser implements AttributeParser, AttributeSerializer {
+public final class MPUnreachAttributeParser extends ReachAttributeParser {
     public static final int TYPE = 15;
 
     private final NlriRegistry reg;
@@ -38,12 +36,10 @@ public final class MPUnreachAttributeParser implements AttributeParser, Attribut
     }
 
     @Override
-    public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder) throws BGPDocumentedException {
-        parseAttribute(buffer, builder, null);
-    }
-
-    @Override
-    public void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder, final PeerSpecificParserConstraint constraint)
+    public void parseAttribute(
+            final ByteBuf buffer,
+            final AttributesBuilder builder,
+            final PeerSpecificParserConstraint constraint)
             throws BGPDocumentedException {
         try {
             final MpUnreachNlri mpUnreachNlri = this.reg.parseMpUnreach(buffer, constraint);
@@ -56,7 +52,8 @@ public final class MPUnreachAttributeParser implements AttributeParser, Attribut
 
     @Override
     public void serializeAttribute(final DataObject attribute, final ByteBuf byteAggregator) {
-        Preconditions.checkArgument(attribute instanceof Attributes, "Attribute parameter is not a PathAttribute object.");
+        Preconditions.checkArgument(attribute instanceof Attributes,
+                "Attribute parameter is not a PathAttribute object.");
         final Attributes pathAttributes = (Attributes) attribute;
         final Attributes2 pathAttributes2 = pathAttributes.getAugmentation(Attributes2.class);
         if (pathAttributes2 == null) {
diff --git a/bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ReachAttributeParser.java b/bgp/parser-impl/src/main/java/org/opendaylight/protocol/bgp/parser/impl/message/update/ReachAttributeParser.java
new file mode 100644 (file)
index 0000000..f623734
--- /dev/null
@@ -0,0 +1,27 @@
+/*
+ * Copyright (c) 2018 AT&T Intellectual Property. All rights reserved.
+ *
+ * This program and the accompanying materials are made available under the
+ * terms of the Eclipse Public License v1.0 which accompanies this distribution,
+ * and is available at http://www.eclipse.org/legal/epl-v10.html
+ */
+package org.opendaylight.protocol.bgp.parser.impl.message.update;
+
+import io.netty.buffer.ByteBuf;
+import org.opendaylight.protocol.bgp.parser.BGPDocumentedException;
+import org.opendaylight.protocol.bgp.parser.BGPParsingException;
+import org.opendaylight.protocol.bgp.parser.spi.AttributeParser;
+import org.opendaylight.protocol.bgp.parser.spi.AttributeSerializer;
+import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.message.rev180329.path.attributes.AttributesBuilder;
+
+/**
+ * @author Claudio D. Gasparini
+ */
+public abstract class ReachAttributeParser implements AttributeParser, AttributeSerializer {
+
+    @Override
+    public final void parseAttribute(final ByteBuf buffer, final AttributesBuilder builder)
+            throws BGPDocumentedException, BGPParsingException {
+        parseAttribute(buffer, builder, null);
+    }
+}
index 9915080d33d905e1da56141c809d03802691398f..81e7c7bf5aa78a495c872df418153b50dae54ad6 100644 (file)
@@ -25,7 +25,8 @@ public interface AttributeParser {
      * @param builder Path attributes builder. Guaranteed to contain all valid attributes whose type is numerically
      *        lower than this attribute's type.
      */
-    void parseAttribute(@Nonnull ByteBuf buffer, @Nonnull AttributesBuilder builder) throws BGPDocumentedException, BGPParsingException;
+    void parseAttribute(@Nonnull ByteBuf buffer, @Nonnull AttributesBuilder builder)
+            throws BGPDocumentedException, BGPParsingException;
 
     /**
      * Invokes {@link #parseAttribute(ByteBuf, AttributesBuilder)}, so the constraint is omitted. Override for specific parser behavior.
@@ -34,10 +35,13 @@ public interface AttributeParser {
      * @param builder Path attributes builder. Guaranteed to contain all valid attributes whose type is numerically
      *        lower than this attribute's type.
      * @param constraint Peer specific constraints.
-     * @throws BGPDocumentedException
-     * @throws BGPParsingException
+     * @throws BGPDocumentedException exception.
+     * @throws BGPParsingException exception.
      */
-    default void parseAttribute(@Nonnull final ByteBuf buffer, @Nonnull final AttributesBuilder builder, @Nullable final PeerSpecificParserConstraint constraint)
+    default void parseAttribute(
+            @Nonnull final ByteBuf buffer,
+            @Nonnull final AttributesBuilder builder,
+            @Nullable final PeerSpecificParserConstraint constraint)
             throws BGPDocumentedException, BGPParsingException {
         parseAttribute(buffer, builder);
     }
index 3ef44b96031635a9b846f32e08e50ab763d747d0..084257b52def49bd974ea6aab9bdcbd4b56fffc5 100644 (file)
@@ -18,48 +18,30 @@ import org.opendaylight.yang.gen.v1.urn.opendaylight.params.xml.ns.yang.bgp.mult
  * Common interface for NLRI parser implementation.
  */
 public interface NlriParser {
-
     /**
      * Parse MP UN_REACH NLRI from buffer.
      *
-     * @param nlri Encoded unreachabel NLRI in ByteBuf.
-     * @param builder MP UNREACH NLRI builder.
-     * @throws BGPParsingException
-     */
-    void parseNlri(@Nonnull ByteBuf nlri, @Nonnull MpUnreachNlriBuilder builder) throws BGPParsingException;
-
-    /**
-     * Parse MP REACH NLRI from buffer.
-     *
-     * @param nlri Encoded reachable NLRI in ByteBuf.
-     * @param builder MP REACH NLRI builder.
-     * @throws BGPParsingException
-     */
-    void parseNlri(@Nonnull ByteBuf nlri, @Nonnull MpReachNlriBuilder builder) throws BGPParsingException;
-
-    /**
-     * Invokes {@link #parseNlri(ByteBuf, MpReachNlriBuilder)}, so the constraint is omitted. Override for specific parser behavior.
-     *
      * @param nlri Encoded reachable NLRI in ByteBuf.
      * @param builder MP REACH NLRI builder.
      * @param constraint Peer specific constraints.
-     * @throws BGPParsingException
+     * @throws BGPParsingException exception.
      */
-    default void parseNlri(@Nonnull final ByteBuf nlri, @Nonnull final MpReachNlriBuilder builder, @Nullable final PeerSpecificParserConstraint constraint)
-            throws BGPParsingException {
-        parseNlri(nlri, builder);
-    }
-
+    void parseNlri(
+            @Nonnull final ByteBuf nlri,
+            @Nonnull final MpReachNlriBuilder builder,
+            @Nullable final PeerSpecificParserConstraint constraint)
+            throws BGPParsingException;
     /**
-     * Invokes {@link #parseNlri(ByteBuf, MpUnreachNlriBuilder)}, so the constraint is omitted. Override for specific parser behavior.
+     * Parse MP UN_REACH NLRI from buffer.
      *
      * @param nlri Encoded unreachable NLRI in ByteBuf.
      * @param builder MP UNREACH NLRI builder.
      * @param constraint Peer specific constraints.
-     * @throws BGPParsingException
+     * @throws BGPParsingException exception.
      */
-    default void parseNlri(@Nonnull final ByteBuf nlri, @Nonnull final MpUnreachNlriBuilder builder, @Nullable final PeerSpecificParserConstraint constraint)
-            throws BGPParsingException {
-        parseNlri(nlri, builder);
-    }
+    void parseNlri(
+            @Nonnull final ByteBuf nlri,
+            @Nonnull final MpUnreachNlriBuilder builder,
+            @Nullable final PeerSpecificParserConstraint constraint)
+            throws BGPParsingException;
 }
index 2f9f2a21af5dcf5d48af66969ccaaf147a6e87d2..e4f6e2a41796f592971750791302499aa45291e9 100644 (file)
@@ -27,7 +27,9 @@ public interface NlriRegistry {
      * @return Parsed reach NLRI.
      * @throws BGPParsingException
      */
-    @Nonnull MpReachNlri parseMpReach(@Nonnull ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException;
+    @Nonnull MpReachNlri parseMpReach(
+            @Nonnull ByteBuf buffer,
+            @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException;
 
     /**
      * Decode MP REACH NLRI Attribute.
@@ -36,7 +38,9 @@ public interface NlriRegistry {
      * @return Parsed unreach NLRI.
      * @throws BGPParsingException
      */
-    @Nonnull MpUnreachNlri parseMpUnreach(@Nonnull ByteBuf buffer, @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException;
+    @Nonnull MpUnreachNlri parseMpUnreach(
+            @Nonnull ByteBuf buffer,
+            @Nullable PeerSpecificParserConstraint constraint) throws BGPParsingException;
 
     /**
      * Encode BGP MP REACH NLRI Attribute.
index 367e54e8a0a1a2d37e21cc5903a688aeaf8931bb..c658949fd90e5285a082bfce6c9a2ceea9bdb1c7 100644 (file)
@@ -50,7 +50,8 @@ final class SimpleNlriRegistry implements NlriRegistry {
     private final ConcurrentMap<BgpTableType, NlriParser> handlers = new ConcurrentHashMap<>();
     private final ConcurrentMap<Class<? extends DataObject>, NlriSerializer> serializers = new ConcurrentHashMap<>();
     private final ConcurrentMap<BgpTableType, NextHopParserSerializer> nextHopParsers = new ConcurrentHashMap<>();
-    private final ConcurrentMap<Entry<Class<? extends CNextHop>, BgpTableType>, NextHopParserSerializer> nextHopSerializers = new ConcurrentHashMap<>();
+    private final ConcurrentMap<Entry<Class<? extends CNextHop>, BgpTableType>,
+            NextHopParserSerializer> nextHopSerializers = new ConcurrentHashMap<>();
     private final SubsequentAddressFamilyRegistry safiReg;
     private final AddressFamilyRegistry afiReg;
 
@@ -112,10 +113,12 @@ final class SimpleNlriRegistry implements NlriRegistry {
                     SimpleNlriRegistry.this.handlers.remove(key);
                     SimpleNlriRegistry.this.nextHopParsers.remove(key);
                     if (cNextHopClass != null) {
-                        final Entry<Class<? extends CNextHop>, BgpTableType> nhKey = new SimpleEntry<>(cNextHopClass, key);
+                        final Entry<Class<? extends CNextHop>, BgpTableType> nhKey
+                                = new SimpleEntry<>(cNextHopClass, key);
                         SimpleNlriRegistry.this.nextHopSerializers.remove(nhKey);
                         for (final Class<? extends CNextHop> cNextHop : cNextHopClassList) {
-                            final Entry<Class<? extends CNextHop>, BgpTableType> nhKeys = new SimpleEntry<>(cNextHop, key);
+                            final Entry<Class<? extends CNextHop>, BgpTableType> nhKeys
+                                    = new SimpleEntry<>(cNextHop, key);
                             SimpleNlriRegistry.this.nextHopSerializers.remove(nhKeys);
                         }
                     }