steveloughran commented on PR #6636:
URL: https://github.com/apache/hadoop/pull/6636#issuecomment-2021234507

   looking at the code which doesn't compile
   
   ```java
   TarArchiveOutputStream out = new TarArchiveOutputStream(targetStream)
   ...
           try (FileInputStream inputStream = new FileInputStream(file)) {
             ArchiveEntry entry = out.createArchiveEntry(file, file.getName());
             out.putArchiveEntry(entry);  // HERE
             IOUtils.copyBytes(inputStream, out, 1024 * 1024);
             out.closeArchiveEntry();
           }
   ```
   
   suspect that `TarArchiveOutputStream create/put` now return and require a 
TarArchiveEntry; the current library just casts it.
   
   ```java
     public void putArchiveEntry(ArchiveEntry archiveEntry) throws IOException {
       if (this.finished) {
         throw new IOException("Stream has already been finished");
       } else {
         TarArchiveEntry entry = (TarArchiveEntry)archiveEntry;
   ```
   
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]


---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to