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 2025/02/22 22:26:48 UTC

(commons-imaging) 04/09: Use StringUtils

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

commit 380a770d7b0627dc277f0c79db89d6831af0423a
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sat Feb 22 16:45:19 2025 -0500

    Use StringUtils
---
 .../org/apache/commons/imaging/examples/tiff/ReadTagsAndImages.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/test/java/org/apache/commons/imaging/examples/tiff/ReadTagsAndImages.java b/src/test/java/org/apache/commons/imaging/examples/tiff/ReadTagsAndImages.java
index e0743da0..99c616da 100644
--- a/src/test/java/org/apache/commons/imaging/examples/tiff/ReadTagsAndImages.java
+++ b/src/test/java/org/apache/commons/imaging/examples/tiff/ReadTagsAndImages.java
@@ -36,6 +36,7 @@ import org.apache.commons.imaging.formats.tiff.TiffReader;
 import org.apache.commons.imaging.formats.tiff.constants.GdalLibraryTagConstants;
 import org.apache.commons.imaging.formats.tiff.constants.GeoTiffTagConstants;
 import org.apache.commons.imaging.formats.tiff.constants.TiffTagConstants;
+import org.apache.commons.lang3.StringUtils;
 
 /**
  * Provides a example application showing how to access metadata and imagery from TIFF files using the low-level access routines. This approach is especially
@@ -346,7 +347,7 @@ public class ReadTagsAndImages {
         if (args.length == 2) {
             rootName = args[1];
         }
-        final boolean optionalImageReadingEnabled = rootName != null && !rootName.isEmpty();
+        final boolean optionalImageReadingEnabled = StringUtils.isNotEmpty(rootName);
 
         final ByteSource byteSource = ByteSource.file(target);
         final TiffImagingParameters params = new TiffImagingParameters();