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


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

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

    Use isEmpty().
---
 src/main/java/org/apache/commons/imaging/common/BasicCParser.java | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/src/main/java/org/apache/commons/imaging/common/BasicCParser.java 
b/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
index 5838773..c9ebc48 100644
--- a/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
+++ b/src/main/java/org/apache/commons/imaging/common/BasicCParser.java
@@ -295,14 +295,14 @@ public class BasicCParser {
         final String[] tokens = row.split("[ \t]");
         int numLiveTokens = 0;
         for (final String token : tokens) {
-            if (token != null && token.length() > 0) {
+            if (token != null && !token.isEmpty()) {
                 ++numLiveTokens;
             }
         }
         final String[] liveTokens = new String[numLiveTokens];
         int next = 0;
         for (final String token : tokens) {
-            if (token != null && token.length() > 0) {
+            if (token != null && !token.isEmpty()) {
                 liveTokens[next++] = token;
             }
         }

Reply via email to