Skip to content

Commit efa196e

Browse files
Remove unused import and usage of deprecated method
1 parent 7c92b6e commit efa196e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

gxcompress/src/main/java/com/genexus/compression/GXCompressor.java

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@
55
import com.genexus.SdtMessages_Message;
66
import com.genexus.StructSdtMessages_Message;
77
import org.apache.commons.compress.compressors.gzip.GzipCompressorOutputStream;
8-
import org.apache.commons.compress.compressors.gzip.GzipParameters;
98
import org.apache.logging.log4j.Logger;
109

1110
import org.apache.commons.compress.archivers.sevenz.SevenZArchiveEntry;
@@ -501,7 +500,7 @@ private static void decompressTar(File archive, String directory) throws IOExcep
501500
TarArchiveInputStream tis = new TarArchiveInputStream(Files.newInputStream(archive.toPath()));
502501
TarArchiveEntry entry;
503502
byte[] buffer = new byte[8192];
504-
while ((entry = tis.getNextTarEntry()) != null) {
503+
while ((entry = tis.getNextEntry()) != null) {
505504
File newFile = new File(directory, entry.getName());
506505
if (entry.isDirectory()) {
507506
if (!newFile.isDirectory() && !newFile.mkdirs()) {
@@ -547,7 +546,7 @@ private static void decompressGzip(File archive, String directory) throws IOExce
547546
boolean isTar = false;
548547
try (FileInputStream tempFis = new FileInputStream(tempFile);
549548
TarArchiveInputStream testTar = new TarArchiveInputStream(tempFis)) {
550-
TarArchiveEntry testEntry = testTar.getNextTarEntry();
549+
TarArchiveEntry testEntry = testTar.getNextEntry();
551550
if (testEntry != null) {
552551
isTar = true;
553552
}
@@ -557,7 +556,7 @@ private static void decompressGzip(File archive, String directory) throws IOExce
557556
TarArchiveInputStream tarInput = new TarArchiveInputStream(tarFis)) {
558557

559558
TarArchiveEntry entry;
560-
while ((entry = tarInput.getNextTarEntry()) != null) {
559+
while ((entry = tarInput.getNextEntry()) != null) {
561560
File outFile = new File(targetDir, entry.getName());
562561
if (entry.isDirectory()) {
563562
if (!outFile.exists() && !outFile.mkdirs()) {

0 commit comments

Comments
 (0)