RFR: 8361316: javadoc tool fails with an exception for an inheritdoc on throws clause of a constructor

Hannes Wallnöfer hannesw at openjdk.org
Wed Jul 30 15:41:28 UTC 2025


Please review a simple fix for a javadoc failure when `{@inheritDoc}` is placed in the `@throws` tag of a constructor. 

`{@inheritDoc}` tags in invalid locations are treated as warnings, so we add a check for the warning and ignore the `{@inheritDoc}` when rendering the `@throws` tag.

The test also checks `{@inheritDoc}` tags in a few other locations, such as field descriptions, constructor descriptions, and `@param` tags of constructors. The patch also includes some whitespace cleanup in the warning message and the existing tests.

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

Commit messages:
 - 8361316: javadoc tool fails with an exception for an inheritdoc on throws clause of a constructor

Changes: https://git.openjdk.org/jdk/pull/26557/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=26557&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8361316
  Stats: 93 lines in 3 files changed: 71 ins; 1 del; 21 mod
  Patch: https://git.openjdk.org/jdk/pull/26557.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26557/head:pull/26557

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


More information about the javadoc-dev mailing list