From 05abf1388e1396553f11c256656baf3717468bdf Mon Sep 17 00:00:00 2001 From: Sho SHIMIZU Date: Thu, 14 Jan 2016 16:29:51 -0800 Subject: [PATCH] Refactor: Generate CompletableFuture first, then process it Change-Id: I1ef5961a863b855ce2687fcbacd2159c77cb64ce --- .../java/org/onosproject/net/intent/impl/IntentManager.java | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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 a53079765d..71c876411e 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 @@ -325,8 +325,8 @@ public class IntentManager (we can also try to update these individually) */ List> futures = operations.stream() - .map(IntentManager.this::createInitialPhase) .map(CompletableFuture::completedFuture) + .map(x -> x.thenApply(IntentManager.this::createInitialPhase)) .map(x -> x.thenApplyAsync(IntentManager.this::process, workerExecutor)) .map(x -> x.thenApply(FinalIntentProcessPhase::data)) .map(x -> x.exceptionally(e -> {