[jdk19] RFR: 8287379: Using @inheritDoc in an inapplicable context shouldn't crash javadoc [v3]

Jonathan Gibbons jjg at openjdk.org
Mon Jun 27 22:06:45 UTC 2022


On Mon, 27 Jun 2022 20:38:32 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

>> This rights the wrongs of JDK-8008768. For more information, see the respective CSR.
>
> Pavel Rappo has updated the pull request incrementally with one additional commit since the last revision:
> 
>   feedback: make method positive

This is a general response to the edits in `testRelativeLinks`.

There are various circumstances in which relative links need to be fixed up, all related to taking content containing links from one place and using it in another. These include:
* the first sentence of a class or interface comment, showing up in a package summary
* the first sentence of a package comment showing up in a module summary
* info being inherited from one file into another by means of `{@inherotDoc}`.
* etc ... info showing up on "other pages", like serialized-form, constant-values.

While I do not expect a full review of all these use cases, the _intent_ of the use of `{@inheritDoc}` in `testRelativeLinks` was good and well-meaning, even if the specific instances are now seen in hindsight as bad.  Bottom line: we should not simply remove the bad cases: we should replace them with good cases, meaning, test relative links with `{@inheritDoc}` used in method descriptions and/or tags.

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

PR: https://git.openjdk.org/jdk19/pull/54


More information about the javadoc-dev mailing list