Remove redundant field
Change-Id: I6a7adbce08e589e29763b1f7144d3a8d8742df9d
diff --git a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
index ccbbd4a..40829be 100644
--- a/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
+++ b/core/net/src/main/java/org/onosproject/net/flow/impl/FlowRuleManager.java
@@ -52,7 +52,6 @@
import org.onosproject.net.flow.FlowRuleListener;
import org.onosproject.net.flow.FlowRuleOperation;
import org.onosproject.net.flow.FlowRuleOperations;
-import org.onosproject.net.flow.FlowRuleOperationsContext;
import org.onosproject.net.flow.FlowRuleProvider;
import org.onosproject.net.flow.FlowRuleProviderRegistry;
import org.onosproject.net.flow.FlowRuleProviderService;
@@ -601,7 +600,6 @@
private class FlowOperationsProcessor implements Runnable {
private final List<Set<FlowRuleOperation>> stages;
- private final FlowRuleOperationsContext context;
private final FlowRuleOperations fops;
private boolean hasFailed = false;
@@ -609,7 +607,6 @@
FlowOperationsProcessor(FlowRuleOperations ops) {
this.stages = Lists.newArrayList(ops.stages());
- this.context = ops.callback();
this.fops = ops;
}
@@ -617,8 +614,8 @@
public synchronized void run() {
if (stages.size() > 0) {
process(stages.remove(0));
- } else if (!hasFailed && context != null) {
- context.onSuccess(fops);
+ } else if (!hasFailed && fops.callback() != null) {
+ fops.callback().onSuccess(fops);
}
}
@@ -654,12 +651,12 @@
operationsService.execute(this);
}
- if (context != null) {
+ if (fops.callback() != null) {
final FlowRuleOperations.Builder failedOpsBuilder =
FlowRuleOperations.builder();
failures.forEach(failedOpsBuilder::add);
- context.onError(failedOpsBuilder.build());
+ fops.callback().onError(failedOpsBuilder.build());
}
}
}