Committed by
Gerrit Code Review
Refactor: Consolidate multiple map() invocations to single invocation
Change-Id: I53bd6a80f34469eb23874f91dd52a895e0f5a2dc
Showing
1 changed file
with
5 additions
and
5 deletions
| ... | @@ -325,11 +325,11 @@ public class IntentManager | ... | @@ -325,11 +325,11 @@ public class IntentManager |
| 325 | (we can also try to update these individually) | 325 | (we can also try to update these individually) |
| 326 | */ | 326 | */ |
| 327 | List<CompletableFuture<IntentData>> futures = operations.stream() | 327 | List<CompletableFuture<IntentData>> futures = operations.stream() |
| 328 | - .map(CompletableFuture::completedFuture) | 328 | + .map(x -> CompletableFuture.completedFuture(x) |
| 329 | - .map(x -> x.thenApply(IntentManager.this::createInitialPhase)) | 329 | + .thenApply(IntentManager.this::createInitialPhase) |
| 330 | - .map(x -> x.thenApplyAsync(IntentManager.this::process, workerExecutor)) | 330 | + .thenApplyAsync(IntentManager.this::process, workerExecutor) |
| 331 | - .map(x -> x.thenApply(FinalIntentProcessPhase::data)) | 331 | + .thenApply(FinalIntentProcessPhase::data) |
| 332 | - .map(x -> x.exceptionally(e -> { | 332 | + .exceptionally(e -> { |
| 333 | //FIXME | 333 | //FIXME |
| 334 | log.warn("Future failed: {}", e); | 334 | log.warn("Future failed: {}", e); |
| 335 | return null; | 335 | return null; | ... | ... |
-
Please register or login to post a comment