From 423824224325e34d74dd1209aba04d4b27d7c2f9 Mon Sep 17 00:00:00 2001 From: Jerry Lee Date: Sat, 22 Jun 2024 20:07:19 +0800 Subject: [PATCH] refactor: rename `wrapActions` method to `wrapRunnables`, consistent with other `wrap*` methods --- .../java/io/foldright/cffu/CompletableFutureUtils.java | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java b/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java index 33f5d403..1658298b 100644 --- a/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java +++ b/cffu-core/src/main/java/io/foldright/cffu/CompletableFutureUtils.java @@ -216,7 +216,7 @@ public static CompletableFuture mRunAsync(Executor executor, Runnable... a requireNonNull(executor, "executor is null"); requireArrayAndEleNonNull("action", actions); - return CompletableFuture.allOf(wrapActions(executor, actions)); + return CompletableFuture.allOf(wrapRunnables(executor, actions)); } /** @@ -251,10 +251,10 @@ public static CompletableFuture mRunFastFailAsync(Executor executor, Runna requireNonNull(executor, "executor is null"); requireArrayAndEleNonNull("action", actions); - return allOfFastFail(wrapActions(executor, actions)); + return allOfFastFail(wrapRunnables(executor, actions)); } - private static CompletableFuture[] wrapActions(Executor executor, Runnable[] actions) { + private static CompletableFuture[] wrapRunnables(Executor executor, Runnable[] actions) { @SuppressWarnings("unchecked") CompletableFuture[] cfs = new CompletableFuture[actions.length]; for (int i = 0; i < actions.length; i++) { @@ -1701,7 +1701,7 @@ public static CompletableFuture thenMRunFastFailAsync( requireNonNull(executor, "executor is null"); requireArrayAndEleNonNull("action", actions); - return toNonMinCf(cf).thenCompose(unused -> allOfFastFail(wrapActions(executor, actions))); + return toNonMinCf(cf).thenCompose(unused -> allOfFastFail(wrapRunnables(executor, actions))); } /** @@ -1718,7 +1718,7 @@ public static CompletableFuture thenMRunAsync(CompletionStage cf, Execu requireNonNull(executor, "executor is null"); requireArrayAndEleNonNull("action", actions); - return toNonMinCf(cf).thenCompose(unused -> CompletableFuture.allOf(wrapActions(executor, actions))); + return toNonMinCf(cf).thenCompose(unused -> CompletableFuture.allOf(wrapRunnables(executor, actions))); } /**