This is an automated email from the ASF dual-hosted git repository.
remm pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/tomcat-jakartaee-migration.git
The following commit(s) were added to refs/heads/master by this push:
new eabb165 Fix handling of nested archives
eabb165 is described below
commit eabb165632163890a36db0c4369cda2dc7d9be9f
Author: remm <[email protected]>
AuthorDate: Thu May 20 11:43:20 2021 +0200
Fix handling of nested archives
---
src/main/java/org/apache/tomcat/jakartaee/Migration.java | 6 ++++--
1 file changed, 4 insertions(+), 2 deletions(-)
diff --git a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
index 097c04e..f9a45c0 100644
--- a/src/main/java/org/apache/tomcat/jakartaee/Migration.java
+++ b/src/main/java/org/apache/tomcat/jakartaee/Migration.java
@@ -40,6 +40,8 @@ import
org.apache.commons.compress.archivers.zip.ZipArchiveOutputStream;
import org.apache.commons.compress.archivers.zip.ZipFile;
import org.apache.commons.compress.utils.SeekableInMemoryByteChannel;
import org.apache.commons.io.IOUtils;
+import org.apache.commons.io.input.CloseShieldInputStream;
+import org.apache.commons.io.output.CloseShieldOutputStream;
public class Migration {
@@ -209,8 +211,8 @@ public class Migration {
private void migrateArchiveStreaming(String name, InputStream src,
OutputStream dest) throws IOException {
- try (ZipArchiveInputStream srcZipStream = new
ZipArchiveInputStream(src);
- ZipArchiveOutputStream destZipStream = new
ZipArchiveOutputStream(dest)) {
+ try (ZipArchiveInputStream srcZipStream = new
ZipArchiveInputStream(new CloseShieldInputStream(src));
+ ZipArchiveOutputStream destZipStream = new
ZipArchiveOutputStream(new CloseShieldOutputStream(dest))) {
ZipArchiveEntry srcZipEntry;
while ((srcZipEntry = srcZipStream.getNextZipEntry()) != null) {
String srcName = srcZipEntry.getName();
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]