From c52cc632fe066ac68feed529e0111df4fd689129 Mon Sep 17 00:00:00 2001 From: ehlxr Date: Thu, 4 Feb 2021 15:52:17 +0800 Subject: [PATCH] upgrade Try.java --- src/main/java/io/github/ehlxr/utils/Try.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/java/io/github/ehlxr/utils/Try.java b/src/main/java/io/github/ehlxr/utils/Try.java index 3b852f7..dac1e09 100644 --- a/src/main/java/io/github/ehlxr/utils/Try.java +++ b/src/main/java/io/github/ehlxr/utils/Try.java @@ -265,7 +265,7 @@ public interface Try { */ public void accept(P p) { try { - Objects.requireNonNull(p, "No accept p present"); + Objects.requireNonNull(p, "No accept param present"); consumer.accept(p); } catch (final Throwable e) { @@ -294,7 +294,7 @@ public interface Try { * @return {@link TryFunction} */ public TryFunction apply(P p) { - Objects.requireNonNull(p, "Apply p should not null"); + Objects.requireNonNull(p, "Apply param should not null"); this.p = p; return this; @@ -308,7 +308,7 @@ public interface Try { */ public R get(R r) { try { - Objects.requireNonNull(function, "No apply p present"); + Objects.requireNonNull(function, "No apply param present"); return function.apply(p); } catch (final Throwable e) { @@ -326,7 +326,7 @@ public interface Try { */ public R get() { try { - Objects.requireNonNull(p, "No apply p present"); + Objects.requireNonNull(p, "No apply param present"); return function.apply(p); } catch (final Throwable e) {