RFR: 8370334: javadoc NPE with "import module" statement

Jan Lahoda jlahoda at openjdk.org
Fri Oct 24 12:26:48 UTC 2025


`Modules.enter` completes all root modules, but in case of additional modules being added to the module graph via `Modules.addExtraAddModules` (either from javadoc, or using the `CompilationTask.addModules`, these extra modules may not be completed at this time. Normally, they are completed eventually, but if their `module-info`s contain `import module`, an NPE will appear while checking the import, before the complete happens.

The proposal herein is to consistently complete all modules in the module graph when the module graphs is setup.

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

Commit messages:
 - Adding javac test.
 - Cleanup.
 - 8370334: javadoc NPE with "import module" statement

Changes: https://git.openjdk.org/jdk/pull/27974/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=27974&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8370334
  Stats: 73 lines in 3 files changed: 68 ins; 0 del; 5 mod
  Patch: https://git.openjdk.org/jdk/pull/27974.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/27974/head:pull/27974

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


More information about the javadoc-dev mailing list