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

Pavel Rappo prappo at openjdk.org
Mon Jun 27 19:18:41 UTC 2022


On Mon, 27 Jun 2022 17:37:22 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

>> This rights the wrongs of JDK-8008768. For more information, see the respective CSR.
>
> src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclint/Checker.java line 268:
> 
>> 266:     // Checks if the passed tree path does NOT correspond to an entity, such as
>> 267:     // the overview file and doc-files/**/*.html files.
>> 268:     private boolean notPseudoElement(TreePath p) {
> 
> The use of a predicate named `not...` seems confusing and leads to various double negatives;  it would be easier to read if this was `isPseudoElement` even if that means an extra `!` at the call site.

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.

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

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


More information about the javadoc-dev mailing list