Skip to content

Read module descriptors without ASM - #242

Draft
slachiewicz wants to merge 2 commits into
masterfrom
agent/module-attribute-reader
Draft

slachiewicz wants to merge 2 commits into
masterfrom
agent/module-attribute-reader

Conversation

@slachiewicz

@slachiewicz slachiewicz commented Sep 26, 2026 •

Copy link
Copy Markdown
Member

Replaces AsmModuleInfoParser with a reader of the Module attribute (JVMS 4.7.25) and drops the org.ow2.asm dependency and requires org.objectweb.asm. The reader does not check the class file version, so a module-info.class from any future JDK parses without a library release; the only thing that could break it is a new constant pool tag.

One of two alternatives for #165, for comparison with #244, which keeps ASM and adds a Java 24 Class File API layer. A side-by-side test against ASM gave identical descriptors for all 8 module-info.class files and jar entries under src/test/test-data; that test is not part of this PR.

Main code: +302 / −137 lines. The java9 ModuleDescriptor.read parser is unchanged.

Includes the CI commit from #243 so the JDK 26, 27 and 28-ea legs exercise the reader.

@slachiewicz slachiewicz added the enhancement New feature or request label Sep 26, 2026
Spotless is skipped on JDK 27+ until palantir-java-format runs there
(palantir/palantir-java-format#1785); drop the profile once it does.

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant