Skip to content

Commit

Permalink
Minor wording change in error message for Try().peek(Consumer, Consum…
Browse files Browse the repository at this point in the history
…er) (#2661)
  • Loading branch information
sleepytomcat authored May 19, 2021
1 parent 665aa9f commit 4fcb945
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/main/java/io/vavr/control/Try.java
Original file line number Diff line number Diff line change
Expand Up @@ -895,8 +895,8 @@ public final <X> X fold(Function<? super Throwable, ? extends X> ifFail, Functio
* @return this {@code Try}
*/
public final Try<T> peek(Consumer<? super Throwable> failureAction, Consumer<? super T> successAction) {
Objects.requireNonNull(failureAction, "action is null");
Objects.requireNonNull(successAction, "action is null");
Objects.requireNonNull(failureAction, "failureAction is null");
Objects.requireNonNull(successAction, "successAction is null");

if (isFailure()) {
failureAction.accept(getCause());
Expand Down

0 comments on commit 4fcb945

Please sign in to comment.