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

commit b4e9ba85d817d44ad34bda3f41794900d81cef8e
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 17 10:12:00 2021 -0500

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

diff --git a/src/main/java/org/apache/commons/fileupload2/ParameterParser.java 
b/src/main/java/org/apache/commons/fileupload2/ParameterParser.java
index a8a2528..04e7fd0 100644
--- a/src/main/java/org/apache/commons/fileupload2/ParameterParser.java
+++ b/src/main/java/org/apache/commons/fileupload2/ParameterParser.java
@@ -326,7 +326,7 @@ public class ParameterParser {
             if (hasChar() && (charArray[pos] == separator)) {
                 pos++; // skip separator
             }
-            if ((paramName != null) && (paramName.length() > 0)) {
+            if ((paramName != null) && !paramName.isEmpty()) {
                 paramName = RFC2231Utility.stripDelimiter(paramName);
                 if (this.lowerCaseNames) {
                     paramName = paramName.toLowerCase(Locale.ENGLISH);

Reply via email to