Skip to content

Commit

Permalink
fix: methods unsafeOrTimeout/unsafeCompleteOnTimeout of Cffu sh…
Browse files Browse the repository at this point in the history
…ould return `this` 🐞
  • Loading branch information
oldratlee committed Jun 5, 2024
1 parent a523a50 commit 2c00e27
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions cffu-core/src/main/java/io/foldright/cffu/Cffu.java
Original file line number Diff line number Diff line change
Expand Up @@ -996,7 +996,8 @@ public Cffu<T> orTimeout(Executor executorWhenTimeout, long timeout, TimeUnit un
*/
public Cffu<T> unsafeOrTimeout(long timeout, TimeUnit unit) {
checkMinimalStage();
return reset0(CompletableFutureUtils.orTimeout(cf, timeout, unit));
CompletableFutureUtils.orTimeout(cf, timeout, unit);
return this;
}

/**
Expand Down Expand Up @@ -1054,7 +1055,8 @@ public Cffu<T> completeOnTimeout(@Nullable T value, Executor executorWhenTimeout
*/
public Cffu<T> unsafeCompleteOnTimeout(@Nullable T value, long timeout, TimeUnit unit) {
checkMinimalStage();
return reset0(CompletableFutureUtils.completeOnTimeout(cf, value, timeout, unit));
CompletableFutureUtils.completeOnTimeout(cf, value, timeout, unit);
return this;
}

////////////////////////////////////////////////////////////////////////////////
Expand Down

0 comments on commit 2c00e27

Please sign in to comment.