ppkarwasz opened a new pull request, #684: URL: https://github.com/apache/commons-compress/pull/684
This refactor unifies and streamlines how `TarFile` and `TarArchiveInputStream` process special archive members, ensuring consistent interpretation across both APIs. **Key changes:** * Extracted the shared logic for interpreting GNU long name/long link records and POSIX/PAX extended headers into `TarUtils`. * Added translation of legacy GNU long name/long link records into equivalent PAX extended header records for a unified internal representation. * Kept `TarArchiveInputStream.getLongNameData` for backward compatibility (it is `protected`), but **deprecates** it. **Benefits:** * Single point of maintenance for special record parsing. * Consistent behavior between streaming and file-based tar readers. * Simplifies adding support for new record types or extensions in the future. This change does **not** introduce new functionality, so the existing unit test suite should be sufficient to validate correctness. If any coverage gaps are identified during review or CI runs, I will add targeted test cases to address the uncovered scenarios. Before you push a pull request, review this list: - [x] I used AI to proofread the changes. - [x] Run a successful build using the default [Maven](https://maven.apache.org/) goal with `mvn`; that's `mvn` on the command line by itself. - [ ] Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible, but it is a best-practice. - [x] Write a pull request description that is detailed enough to understand what the pull request does, how, and why. - [x] Each commit in the pull request should have a meaningful subject line and body. Note that a maintainer may squash commits during the merge process. -- 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]
