apache-commons-compress/0001-Remove-Brotli-compressor.patch

38 lines
1.8 KiB
Diff
Raw Normal View History

From d42b16c3334229cc400c6713f3bd11c8df2f70cc Mon Sep 17 00:00:00 2001
2018-02-12 10:02:38 +00:00
From: Michael Simacek <msimacek@redhat.com>
Date: Mon, 12 Feb 2018 10:53:48 +0100
Subject: [PATCH 1/3] Remove Brotli compressor
2017-06-14 12:52:16 +00:00
---
.../compress/compressors/CompressorStreamFactory.java | 7 +------
2018-02-12 10:02:38 +00:00
1 file changed, 1 insertion(+), 6 deletions(-)
2017-06-14 12:52:16 +00:00
diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
2021-08-06 13:09:23 +00:00
index db0d305..0f1394f 100644
2017-06-14 12:52:16 +00:00
--- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
@@ -31,8 +31,6 @@ import java.util.Set;
import java.util.SortedMap;
import java.util.TreeMap;
-import org.apache.commons.compress.compressors.brotli.BrotliCompressorInputStream;
-import org.apache.commons.compress.compressors.brotli.BrotliUtils;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
import org.apache.commons.compress.compressors.deflate.DeflateCompressorInputStream;
2021-08-06 13:09:23 +00:00
@@ -579,10 +577,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
2017-06-14 12:52:16 +00:00
}
2018-02-12 10:02:38 +00:00
if (BROTLI.equalsIgnoreCase(name)) {
2017-06-14 12:52:16 +00:00
- if (!BrotliUtils.isBrotliCompressionAvailable()) {
2018-02-12 10:02:38 +00:00
- throw new CompressorException("Brotli compression is not available." + YOU_NEED_BROTLI_DEC);
2017-06-14 12:52:16 +00:00
- }
- return new BrotliCompressorInputStream(in);
2018-02-12 10:02:38 +00:00
+ throw new CompressorException("Brotli compression is not available in this build.");
}
2017-06-14 12:52:16 +00:00
if (XZ.equalsIgnoreCase(name)) {
--
2.20.1
2017-06-14 12:52:16 +00:00