Skip to content

Commit

Permalink
feat: ensure Cffu#with* methods create Cffu instances with NEW unde…
Browse files Browse the repository at this point in the history
…rlying cfs 🆕
  • Loading branch information
oldratlee committed Feb 24, 2025
1 parent 753ce68 commit 5dd1cfb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion cffu-core/src/main/java/io/foldright/cffu/Cffu.java
Original file line number Diff line number Diff line change
Expand Up @@ -2572,7 +2572,7 @@ public Cffu<T> withDefaultExecutor(Executor defaultExecutor) {
*/
@Contract(pure = true)
public Cffu<T> withCffuFactory(CffuFactory cffuFactory) {
return new Cffu<>(cffuFactory, isMinimalStage, cf);
return new Cffu<>(cffuFactory, isMinimalStage, CompletableFutureUtils.copy(cf));
}

/**
Expand Down

0 comments on commit 5dd1cfb

Please sign in to comment.