apache-commons-compress/0003-Remove-Pack200-compressor.patch
Marian Koncek 913f76ddac Update to upstream version 1.21
Resolves: rhbz#1983237
Resolves: rhbz#1983166
Resolves: rhbz#1983215
Resolves: rhbz#1983229
2021-08-06 14:13:33 +02:00

55 lines
2.6 KiB
Diff

From 9937297a90b43a5e1238932eb8a07c44303056ed Mon Sep 17 00:00:00 2001
From: Marian Koncek <mkoncek@redhat.com>
Date: Fri, 6 Aug 2021 13:42:40 +0200
Subject: [PATCH] Remove Pack200 compressor
---
.../compress/compressors/CompressorStreamFactory.java | 10 ++--------
1 file changed, 2 insertions(+), 8 deletions(-)
diff --git a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
index eee7c31..de7da23 100644
--- a/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
+++ b/src/main/java/org/apache/commons/compress/compressors/CompressorStreamFactory.java
@@ -45,8 +45,6 @@ import org.apache.commons.compress.compressors.lz4.FramedLZ4CompressorOutputStre
import org.apache.commons.compress.compressors.lzma.LZMACompressorInputStream;
import org.apache.commons.compress.compressors.lzma.LZMACompressorOutputStream;
import org.apache.commons.compress.compressors.lzma.LZMAUtils;
-import org.apache.commons.compress.compressors.pack200.Pack200CompressorInputStream;
-import org.apache.commons.compress.compressors.pack200.Pack200CompressorOutputStream;
import org.apache.commons.compress.compressors.snappy.FramedSnappyCompressorInputStream;
import org.apache.commons.compress.compressors.snappy.FramedSnappyCompressorOutputStream;
import org.apache.commons.compress.compressors.snappy.SnappyCompressorInputStream;
@@ -478,10 +476,6 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
return GZIP;
}
- if (Pack200CompressorInputStream.matches(signature, signatureLength)) {
- return PACK200;
- }
-
if (FramedSnappyCompressorInputStream.matches(signature, signatureLength)) {
return SNAPPY_FRAMED;
}
@@ -592,7 +586,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
}
if (PACK200.equalsIgnoreCase(name)) {
- return new Pack200CompressorInputStream(in);
+ throw new CompressorException("Pack200 compression is not available in this build.");
}
if (SNAPPY_RAW.equalsIgnoreCase(name)) {
@@ -673,7 +667,7 @@ public class CompressorStreamFactory implements CompressorStreamProvider {
}
if (PACK200.equalsIgnoreCase(name)) {
- return new Pack200CompressorOutputStream(out);
+ throw new CompressorException("Pack200 compression is not available in this build.");
}
if (LZMA.equalsIgnoreCase(name)) {
--
2.31.1