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 2020/11/01 13:44:06 UTC
[commons-compress] branch master updated: Access static methods
directly.
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
The following commit(s) were added to refs/heads/master by this push:
new ea1cba2 Access static methods directly.
ea1cba2 is described below
commit ea1cba21dcd1dfa62806d1846b5749e06b752a18
Author: Gary Gregory <ga...@gmail.com>
AuthorDate: Sun Nov 1 08:44:00 2020 -0500
Access static methods directly.
---
src/main/java/org/apache/commons/compress/archivers/Lister.java | 2 +-
.../java/org/apache/commons/compress/archivers/examples/Expander.java | 2 +-
2 files 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 5f5705c..0b65199 100644
--- a/src/main/java/org/apache/commons/compress/archivers/Lister.java
+++ b/src/main/java/org/apache/commons/compress/archivers/Lister.java
@@ -81,7 +81,7 @@ public final class Lister {
private static String detectFormat(final File f) throws ArchiveException, IOException {
try (final InputStream fis = new BufferedInputStream(Files.newInputStream(f.toPath()))) {
- return FACTORY.detect(fis);
+ return ArchiveStreamFactory.detect(fis);
}
}
diff --git a/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java b/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java
index ce3e086..803381d 100644
--- a/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java
+++ b/src/main/java/org/apache/commons/compress/archivers/examples/Expander.java
@@ -66,7 +66,7 @@ public class Expander {
public void expand(final File archive, final File targetDirectory) throws IOException, ArchiveException {
String format = null;
try (InputStream i = new BufferedInputStream(Files.newInputStream(archive.toPath()))) {
- format = ArchiveStreamFactory.DEFAULT.detect(i);
+ format = ArchiveStreamFactory.detect(i);
}
expand(format, archive, targetDirectory);
}