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

Jonathan Gibbons jjg at openjdk.org
Mon Jun 27 20:05:46 UTC 2022


On Mon, 27 Jun 2022 19:56:59 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> We have public `Stream.noneMatch()`, `Files.notExists()`, `Objects.nonNull()`, and many more non-public methods that answer a negative question; but I'll change this one if you think that it will improve readability.
>
>> It worries me that we are removing support for a feature that had explicit positive tests.
> 
> We discussed this offline at length.   The tests are not specifically for the feature, but instead, they are tests for a different feature (relative links) in a variety of situations, including the suspect case of `{@inheritDoc}`.
> 
> It might be worth investigating whether we can write tests for relative links when `{@inheritDoc}` is used in a legal position, such as on a method declaration.

> We have public `Stream.noneMatch()`, `Files.notExists()`, `Objects.nonNull()`, and many more non-public methods that answer a negative question; but I'll change this one if you think that it will improve readability.

Would prefer to see it inverted, if you don't mind. There are good reasons for the negative form in the 3 cases you list, and none of those reasons apply here. `Files.notExists` is a fun one because it is *not* `!Files.exists`

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

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


More information about the javadoc-dev mailing list