Skip to content

Support CONSTANT_Module/CONSTANT_Package tags (#252) - #603

Open
kallal79 wants to merge 1 commit into
javapathfinder:masterfrom
kallal79:issue-252-constant-pool
Open

Support CONSTANT_Module/CONSTANT_Package tags (#252)#603
kallal79 wants to merge 1 commit into
javapathfinder:masterfrom
kallal79:issue-252-constant-pool

Conversation

@kallal79

@kallal79 kallal79 commented Mar 3, 2026

Copy link
Copy Markdown

This change implements full support for the two constant‑pool entries introduced in Java 9:

added CONSTANT_Module (tag 19) and CONSTANT_Package (tag 20) constants
extended ClassFile.parseCp() (first‑ and second‑pass) to recognise and resolve them
updated ClassFilePrinter so that the new entries are printed in dumps
added a new regression test, PackageModuleConstantTest, which:
dynamically compiles module-info.java and package-info.java
verifies that the resulting class files contain the module or package name in cpValue
uses an external javac invocation and relaxed matching to be safe under parallel test execution
minor fixes to existing FileTest/URLClassLoaderTest tests to ensure they run cleanly
updated output.txt with the new constant names
All existing tests continue to pass; the full build now succeeds with 1016 parallel + 16 single‑thread tests.

This addresses issue #252.

…er#252) with regression tests and parallel-safe compiler usage
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant