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 4b9e5440 Use String.isEmpty()
4b9e5440 is described below

commit 4b9e5440520198743dc8c16753e25700c429e943
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Oct 2 13:33:45 2022 -0400

    Use String.isEmpty()
---
 .../apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java   | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git 
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
 
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
index 5c4f06ba..e04cd5de 100644
--- 
a/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
+++ 
b/src/main/java/org/apache/commons/compress/archivers/zip/ZipArchiveOutputStream.java
@@ -1312,7 +1312,7 @@ public class ZipArchiveOutputStream extends 
ArchiveOutputStream {
         }
 
         final String comm = ze.getComment();
-        if (comm != null && !"".equals(comm)) {
+        if (comm != null && !comm.isEmpty()) {
 
             final boolean commentEncodable = zipEncoding.canEncode(comm);
 

Reply via email to