From fce204a155a2a8d2d71ab1989f2cb15161db9930 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Mon, 19 Feb 2024 04:43:19 +0000 Subject: [PATCH] deps: update dependency org.apache.commons:commons-compress to v1.26.0 --- gradle/libs.versions.toml | 2 +- utils/common/src/main/kotlin/ArchiveUtils.kt | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/gradle/libs.versions.toml b/gradle/libs.versions.toml index e40459820d0e5..6a1fd94610952 100644 --- a/gradle/libs.versions.toml +++ b/gradle/libs.versions.toml @@ -14,7 +14,7 @@ versionsPlugin = "0.51.0" asciidoctorj = "2.5.11" asciidoctorjPdf = "2.3.13" clikt = "4.2.2" -commonsCompress = "1.25.0" +commonsCompress = "1.26.0" cvssCalculator = "1.4.2" cyclonedx = "8.0.3" diffUtils = "4.12" diff --git a/utils/common/src/main/kotlin/ArchiveUtils.kt b/utils/common/src/main/kotlin/ArchiveUtils.kt index d0816eeca3627..6f7d39d871574 100644 --- a/utils/common/src/main/kotlin/ArchiveUtils.kt +++ b/utils/common/src/main/kotlin/ArchiveUtils.kt @@ -126,7 +126,7 @@ fun File.unpackTryAllTypes(targetDirectory: File, filter: (ArchiveEntry) -> Bool * and all entries not matched by the given [filter]. */ fun File.unpack7Zip(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { true }) { - SevenZFile(this).use { zipFile -> + SevenZFile.Builder().setFile(this).get().use { zipFile -> val canonicalTargetDirectory = targetDirectory.canonicalFile while (true) { @@ -162,13 +162,13 @@ fun File.unpack7Zip(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { * Unpack the [ByteArray] assuming it is a Zip archive, ignoring entries not matched by [filter]. */ fun ByteArray.unpackZip(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { true }) = - ZipFile(SeekableInMemoryByteChannel(this)).unpack(targetDirectory, filter) + ZipFile.Builder().setSeekableByteChannel(SeekableInMemoryByteChannel(this)).get().unpack(targetDirectory, filter) /** * Unpack the [File] assuming it is a Zip archive ignoring all entries not matched by [filter]. */ fun File.unpackZip(targetDirectory: File, filter: (ArchiveEntry) -> Boolean = { true }) = - ZipFile(this).unpack(targetDirectory, filter) + ZipFile.Builder().setFile(this).get().unpack(targetDirectory, filter) /** * Unpack the [ZipFile]. In contrast to [InputStream.unpackZip] this properly parses the ZIP's central directory, see