Sho SHIMIZU
Committed by Thomas Vachuska

Remove redundant field

Change-Id: I6a7adbce08e589e29763b1f7144d3a8d8742df9d
...@@ -52,7 +52,6 @@ import org.onosproject.net.flow.FlowRuleEvent; ...@@ -52,7 +52,6 @@ import org.onosproject.net.flow.FlowRuleEvent;
52 import org.onosproject.net.flow.FlowRuleListener; 52 import org.onosproject.net.flow.FlowRuleListener;
53 import org.onosproject.net.flow.FlowRuleOperation; 53 import org.onosproject.net.flow.FlowRuleOperation;
54 import org.onosproject.net.flow.FlowRuleOperations; 54 import org.onosproject.net.flow.FlowRuleOperations;
55 -import org.onosproject.net.flow.FlowRuleOperationsContext;
56 import org.onosproject.net.flow.FlowRuleProvider; 55 import org.onosproject.net.flow.FlowRuleProvider;
57 import org.onosproject.net.flow.FlowRuleProviderRegistry; 56 import org.onosproject.net.flow.FlowRuleProviderRegistry;
58 import org.onosproject.net.flow.FlowRuleProviderService; 57 import org.onosproject.net.flow.FlowRuleProviderService;
...@@ -580,7 +579,6 @@ public class FlowRuleManager ...@@ -580,7 +579,6 @@ public class FlowRuleManager
580 private class FlowOperationsProcessor implements Runnable { 579 private class FlowOperationsProcessor implements Runnable {
581 580
582 private final List<Set<FlowRuleOperation>> stages; 581 private final List<Set<FlowRuleOperation>> stages;
583 - private final FlowRuleOperationsContext context;
584 private final FlowRuleOperations fops; 582 private final FlowRuleOperations fops;
585 private boolean hasFailed = false; 583 private boolean hasFailed = false;
586 584
...@@ -588,7 +586,6 @@ public class FlowRuleManager ...@@ -588,7 +586,6 @@ public class FlowRuleManager
588 586
589 FlowOperationsProcessor(FlowRuleOperations ops) { 587 FlowOperationsProcessor(FlowRuleOperations ops) {
590 this.stages = Lists.newArrayList(ops.stages()); 588 this.stages = Lists.newArrayList(ops.stages());
591 - this.context = ops.callback();
592 this.fops = ops; 589 this.fops = ops;
593 } 590 }
594 591
...@@ -596,8 +593,8 @@ public class FlowRuleManager ...@@ -596,8 +593,8 @@ public class FlowRuleManager
596 public synchronized void run() { 593 public synchronized void run() {
597 if (stages.size() > 0) { 594 if (stages.size() > 0) {
598 process(stages.remove(0)); 595 process(stages.remove(0));
599 - } else if (!hasFailed && context != null) { 596 + } else if (!hasFailed && fops.callback() != null) {
600 - context.onSuccess(fops); 597 + fops.callback().onSuccess(fops);
601 } 598 }
602 } 599 }
603 600
...@@ -633,12 +630,12 @@ public class FlowRuleManager ...@@ -633,12 +630,12 @@ public class FlowRuleManager
633 operationsService.execute(this); 630 operationsService.execute(this);
634 } 631 }
635 632
636 - if (context != null) { 633 + if (fops.callback() != null) {
637 final FlowRuleOperations.Builder failedOpsBuilder = 634 final FlowRuleOperations.Builder failedOpsBuilder =
638 FlowRuleOperations.builder(); 635 FlowRuleOperations.builder();
639 failures.stream().forEach(failedOpsBuilder::add); 636 failures.stream().forEach(failedOpsBuilder::add);
640 637
641 - context.onError(failedOpsBuilder.build()); 638 + fops.callback().onError(failedOpsBuilder.build());
642 } 639 }
643 } 640 }
644 } 641 }
......