Fix issues found by FindBugs: DLS_DEAD_LOCAL_STORE
http://findbugs.sourceforge.net/bugDescriptions.html#DLS_DEAD_LOCAL_STORE
Change-Id: I3f0233f31243ce35996ccfc9617184e6e4d8accc
diff --git a/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java b/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
index f07e6e4..d37f8bd 100644
--- a/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
+++ b/src/main/java/net/onrc/onos/apps/bgproute/BgpRoute.java
@@ -626,11 +626,17 @@
private void deletePrefixFlows(Prefix prefix) {
log.debug("Deleting flows for prefix {}", prefix);
+ //
+ // TODO: Delete the flow by using the new Path Intent framework
+ // NOTE: During the refactoring of the code below, if obtaining
+ // the values of the removed flowIds is needed, the first
+ // removeAll() statement should be replaced with the second removeAll()
+ // statement.
+ //
+ pushedFlowIds.removeAll(prefix);
+ /*
Collection<FlowId> flowIds = pushedFlowIds.removeAll(prefix);
-/*
for (FlowId flowId : flowIds) {
- // TODO: Delete the flow by using the new Path Intent framework
- /*
if (log.isTraceEnabled()) {
//Trace the flow status by flowPath in the switch before deleting it
log.trace("Pushing a DELETE flow mod to flowPath : {}",
@@ -646,7 +652,7 @@
log.debug("Failed to delete FlowId: {}",flowId);
}
}
-*/
+ */
}
// TODO need to record the path and then delete here
diff --git a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
index 25fe608..005f983 100644
--- a/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
+++ b/src/main/java/net/onrc/onos/core/flowprogrammer/FlowSynchronizer.java
@@ -14,7 +14,6 @@
import net.floodlightcontroller.core.IOFSwitch;
import net.onrc.onos.core.flowprogrammer.IFlowPusherService.MsgPriority;
-import net.onrc.onos.core.util.Dpid;
import net.onrc.onos.core.util.FlowEntryId;
import org.openflow.protocol.OFFlowMod;
@@ -89,8 +88,8 @@
public Synchronizer(IOFSwitch sw) {
this.sw = sw;
- Dpid dpid = new Dpid(sw.getId());
// TODO: fix when FlowSynchronizer is refactored
+ // Dpid dpid = new Dpid(sw.getId());
// this.swObj = dbHandler.searchSwitch(dpid.toString());
}