Skip to content

Commit c5fff07

Browse files
authored
Annotate Try#mapFailure with @SafeVarargs (#2863)
1 parent 0ade953 commit c5fff07

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/main/java/io/vavr/control/Try.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -723,7 +723,8 @@ public final <U> Try<U> map(Function<? super T, ? extends U> mapper) {
723723
* @param cases A not necessarily exhaustive sequence of cases that will be matched against a cause.
724724
* @return A new {@code Try} if this is a {@code Failure}, otherwise this.
725725
*/
726-
@SuppressWarnings({ "unchecked", "varargs" })
726+
@SuppressWarnings({"varargs"})
727+
@SafeVarargs
727728
public final Try<T> mapFailure(Match.Case<? extends Throwable, ? extends Throwable>... cases) {
728729
if (isSuccess()) {
729730
return this;

0 commit comments

Comments
 (0)