diff --git a/cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java b/cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java index c617fbe6..6207f40a 100644 --- a/cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java +++ b/cffu-core/src/main/java/io/foldright/cffu/CffuFactory.java @@ -456,8 +456,8 @@ public Cffu allOfFastFail() { */ @Contract(pure = true) @SuppressWarnings("unchecked") - public Cffu anyOf(Cffu... cfs) { - return anyOf(toCompletableFutureArray((Cffu[]) cfs)); + public Cffu anyOf(Cffu... cfs) { + return anyOf(toCompletableFutureArray((Cffu[]) cfs)); } /** @@ -476,8 +476,9 @@ public Cffu anyOf(Cffu... cfs) { * @see CompletableFuture#anyOf(CompletableFuture[]) */ @Contract(pure = true) - public Cffu anyOf(CompletableFuture... cfs) { - return new0(CompletableFuture.anyOf(cfs)); + @SuppressWarnings("unchecked") + public Cffu anyOf(CompletableFuture... cfs) { + return (Cffu) new0(CompletableFuture.anyOf(cfs)); } /**