Skip to content

Commit

Permalink
Annotate Try#mapFailure with @SafeVarargs (#2863)
Browse files Browse the repository at this point in the history
  • Loading branch information
pivovarit authored Sep 29, 2024
1 parent 0ade953 commit c5fff07
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/main/java/io/vavr/control/Try.java
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,8 @@ public final <U> Try<U> map(Function<? super T, ? extends U> mapper) {
* @param cases A not necessarily exhaustive sequence of cases that will be matched against a cause.
* @return A new {@code Try} if this is a {@code Failure}, otherwise this.
*/
@SuppressWarnings({ "unchecked", "varargs" })
@SuppressWarnings({"varargs"})
@SafeVarargs
public final Try<T> mapFailure(Match.Case<? extends Throwable, ? extends Throwable>... cases) {
if (isSuccess()) {
return this;
Expand Down

0 comments on commit c5fff07

Please sign in to comment.