Bug-731: Fixed few major Sonar warnings
[bgpcep.git] / bgp / linkstate / src / main / java / org / opendaylight / protocol / bgp / linkstate / LinkstateAttributeParser.java
index a997520e4dbb102fd41908b71179f9b63fc39c18..a623f234ea9caf18f4ebab6bea99f7f80403084d 100644 (file)
@@ -151,12 +151,12 @@ public class LinkstateAttributeParser implements AttributeParser, AttributeSeria
 
     @Override
     public void parseAttribute(final ByteBuf buffer, final PathAttributesBuilder builder) throws BGPParsingException {
-        final NlriType type = getNlriType(builder);
-        if (type == null) {
+        final NlriType nlriType = getNlriType(builder);
+        if (nlriType == null) {
             LOG.warn("No Linkstate NLRI found, not parsing Linkstate attribute");
             return;
         }
-        final PathAttributes1 a = new PathAttributes1Builder().setLinkstatePathAttribute(parseLinkState(type, buffer)).build();
+        final PathAttributes1 a = new PathAttributes1Builder().setLinkstatePathAttribute(parseLinkState(nlriType, buffer)).build();
         builder.addAugmentation(PathAttributes1.class, a);
     }