Revert "Provide hasFailed explicitly"
This reverts commit 3f7513ef155ba22f44491bb73d284c5476c1cea2.
This reverts could reduce the risk of ONOS-5271.
Change-Id: I4be276bc169beec0fc86e6a06ea875951fb295b7
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 9e0db6a..b386df4 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
@@ -612,11 +612,11 @@
this.pendingDevices = new HashSet<>();
}
- FlowOperationsProcessor(FlowOperationsProcessor src, boolean hasFailed) {
+ FlowOperationsProcessor(FlowOperationsProcessor src) {
this.fops = src.fops;
this.stages = Lists.newArrayList(src.stages);
this.pendingDevices = new HashSet<>(src.pendingDevices);
- this.hasFailed = hasFailed;
+ this.hasFailed = src.hasFailed;
}
@Override
@@ -649,14 +649,15 @@
synchronized void satisfy(DeviceId devId) {
pendingDevices.remove(devId);
if (pendingDevices.isEmpty()) {
- operationsService.execute(new FlowOperationsProcessor(this, hasFailed));
+ operationsService.execute(new FlowOperationsProcessor(this));
}
}
synchronized void fail(DeviceId devId, Set<? extends FlowRule> failures) {
+ hasFailed = true;
pendingDevices.remove(devId);
if (pendingDevices.isEmpty()) {
- operationsService.execute(new FlowOperationsProcessor(this, true));
+ operationsService.execute(new FlowOperationsProcessor(this));
}
FlowRuleOperations.Builder failedOpsBuilder = FlowRuleOperations.builder();