You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by gg...@apache.org on 2020/12/31 16:26:16 UTC

[commons-compress] branch master updated: Use String#isEmpty().

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


The following commit(s) were added to refs/heads/master by this push:
     new 505feaf  Use String#isEmpty().
505feaf is described below

commit 505feaff7874c77a62d67fb5bfc311cc16bb45c2
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Thu Dec 31 11:26:12 2020 -0500

    Use String#isEmpty().
---
 .../org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java  | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
index 71451c7..c1b46de 100644
--- a/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
+++ b/src/main/java/org/apache/commons/compress/archivers/ar/ArArchiveInputStream.java
@@ -219,7 +219,7 @@ public class ArArchiveInputStream extends ArchiveInputStream {
 
     private int asInt(final byte[] byteArray, final int offset, final int len, final int base, final boolean treatBlankAsZero) {
         final String string = ArchiveUtils.toAsciiString(byteArray, offset, len).trim();
-        if (string.length() == 0 && treatBlankAsZero) {
+        if (string.isEmpty() && treatBlankAsZero) {
             return 0;
         }
         return Integer.parseInt(string, base);