Skip to content

Commit

Permalink
fix/simplify internal help method hopExecutorIfAtCfDelayerThread πŸ‘οΈ 🧬
Browse files Browse the repository at this point in the history
- fix wrong visibility modifier, `public` -> `private`
- simplify generic type declare, `CompletionStage` -> `CompletableFuture`
  • Loading branch information
oldratlee committed Jun 4, 2024
1 parent d6a1452 commit d029715
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1645,8 +1645,7 @@ C completeOnTimeout(C cf, @Nullable T value, long timeout, TimeUnit unit) {
}

@SuppressWarnings("unchecked")
public static <C extends CompletionStage<?>>
C hopExecutorIfAtCfDelayerThread(C cf, Executor asyncExecutor) {
private static <C extends CompletableFuture<?>> C hopExecutorIfAtCfDelayerThread(C cf, Executor asyncExecutor) {
final CompletionStage<Object> f = (CompletionStage<Object>) cf;

return (C) f.handle((v, ex) -> null).thenCompose(unused -> {
Expand Down

0 comments on commit d029715

Please sign in to comment.