Skip to content

Commit

Permalink
Stop using deprecated commons-compress APIs
Browse files Browse the repository at this point in the history
  • Loading branch information
akurtakov committed Feb 25, 2024
1 parent 993e55a commit 5593e5b
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -208,7 +208,7 @@ private Map<String, TarArchiveEntry> getTarEntries() throws IOException, FileNot
try (TarArchiveInputStream tarStream = new TarArchiveInputStream(
new GzipCompressorInputStream(new FileInputStream(tarGzArchive)))) {
TarArchiveEntry tarEntry = null;
while ((tarEntry = tarStream.getNextTarEntry()) != null) {
while ((tarEntry = tarStream.getNextEntry()) != null) {
entries.put(tarEntry.getName(), tarEntry);
}
}
Expand All @@ -219,7 +219,7 @@ private byte[] getTarEntry(String name) throws IOException {
try (TarArchiveInputStream tarStream = new TarArchiveInputStream(
new GzipCompressorInputStream(new FileInputStream(tarGzArchive)))) {
TarArchiveEntry tarEntry = null;
while ((tarEntry = tarStream.getNextTarEntry()) != null) {
while ((tarEntry = tarStream.getNextEntry()) != null) {
if (name.equals(tarEntry.getName())) {
ByteArrayOutputStream baos = new ByteArrayOutputStream();
tarStream.transferTo(baos);
Expand Down

0 comments on commit 5593e5b

Please sign in to comment.