RFR: 8341342: Elements.getAllModuleElements() does not work properly before JavacTask.analyze() [v3]
Vicente Romero
vromero at openjdk.org
Tue Aug 12 14:38:11 UTC 2025
On Tue, 12 Aug 2025 12:54:57 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:
>> 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.
>
> Jan Lahoda has updated the pull request incrementally with one additional commit since the last revision:
>
> Removing unnecessary explicit module initialization.
lgtm
-------------
Marked as reviewed by vromero (Reviewer).
PR Review: https://git.openjdk.org/jdk/pull/26694#pullrequestreview-3111025142
More information about the compiler-dev
mailing list