Skip to content

Commit 4fcb945

Browse files
authored
Minor wording change in error message for Try().peek(Consumer, Consumer) (#2661)
1 parent 665aa9f commit 4fcb945

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,8 @@ public final <X> X fold(Function<? super Throwable, ? extends X> ifFail, Functio
895895
* @return this {@code Try}
896896
*/
897897
public final Try<T> peek(Consumer<? super Throwable> failureAction, Consumer<? super T> successAction) {
898-
Objects.requireNonNull(failureAction, "action is null");
899-
Objects.requireNonNull(successAction, "action is null");
898+
Objects.requireNonNull(failureAction, "failureAction is null");
899+
Objects.requireNonNull(successAction, "successAction is null");
900900

901901
if (isFailure()) {
902902
failureAction.accept(getCause());

0 commit comments

Comments
 (0)