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-weaver.git
The following commit(s) were added to refs/heads/master by this push: new 61c6e2f Use Objects.requireNonNull() instead of custom check. Minor formatting. 61c6e2f is described below commit 61c6e2f404d1b619c29facf42f914765897a5187 Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Thu Dec 26 08:38:27 2019 -0500 Use Objects.requireNonNull() instead of custom check. Minor formatting. --- .../src/main/java/org/apache/commons/weaver/model/ScanRequest.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/processor/src/main/java/org/apache/commons/weaver/model/ScanRequest.java b/processor/src/main/java/org/apache/commons/weaver/model/ScanRequest.java index 1c4cb17..4894174 100644 --- a/processor/src/main/java/org/apache/commons/weaver/model/ScanRequest.java +++ b/processor/src/main/java/org/apache/commons/weaver/model/ScanRequest.java @@ -23,6 +23,7 @@ import java.util.ArrayList; import java.util.Collections; import java.util.LinkedHashSet; import java.util.List; +import java.util.Objects; import java.util.Set; import org.apache.commons.lang3.Validate; @@ -44,9 +45,7 @@ public class ScanRequest { * @return {@code this}, fluently */ public ScanRequest add(final WeaveInterest interest) { - if (interest == null) { - throw new NullPointerException(); - } + Objects.requireNonNull(interest, "interest"); interests.add(interest); return this; }