Integrated: 8341342: Elements.getAllModuleElements() does not work properly before JavacTask.analyze()

Jan Lahoda jlahoda at openjdk.org
Thu Aug 14 07:05:22 UTC 2025


On Fri, 8 Aug 2025 12:03:54 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.

This pull request has now been integrated.

Changeset: c22e01d7
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/c22e01d77648036db4ed640521e82c49f8791ca1
Stats:     76 lines in 3 files changed: 75 ins; 1 del; 0 mod

8341342: Elements.getAllModuleElements() does not work properly before JavacTask.analyze()

Reviewed-by: vromero, liach

-------------

PR: https://git.openjdk.org/jdk/pull/26694


More information about the compiler-dev mailing list