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/07/20 14:42:50 UTC
(commons-compress) 05/07: Use StringUtils.toRootLowerCase
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-compress.git
commit 0dce20ce21e8038b68905f81bad4bae10f16c188
Author: Gary D. Gregory <ga...@gmail.com>
AuthorDate: Sun Jul 20 10:42:10 2025 -0400
Use StringUtils.toRootLowerCase
---
src/main/java/org/apache/commons/compress/archivers/Lister.java | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/archivers/Lister.java b/src/main/java/org/apache/commons/compress/archivers/Lister.java
index 9086b907d..819141ddf 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -25,13 +25,13 @@
import java.nio.file.Files;
import java.nio.file.Path;
import java.nio.file.Paths;
-import java.util.Locale;
import java.util.Objects;
import org.apache.commons.compress.archivers.sevenz.SevenZFile;
import org.apache.commons.compress.archivers.tar.TarFile;
import org.apache.commons.compress.archivers.zip.ZipFile;
import org.apache.commons.lang3.ArrayUtils;
+import org.apache.commons.lang3.StringUtils;
/**
* Simple command line application that lists the contents of an archive.
@@ -119,7 +119,7 @@ private void list(final Path file, final String... args) throws ArchiveException
if (!Files.isRegularFile(file)) {
System.err.println(file + " doesn't exist or is a directory");
}
- final String format = (args.length > 1 ? args[1] : detectFormat(file)).toLowerCase(Locale.ROOT);
+ final String format = StringUtils.toRootLowerCase(args.length > 1 ? args[1] : detectFormat(file));
println("Detected format " + format);
switch (format) {
case ArchiveStreamFactory.SEVEN_Z: