RFR: JDK-8164094: javadoc allows to create a @link to a non-existent method [v2]

Pavel Rappo prappo at openjdk.org
Wed Dec 13 13:45:37 UTC 2023


On Tue, 12 Dec 2023 21:46:33 GMT, Jonathan Gibbons <jjg at openjdk.org> wrote:

> 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.

As I said before, it's a separate issue. However, I still wonder what the rationale for that difference is; it's not obvious to me. It also doesn't strike me as the right behaviour.

FWIW, as a local experiment I changed code so that both methods and fields were first searched in the superclass and superinterfaces and then in the enclosing class or interface. Out of the above two alternatives, this order seems more correct. All tier1 tests still succeeded.

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

PR Comment: https://git.openjdk.org/jdk/pull/17069#issuecomment-1853943874


More information about the compiler-dev mailing list