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-vfs.git
The following commit(s) were added to refs/heads/master by this push: new 322bbd040 Use Objects.requiteNonNull() 322bbd040 is described below commit 322bbd040818ee938cae9fed5c01f9c3e2374bc6 Author: Gary D. Gregory <garydgreg...@gmail.com> AuthorDate: Sat Apr 19 09:18:52 2025 -0400 Use Objects.requiteNonNull() --- .../src/main/java/org/apache/commons/vfs2/filter/IOCase.java | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java index b677ae6da..a9fe2f4b2 100644 --- a/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java +++ b/commons-vfs2/src/main/java/org/apache/commons/vfs2/filter/IOCase.java @@ -146,9 +146,8 @@ public enum IOCase { * @throws NullPointerException if either string is null */ public boolean checkEquals(final String str1, final String str2) { - if (str1 == null || str2 == null) { - throw new NullPointerException("The strings must not be null"); - } + Objects.requireNonNull(str1, "str1"); + Objects.requireNonNull(str2, "str2"); return sensitive ? str1.equals(str2) : str1.equalsIgnoreCase(str2); }