Skip to content

Commit

Permalink
Merge pull request #87 from austek/refactor/compress4j
Browse files Browse the repository at this point in the history
Use Compress4J
  • Loading branch information
rholshausen authored Jan 5, 2025
2 parents e2ca658 + 07e02ba commit 82e4839
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
2 changes: 1 addition & 1 deletion drivers/jvm/core/build.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ dependencies {
implementation 'org.apache.tika:tika-core:2.9.2'
implementation 'org.jetbrains.kotlin:kotlin-reflect:1.8.22'
implementation 'org.jetbrains.kotlin:kotlin-stdlib:1.8.22'
implementation 'org.rauschig:jarchivelib:1.2.0'
implementation 'io.github.compress4j:compress4j:2.1.1'
implementation 'org.apache.commons:commons-compress:1.26.1'

protobuf files('../../../proto/')
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,11 @@ import au.com.dius.pact.core.support.Result
import au.com.dius.pact.core.support.isNotEmpty
import au.com.dius.pact.core.support.json.JsonParser
import au.com.dius.pact.core.support.json.JsonValue
import io.github.compress4j.archivers.ArchiveFormat
import io.github.compress4j.archivers.ArchiverFactory
import io.github.oshai.kotlinlogging.KotlinLogging
import org.apache.commons.codec.digest.DigestUtils
import org.apache.commons.compress.archivers.zip.ZipArchiveEntry
import org.apache.commons.io.FilenameUtils
import org.apache.commons.io.IOUtils
import org.apache.commons.lang3.SystemUtils.IS_OS_LINUX
Expand All @@ -15,8 +18,6 @@ import org.apache.commons.lang3.SystemUtils.IS_OS_WINDOWS
import org.apache.commons.lang3.SystemUtils.OS_ARCH
import org.apache.commons.lang3.SystemUtils.OS_NAME
import org.apache.hc.client5.http.fluent.Request
import org.rauschig.jarchivelib.ArchiveFormat
import org.rauschig.jarchivelib.ArchiverFactory
import java.io.File
import java.io.StringReader
import java.util.zip.GZIPInputStream
Expand Down Expand Up @@ -192,7 +193,7 @@ object DefaultPluginDownloader: PluginDownloader {
}
}

val archiver = ArchiverFactory.createArchiver(ArchiveFormat.ZIP)
val archiver = ArchiverFactory.createArchiver<ZipArchiveEntry>(ArchiveFormat.ZIP)
archiver.extract(fileResult.value, pluginDir)
return Result.Ok(fileResult.value)
}
Expand Down

0 comments on commit 82e4839

Please sign in to comment.