RFR: JDK-8164094: javadoc allows to create a @link to a non-existent method [v2]
Pavel Rappo
prappo at openjdk.org
Tue Dec 12 13:49:34 UTC 2023
On Tue, 12 Dec 2023 12:42:41 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:
>> Please review a simple fix in `JavacTrees` to only look up member references in the enclosing type if the reference does not contain an explicit type name. For example, `@see #method()` in a a doc comment of class `Outer.Inner` should find method `Outer.method()`, but `@see Inner#method()` should not (regardless of comment location).
>
> Hannes Wallnöfer has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request contains three additional commits since the last revision:
>
> - Merge branch 'master' into JDK-8164094
> - Additional test
> - JDK-8164094: javadoc allows to create a @link to a non-existent method
It's nice to see this issue and its individual sightings being addressed.
While I'm a Reviewer, I'm not a compiler person, so my approval means little here. Wait for a compiler person to approve it. Perhaps they might also suggest a better name for the `explicitType` parameter.
Separately, it was interesting to see that a field is first searched in the enclosing class or interface, and if not found, searched in the superclass or a superinterface. The order in which a method is searched is the opposite: the superclass or a superinterface, then the enclosing class or interface.
-------------
PR Review: https://git.openjdk.org/jdk/pull/17069#pullrequestreview-1777513670
More information about the javadoc-dev
mailing list