2024-06-13 09:06:49 +02:00
|
|
|
From f703c72614a8d78af30152f83004ac74ec8aadae Mon Sep 17 00:00:00 2001
|
|
|
|
From: =?UTF-8?q?Fridrich=20=C5=A0trba?= <fridrich.strba@bluewin.ch>
|
|
|
|
Date: Thu, 13 Jun 2024 09:02:59 +0200
|
|
|
|
Subject: [PATCH 2/2] Remove support for zstd
|
|
|
|
|
|
|
|
---
|
|
|
|
.../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 070849c1..c0f10c60 100644
|
|
|
|
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
|
|
|
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarArchiver.java
|
2023-09-04 20:53:35 +02:00
|
|
|
@@ -29,7 +29,6 @@
|
|
|
|
import org.apache.commons.compress.archivers.tar.TarArchiveOutputStream;
|
|
|
|
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorOutputStream;
|
|
|
|
import org.apache.commons.compress.compressors.xz.XZCompressorOutputStream;
|
|
|
|
-import org.apache.commons.compress.compressors.zstandard.ZstdCompressorOutputStream;
|
|
|
|
import org.codehaus.plexus.archiver.AbstractArchiver;
|
|
|
|
import org.codehaus.plexus.archiver.ArchiveEntry;
|
|
|
|
import org.codehaus.plexus.archiver.ArchiverException;
|
2024-06-13 09:06:49 +02:00
|
|
|
@@ -429,7 +428,7 @@ private OutputStream compress(TarCompressionMethod tarCompressionMethod, final O
|
2023-09-04 20:53:35 +02:00
|
|
|
} else if (TarCompressionMethod.xz.equals(tarCompressionMethod)) {
|
|
|
|
return new XZCompressorOutputStream(bufferedOutputStream(ostream));
|
|
|
|
} else if (TarCompressionMethod.zstd.equals(tarCompressionMethod)) {
|
|
|
|
- return new ZstdCompressorOutputStream(bufferedOutputStream(ostream));
|
|
|
|
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support zstd compression" );
|
|
|
|
}
|
|
|
|
|
|
|
|
return ostream;
|
2024-06-13 09:06:49 +02:00
|
|
|
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 0ae6e3b4..8fa6e925 100644
|
|
|
|
--- a/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
|
|
|
+++ b/src/main/java/org/codehaus/plexus/archiver/tar/TarUnArchiver.java
|
2023-09-04 20:53:35 +02:00
|
|
|
@@ -27,7 +27,6 @@
|
|
|
|
import org.apache.commons.compress.archivers.tar.TarArchiveInputStream;
|
|
|
|
import org.apache.commons.compress.compressors.bzip2.BZip2CompressorInputStream;
|
|
|
|
import org.apache.commons.compress.compressors.xz.XZCompressorInputStream;
|
|
|
|
-import org.apache.commons.compress.compressors.zstandard.ZstdCompressorInputStream;
|
|
|
|
import org.codehaus.plexus.archiver.AbstractUnArchiver;
|
|
|
|
import org.codehaus.plexus.archiver.ArchiverException;
|
|
|
|
import org.codehaus.plexus.archiver.util.Streams;
|
2024-06-13 09:06:49 +02:00
|
|
|
@@ -140,7 +139,7 @@ private InputStream decompress(UntarCompressionMethod compression, final File fi
|
2023-09-04 20:53:35 +02:00
|
|
|
} else if (compression == UntarCompressionMethod.XZ) {
|
|
|
|
return new XZCompressorInputStream(istream);
|
|
|
|
} else if (compression == UntarCompressionMethod.ZSTD) {
|
|
|
|
- return new ZstdCompressorInputStream(istream);
|
|
|
|
+ throw new UnsupportedOperationException( "This version of plexus-archiver does not support zstd compression" );
|
|
|
|
}
|
|
|
|
return istream;
|
|
|
|
}
|
2024-06-13 09:06:49 +02:00
|
|
|
--
|
|
|
|
2.45.2
|
|
|
|
|