2024-07-01 14:23:47 +02:00
|
|
|
From e922d103d4ca5efb889654c5573d0deec6161b94 Mon Sep 17 00:00:00 2001
|
2024-05-03 19:23:02 +02:00
|
|
|
From: Mikolaj Izdebski <mizdebsk@redhat.com>
|
|
|
|
Date: Sat, 23 Sep 2017 11:43:45 +0200
|
2024-07-01 14:23:47 +02:00
|
|
|
Subject: [PATCH 1/2] Remove support for snappy
|
2024-05-03 19:23:02 +02:00
|
|
|
|
|
|
|
---
|
2024-07-01 14:23:47 +02:00
|
|
|
.../java/org/codehaus/plexus/archiver/tar/TarArchiver.java | 3 +--
|
|
|
|
.../java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java | 3 +--
|
2024-05-03 19:23:02 +02:00
|
|
|
2 files changed, 2 insertions(+), 4 deletions(-)
|
|
|
|
|
|
|
|
diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
2024-07-01 14:23:47 +02:00
|
|
|
index cae07804..070849c1 100644
|
2024-05-03 19:23:02 +02:00
|
|
|
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
|
|
|
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
|
|
|
@@ -42,7 +42,6 @@
|
|
|
|
import org.codehaus.plexus.components.io.resources.PlexusIoResource;
|
|
|
|
import org.codehaus.plexus.util.IOUtil;
|
|
|
|
import org.codehaus.plexus.util.StringUtils;
|
|
|
|
-import org.iq80.snappy.SnappyOutputStream;
|
|
|
|
|
|
|
|
import static org.codehaus.plexus.archiver.util.Streams.bufferedOutputStream;
|
|
|
|
|
2024-07-01 14:23:47 +02:00
|
|
|
@@ -426,7 +425,7 @@ private OutputStream compress(TarCompressionMethod tarCompressionMethod, final O
|
2024-05-03 19:23:02 +02:00
|
|
|
} else if (TarCompressionMethod.bzip2.equals(tarCompressionMethod)) {
|
|
|
|
return new BZip2CompressorOutputStream(bufferedOutputStream(ostream));
|
|
|
|
} else if (TarCompressionMethod.snappy.equals(tarCompressionMethod)) {
|
|
|
|
- return new SnappyOutputStream(bufferedOutputStream(ostream));
|
|
|
|
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support snappy compression" );
|
|
|
|
} else if (TarCompressionMethod.xz.equals(tarCompressionMethod)) {
|
|
|
|
return new XZCompressorOutputStream(bufferedOutputStream(ostream));
|
|
|
|
} else if (TarCompressionMethod.zstd.equals(tarCompressionMethod)) {
|
|
|
|
diff --git a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
2024-07-01 14:23:47 +02:00
|
|
|
index 1b0b7950..0ae6e3b4 100644
|
2024-05-03 19:23:02 +02:00
|
|
|
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
|
|
|
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
|
|
|
@@ -32,7 +32,6 @@
|
|
|
|
import org.codehaus.plexus.archiver.ArchiverException;
|
|
|
|
import org.codehaus.plexus.archiver.util.Streams;
|
|
|
|
import org.codehaus.plexus.components.io.filemappers.FileMapper;
|
|
|
|
-import org.iq80.snappy.SnappyFramedInputStream;
|
|
|
|
|
|
|
|
import static org.codehaus.plexus.archiver.util.Streams.bufferedInputStream;
|
|
|
|
import static org.codehaus.plexus.archiver.util.Streams.fileInputStream;
|
2024-07-01 14:23:47 +02:00
|
|
|
@@ -137,7 +136,7 @@ private InputStream decompress(UntarCompressionMethod compression, final File fi
|
2024-05-03 19:23:02 +02:00
|
|
|
} else if (compression == UntarCompressionMethod.BZIP2) {
|
|
|
|
return new BZip2CompressorInputStream(istream);
|
|
|
|
} else if (compression == UntarCompressionMethod.SNAPPY) {
|
|
|
|
- return new SnappyFramedInputStream(istream, true);
|
|
|
|
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support snappy compression" );
|
|
|
|
} else if (compression == UntarCompressionMethod.XZ) {
|
|
|
|
return new XZCompressorInputStream(istream);
|
|
|
|
} else if (compression == UntarCompressionMethod.ZSTD) {
|
|
|
|
--
|
2024-07-01 14:23:47 +02:00
|
|
|
2.45.2
|
2024-05-03 19:23:02 +02:00
|
|
|
|