Sho SHIMIZU
Committed by Thomas Vachuska

Remove redundant field

Change-Id: I6a7adbce08e589e29763b1f7144d3a8d8742df9d
......@@ -52,7 +52,6 @@ import org.onosproject.net.flow.FlowRuleEvent;
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;
......@@ -580,7 +579,6 @@ public class FlowRuleManager
private class FlowOperationsProcessor implements Runnable {
private final List<Set<FlowRuleOperation>> stages;
private final FlowRuleOperationsContext context;
private final FlowRuleOperations fops;
private boolean hasFailed = false;
......@@ -588,7 +586,6 @@ public class FlowRuleManager
FlowOperationsProcessor(FlowRuleOperations ops) {
this.stages = Lists.newArrayList(ops.stages());
this.context = ops.callback();
this.fops = ops;
}
......@@ -596,8 +593,8 @@ public class FlowRuleManager
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);
}
}
......@@ -633,12 +630,12 @@ public class FlowRuleManager
operationsService.execute(this);
}
if (context != null) {
if (fops.callback() != null) {
final FlowRuleOperations.Builder failedOpsBuilder =
FlowRuleOperations.builder();
failures.stream().forEach(failedOpsBuilder::add);
context.onError(failedOpsBuilder.build());
fops.callback().onError(failedOpsBuilder.build());
}
}
}
......