commit | 45a0ad36f3e55a5a4ebf3bd97d48fa1ca7e0d767 | [log] [tgz] |
---|---|---|
author | Pavlin Radoslavov <pavlin@onlab.us> | Thu Apr 10 12:16:40 2014 -0700 |
committer | Gerrit Code Review <gerrit2@onos-services> | Thu Apr 10 12:50:49 2014 -0700 |
tree | f0581353371ed5acf5bb6a914c45d6a1196e11cf | |
parent | fee8098e3532d6a0290d6b099ea76b5a85a7a8a2 [diff] |
Fix issues found by FindBugs: WMI_WRONG_MAP_ITERATOR http://findbugs.sourceforge.net/bugDescriptions.html#WMI_WRONG_MAP_ITERATOR Change-Id: I3fdc5bb1df8531654ffee9645cb6fbfde4661022
diff --git a/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java b/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java index a671d7a..6636be2 100644 --- a/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java +++ b/src/main/java/net/onrc/onos/core/intent/runtime/PlanCalcRuntime.java
@@ -131,8 +131,9 @@ // really simple first iteration of plan //TODO: optimize the map in phases Set<FlowEntry> phase = new HashSet<>(); - for (FlowEntry e : map.keySet()) { - Integer i = map.get(e); + for (Map.Entry<FlowEntry, Integer> entry : map.entrySet()) { + FlowEntry e = entry.getKey(); + Integer i = entry.getValue(); if (i == 0) { continue; } else if (i > 0) {