Refactor: Rename and inline to simplify inside of the loop
Change-Id: I445eb6505c99d770e612c43eb8fca6d53cf806d4
Showing
1 changed file
with
3 additions
and
4 deletions
| ... | @@ -605,10 +605,9 @@ public class FlowRuleManager | ... | @@ -605,10 +605,9 @@ public class FlowRuleManager |
| 605 | private void process(Set<FlowRuleOperation> ops) { | 605 | private void process(Set<FlowRuleOperation> ops) { |
| 606 | Multimap<DeviceId, FlowRuleBatchEntry> perDeviceBatches = ArrayListMultimap.create(); | 606 | Multimap<DeviceId, FlowRuleBatchEntry> perDeviceBatches = ArrayListMultimap.create(); |
| 607 | 607 | ||
| 608 | - for (FlowRuleOperation flowRuleOperation : ops) { | 608 | + for (FlowRuleOperation op : ops) { |
| 609 | - FlowRuleBatchEntry fbe = | 609 | + perDeviceBatches.put(op.rule().deviceId(), |
| 610 | - new FlowRuleBatchEntry(mapOperationType(flowRuleOperation.type()), flowRuleOperation.rule()); | 610 | + new FlowRuleBatchEntry(mapOperationType(op.type()), op.rule())); |
| 611 | - perDeviceBatches.put(flowRuleOperation.rule().deviceId(), fbe); | ||
| 612 | } | 611 | } |
| 613 | pendingDevices.addAll(perDeviceBatches.keySet()); | 612 | pendingDevices.addAll(perDeviceBatches.keySet()); |
| 614 | 613 | ... | ... |
-
Please register or login to post a comment