From e922d103d4ca5efb889654c5573d0deec6161b94 Mon Sep 17 00:00:00 2001 From: Mikolaj Izdebski Date: Sat, 23 Sep 2017 11:43:45 +0200 Subject: [PATCH 1/2] Remove support for snappy --- .../java/org/codehaus/plexus/archiver/tar/TarArchiver.java | 3 +-- .../java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java | 3 +-- 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 index cae07804..070849c1 100644 --- 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; @@ -426,7 +425,7 @@ private OutputStream compress(TarCompressionMethod tarCompressionMethod, final O } 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 index 1b0b7950..0ae6e3b4 100644 --- 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; @@ -137,7 +136,7 @@ private InputStream decompress(UntarCompressionMethod compression, final File fi } 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) { -- 2.45.2