RFR: 8341342: Elements.getAllModuleElements() does not work properly before JavacTask.analyze()
Jan Lahoda
jlahoda at openjdk.org
Fri Aug 8 12:39:03 UTC 2025
When calling `Elements.getTypeElement(...)` or `Elements.getPackageElement(...)`, javac itself ensures that the enter phase is already done. That is, sadly, not done for `Elements.getAllModuleElements()`. This PR fixes that.
See:
https://github.com/openjdk/jdk/pull/18934/files#r1767657515
for a practical case.
-------------
Commit messages:
- Removing trailing whitespace.
- 8341342: Elements.getAllModuleElements() does not work properly before JavacTask.analyze()
Changes: https://git.openjdk.org/jdk/pull/26694/files
Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26694&range=00
Issue: https://bugs.openjdk.org/browse/JDK-8341342
Stats: 73 lines in 2 files changed: 73 ins; 0 del; 0 mod
Patch: https://git.openjdk.org/jdk/pull/26694.diff
Fetch: git fetch https://git.openjdk.org/jdk.git pull/26694/head:pull/26694
PR: https://git.openjdk.org/jdk/pull/26694
More information about the compiler-dev
mailing list