Refactor: Get updating pendingDevices out of the loop
Change-Id: I1b1c5ac141a68a6d6308238ae0934249c7a3af96
Showing
1 changed file
with
1 additions
and
1 deletions
... | @@ -608,9 +608,9 @@ public class FlowRuleManager | ... | @@ -608,9 +608,9 @@ public class FlowRuleManager |
608 | for (FlowRuleOperation flowRuleOperation : ops) { | 608 | for (FlowRuleOperation flowRuleOperation : ops) { |
609 | FlowRuleBatchEntry fbe = | 609 | FlowRuleBatchEntry fbe = |
610 | new FlowRuleBatchEntry(mapOperationType(flowRuleOperation.type()), flowRuleOperation.rule()); | 610 | new FlowRuleBatchEntry(mapOperationType(flowRuleOperation.type()), flowRuleOperation.rule()); |
611 | - pendingDevices.add(flowRuleOperation.rule().deviceId()); | ||
612 | perDeviceBatches.put(flowRuleOperation.rule().deviceId(), fbe); | 611 | perDeviceBatches.put(flowRuleOperation.rule().deviceId(), fbe); |
613 | } | 612 | } |
613 | + pendingDevices.addAll(perDeviceBatches.keySet()); | ||
614 | 614 | ||
615 | for (DeviceId deviceId : perDeviceBatches.keySet()) { | 615 | for (DeviceId deviceId : perDeviceBatches.keySet()) { |
616 | long id = idGenerator.getNewId(); | 616 | long id = idGenerator.getNewId(); | ... | ... |
-
Please register or login to post a comment