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 8310bf62 Use String#isEmpty() 8310bf62 is described below commit 8310bf62197573fedf880ff7d4baab1b81a3635c Author: Gary Gregory <garydgreg...@gmail.com> AuthorDate: Fri Jun 2 09:37:33 2023 -0400 Use String#isEmpty() (build passes for me locally on Windows 10 and Linux 5.10.16.3-microsoft-standard-WSL2 #1 SMP Fri Apr 2 22:23:49 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux (within Windows WSL) --- src/main/java/org/apache/commons/imaging/Imaging.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/main/java/org/apache/commons/imaging/Imaging.java b/src/main/java/org/apache/commons/imaging/Imaging.java index 4c05fff1..79cb0c43 100644 --- a/src/main/java/org/apache/commons/imaging/Imaging.java +++ b/src/main/java/org/apache/commons/imaging/Imaging.java @@ -760,12 +760,12 @@ public final class Imaging { .of(imageFormat.getExtensions()) .anyMatch(extension -> { final String fileName = byteSource.getFileName(); - if (fileName == null || fileName.trim().length() == 0) { + if (fileName == null || fileName.trim().isEmpty()) { return false; } final String fileExtension = fileName.substring(fileName.lastIndexOf('.') + 1); return extension != null - && extension.trim().length() > 0 + && !extension.trim().isEmpty() && fileExtension.equalsIgnoreCase(extension); })) .findFirst()