Code clean up
[bgpcep.git] / bgp / rib-impl / src / main / java / org / opendaylight / protocol / bgp / rib / impl / AttributeOperations.java
index 62832936ce5620fa518a2093d2dd9ef80b334d90..6dbb82a773a575a0f5ab4ebd08fb249dd29037bf 100644 (file)
@@ -98,10 +98,10 @@ final class AttributeOperations {
         this.clusterListContainer = new NodeIdentifier(QName.create(namespace, ClusterId.QNAME.getLocalName()).intern());
         this.clusterQname = QName.create(namespace, "cluster").intern();
         this.clusterListLeaf = new NodeIdentifier(this.clusterQname);
-        this.clusterListPath = ImmutableList.<PathArgument>of(this.clusterListContainer, this.clusterListLeaf);
+        this.clusterListPath = ImmutableList.of(this.clusterListContainer, this.clusterListLeaf);
         this.originatorIdContainer = new NodeIdentifier(QName.create(namespace, OriginatorId.QNAME.getLocalName()).intern());
         this.originatorIdLeaf = new NodeIdentifier(QName.create(namespace, "originator").intern());
-        this.originatorIdPath = ImmutableList.<PathArgument>of(this.originatorIdContainer, this.originatorIdLeaf);
+        this.originatorIdPath = ImmutableList.of(this.originatorIdContainer, this.originatorIdLeaf);
 
         this.transitiveLeaf = new NodeIdentifier(QName.create(UnrecognizedAttributes.QNAME, "transitive").intern());
         this.transitiveCollection = TRANSITIVE_CACHE.getUnchecked(namespace);
@@ -334,7 +334,7 @@ final class AttributeOperations {
 
         final NormalizedNode<?, ?> originatorId = maybeOriginatorId.get();
         if (originatorId instanceof LeafNode) {
-            return ((LeafNode<?>) originatorId).getValue();
+            return originatorId.getValue();
         }
 
         LOG.warn("Unexpected ORIGINATOR_ID node {}, ignoring it", originatorId);