Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
oldratlee committed Apr 23, 2024
1 parent e69f255 commit 8ec63f7
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java
Original file line number Diff line number Diff line change
Expand Up @@ -456,8 +456,8 @@ public Cffu<Void> allOfFastFail() {
*/
@Contract(pure = true)
@SuppressWarnings("unchecked")
public Cffu<Object> anyOf(Cffu<?>... cfs) {
return anyOf(toCompletableFutureArray((Cffu<Object>[]) cfs));
public <T> Cffu<T> anyOf(Cffu<? extends T>... cfs) {
return anyOf(toCompletableFutureArray((Cffu<T>[]) cfs));
}

/**
Expand All @@ -476,8 +476,9 @@ public Cffu<Object> anyOf(Cffu<?>... cfs) {
* @see CompletableFuture#anyOf(CompletableFuture[])
*/
@Contract(pure = true)
public Cffu<Object> anyOf(CompletableFuture<?>... cfs) {
return new0(CompletableFuture.anyOf(cfs));
@SuppressWarnings("unchecked")
public <T> Cffu<T> anyOf(CompletableFuture<? extends T>... cfs) {
return (Cffu<T>) new0(CompletableFuture.anyOf(cfs));
}

/**
Expand Down

0 comments on commit 8ec63f7

Please sign in to comment.