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-compress.git

commit df8e5f3f7bf119443f07662248613162794bec99
Author: Gary D. Gregory <garydgreg...@gmail.com>
AuthorDate: Fri Apr 11 15:43:32 2025 -0400

    Reduce boilerplate and some possible NullPointerExceptions
---
 src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java 
b/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
index 420044c10..c77e54fa5 100644
--- a/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
+++ b/src/main/java/org/apache/commons/compress/archivers/sevenz/CLI.java
@@ -22,6 +22,8 @@
 import java.io.IOException;
 import java.util.Locale;
 
+import org.apache.commons.lang3.ArrayUtils;
+
 /**
  * Usage: archive-name [list]
  */
@@ -96,7 +98,7 @@ private static Mode grabMode(final String[] args) {
      * @throws IOException if an I/O problem occurs.
      */
     public static void main(final String[] args) throws IOException {
-        if (args.length == 0) {
+        if (ArrayUtils.isEmpty(args)) {
             usage();
             return;
         }

Reply via email to