This is an automated email from the ASF dual-hosted git repository.

ggregory pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/commons-compress.git


The following commit(s) were added to refs/heads/master by this push:
     new a5749e153 Revert "Remove unused instance variable"
a5749e153 is described below

commit a5749e15396b80eca689e7568981aa91c910de27
Author: Gary Gregory <[email protected]>
AuthorDate: Sun Jan 14 15:43:34 2024 -0500

    Revert "Remove unused instance variable"
    
    This reverts commit 64d95d94cae07a8eee7996b2e79fc2c3eb3bcc36.
---
 .../apache/commons/compress/archivers/tar/TarArchiveInputStream.java  | 4 ++++
 1 file changed, 4 insertions(+)

diff --git 
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
 
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
index 652dd08db..f0ce211fe 100644
--- 
a/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
+++ 
b/src/main/java/org/apache/commons/compress/archivers/tar/TarArchiveInputStream.java
@@ -111,6 +111,9 @@ public class TarArchiveInputStream extends 
ArchiveInputStream<TarArchiveEntry> {
     /** The encoding of the file. */
     private final ZipEncoding zipEncoding;
 
+    /** The provided encoding (for unit tests). */
+    final String encoding;
+
     /** The global PAX header. */
     private Map<String, String> globalPaxHeaders = new HashMap<>();
 
@@ -188,6 +191,7 @@ public class TarArchiveInputStream extends 
ArchiveInputStream<TarArchiveEntry> {
     public TarArchiveInputStream(final InputStream inputStream, final int 
blockSize, final int recordSize, final String encoding, final boolean lenient) {
         this.inputStream = inputStream;
         this.atEof = false;
+        this.encoding = encoding;
         this.zipEncoding = ZipEncodingHelper.getZipEncoding(encoding);
         this.recordSize = recordSize;
         this.recordBuffer = new byte[recordSize];

Reply via email to