SONAR suggestion - collection item types
Don't call contains() or remove() on objects that don't match the
collection item type, this will always return false.
Change-Id: I4d6d0992636b6aa9a4dd3585edd4760884bd4bfb
diff --git a/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java b/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java
index 4a8684e..a5bc555 100644
--- a/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java
+++ b/apps/tetopology/app/src/main/java/org/onosproject/tetopology/management/impl/DistributedTeTopologyStore.java
@@ -1100,7 +1100,7 @@
InternalNetwork intNework = networkMap.get(nodeKey.networkId());
if (intNework != null && CollectionUtils.isNotEmpty(intNework.nodeIds())) {
intNework.setChildUpdate(true);
- intNework.nodeIds().remove(nodeKey.nodeId());
+ intNework.nodeIds().remove(nodeKey);
}
InternalNetworkNode intNode = networkNodeMap.remove(nodeKey);
if (intNode != null && CollectionUtils.isNotEmpty(intNode.tpIds())) {
@@ -1287,7 +1287,7 @@
InternalNetwork intNework = networkMap.get(linkKey.networkId());
if (intNework != null && CollectionUtils.isNotEmpty(intNework.linkIds())) {
intNework.setChildUpdate(true);
- intNework.linkIds().remove(linkKey.linkId());
+ intNework.linkIds().remove(linkKey);
}
// Remove it from networkLinkMap
InternalNetworkLink intLink = networkLinkMap.remove(linkKey);
diff --git a/drivers/hp/src/main/java/org/onosproject/drivers/hp/HPPipelineV1.java b/drivers/hp/src/main/java/org/onosproject/drivers/hp/HPPipelineV1.java
index 48e6122..27a585b 100644
--- a/drivers/hp/src/main/java/org/onosproject/drivers/hp/HPPipelineV1.java
+++ b/drivers/hp/src/main/java/org/onosproject/drivers/hp/HPPipelineV1.java
@@ -261,7 +261,7 @@
*/
if (instruction.type() == Instruction.Type.L2MODIFICATION) {
- if (!this.hardwareInstructionsL3mod.contains(((L2ModificationInstruction) instruction).subtype())) {
+ if (!this.hardwareInstructionsL2mod.contains(((L2ModificationInstruction) instruction).subtype())) {
log.warn("HP V1 Driver - L2MODIFICATION.subtype {} only supported in SOFTWARE",
((L2ModificationInstruction) instruction).subtype());