Skip to content

Commit

Permalink
refactor: rename wrapActions method to wrapRunnables, consistent …
Browse files Browse the repository at this point in the history
…with other `wrap*` methods
  • Loading branch information
oldratlee committed Jun 23, 2024
1 parent 2455a5b commit 4238242
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -216,7 +216,7 @@ public static CompletableFuture<Void> 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));
}

/**
Expand Down Expand Up @@ -251,10 +251,10 @@ public static CompletableFuture<Void> 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<Void>[] wrapActions(Executor executor, Runnable[] actions) {
private static CompletableFuture<Void>[] wrapRunnables(Executor executor, Runnable[] actions) {
@SuppressWarnings("unchecked")
CompletableFuture<Void>[] cfs = new CompletableFuture[actions.length];
for (int i = 0; i < actions.length; i++) {
Expand Down Expand Up @@ -1701,7 +1701,7 @@ public static CompletableFuture<Void> 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)));
}

/**
Expand All @@ -1718,7 +1718,7 @@ public static CompletableFuture<Void> 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)));
}

/**
Expand Down

0 comments on commit 4238242

Please sign in to comment.