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 2021/01/17 14:11:51 UTC

[commons-fileupload] branch master updated: Use 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-fileupload.git


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

commit e10e8a6d2115082909c1afe44c46cf7c0aaa689d
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Jan 17 09:11:46 2021 -0500

    Use isEmpty().
---
 src/main/java/org/apache/commons/fileupload2/util/mime/MimeUtility.java | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/main/java/org/apache/commons/fileupload2/util/mime/MimeUtility.java b/src/main/java/org/apache/commons/fileupload2/util/mime/MimeUtility.java
index eac17a3..690e394 100644
--- a/src/main/java/org/apache/commons/fileupload2/util/mime/MimeUtility.java
+++ b/src/main/java/org/apache/commons/fileupload2/util/mime/MimeUtility.java
@@ -231,7 +231,7 @@ public final class MimeUtility {
         final String encodedText = word.substring(encodingPos + 1, encodedTextPos);
 
         // seems a bit silly to encode a null string, but easy to deal with.
-        if (encodedText.length() == 0) {
+        if (encodedText.isEmpty()) {
             return "";
         }