Integrated: 8296390: Incremental build failed with a NPE

Jan Lahoda jlahoda at openjdk.org
Wed Nov 30 09:50:40 UTC 2022


On Fri, 4 Nov 2022 14:05:05 GMT, Jan Lahoda <jlahoda at openjdk.org> wrote:

> In [Enter](https://github.com/openjdk/jdk/blob/22347e46f7e66a864ea987fa084c44792cae2e6a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Enter.java#L617), we finish verification that imports in files are valid. But, if the module graph is not finished yet (modules are not initialized), we defer checking imports in module-infos until the modules are setup.
> 
> What can happen is that `java.base`', if load lazily, may not be completed as part of module system initialization, and can trigger imports check in other module prematurely.
> 
> The proposal is to explicitly complete `java.base` while setting up the compile-time module system. Other (named) modules are normally completed around the same time while [building all modules](https://github.com/openjdk/jdk/blob/22347e46f7e66a864ea987fa084c44792cae2e6a/src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Modules.java#L1414).

This pull request has now been integrated.

Changeset: 9e80cf9c
Author:    Jan Lahoda <jlahoda at openjdk.org>
URL:       https://git.openjdk.org/jdk/commit/9e80cf9c37f4dbc6e176a59dce92817c109dd561
Stats:     40 lines in 2 files changed: 39 ins; 0 del; 1 mod

8296390: Incremental build failed with a NPE

Reviewed-by: vromero

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

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


More information about the compiler-dev mailing list