This is an automated email from the ASF dual-hosted git repository. ggregory pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/commons-lang.git
commit 8dfc79886ac34b079af682a1493da978a94982ca Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Sun Feb 7 10:25:01 2021 -0500 Be consistent declaring throws NullPointerException. --- src/main/java/org/apache/commons/lang3/function/Objects.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/lang3/function/Objects.java b/src/main/java/org/apache/commons/lang3/function/Objects.java index f172c8d..8a8435b 100755 --- a/src/main/java/org/apache/commons/lang3/function/Objects.java +++ b/src/main/java/org/apache/commons/lang3/function/Objects.java @@ -87,7 +87,7 @@ public class Objects { * @return The given input value, if it was found to be non-null. * @see java.util.Objects#requireNonNull(Object) */ - public static <T> @Nonnull T requireNonNull(@Nullable T value, @Nonnull T defaultValue) { + public static <T> @Nonnull T requireNonNull(@Nullable T value, @Nonnull T defaultValue) throws NullPointerException { if (value == null) { if (defaultValue == null) { throw new NullPointerException("The default value must not be null."); @@ -154,7 +154,7 @@ public class Objects { * @throws NullPointerException The default value supplier is null, or the default * value supplier has returned null. */ - public static <T, E extends Throwable> @Nonnull T requireNonNull(@Nullable T value, @Nonnull FailableSupplier<T, E> defaultValueSupplier) { + public static <T, E extends Throwable> @Nonnull T requireNonNull(@Nullable T value, @Nonnull FailableSupplier<T, E> defaultValueSupplier) throws NullPointerException { if (value == null) { final FailableSupplier<T, ?> supplier = requireNonNull(defaultValueSupplier, "The supplier must not be null"); final T o;