Repository navigation
Conversation
Pack200 cannot represent module attributes, and passing a module-info class to the ASM visitor fails with "Module requires ASM6". Treat class files with ACC_MODULE as pass files so their bytes are stored unchanged, as Segment already does for a class with an attribute whose action is "pass". PackingOptions.isPassFile() returned after checking the first directory entry, so a configured pass directory hid any pass file added after it. Keep checking the remaining entries. Generated-by: OpenAI GPT-6 Astra Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Bring the branch up to date with master before review. Assisted-By: Claude Opus 5.5 <noreply@anthropic.com>
Clickin
marked this pull request as ready for review
November 8, 2026 11:37
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
JIRA: https://issues.apache.org/jira/browse/COMPRESS-634
Packing a JAR that contains
module-info.classfails withUnsupportedOperationException: Module requires ASM6fromSegment.processClasses. Raising the ASM API level alone doesn't help, because Pack200 has no bands for Module attributes.Archive.addJarEntrynow registers a class withACC_MODULEas a pass file, so the descriptor is stored byte for byte.Segment.processClassesalready does this for a class with an attribute whose action is "pass".PackingOptions.isPassFilereturned the result for the first directory entry, so a configured pass directory hid every pass entry added after it, including the descriptor above. It now checks all entries.There is no ASM upgrade and no public API change. Not addressed: on JDK 17, unpacking directly from a
FileInputStreamhits the reflection problem tracked in COMPRESS-721 (PR #764).ArchiveTest.testModuleInfopacks and unpacks a JAR with a module descriptor and one ordinary class, then checks that the descriptor bytes are identical and the class is present. Its 8 cases vary the descriptor location (root,META-INF/versions/9/), the input (JarFile,JarInputStream), the segment limit (-1, 0) and an unrelated pass directory. On master, the four cases without a pass directory fail with "Module requires ASM6". The four with one still fail without theisPassFilefix.The default
mvnbuild passes on JDK 17, andmvn clean testpasses on JDK 8.OpenAI GPT-6 Astra wrote the change and the tests; Claude Opus 5.5 reviewed them and wrote this description. The commit carries
Generated-byandAssisted-Bytrailers.mvn; that'smvnon the command line by itself.🤖 Generated with Claude Code