Refactor: Inline method
Change-Id: Iafa70a7a728a3e701a2f62c4b9c015504bdcfabd
diff --git a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
index 082f4a3..6802aba 100644
--- a/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
+++ b/core/net/src/main/java/org/onosproject/net/intent/impl/IntentManager.java
@@ -293,11 +293,6 @@
}
}
- private CompletableFuture<FinalIntentProcessPhase> submitIntentData(IntentData data) {
- IntentProcessPhase initial = createInitialPhase(data);
- return CompletableFuture.supplyAsync(() -> process(initial), workerExecutor);
- }
-
private IntentProcessPhase createInitialPhase(IntentData data) {
IntentData current = store.getIntentData(data.key());
return newInitialPhase(processor, data, current);
@@ -330,7 +325,8 @@
(we can also try to update these individually)
*/
List<CompletableFuture<IntentData>> futures = operations.stream()
- .map(IntentManager.this::submitIntentData)
+ .map(x -> createInitialPhase(x))
+ .map(x -> CompletableFuture.supplyAsync(() -> process(x), workerExecutor))
.map(x -> x.thenApply(FinalIntentProcessPhase::data))
.map(x -> x.exceptionally(e -> {
//FIXME