RFR: 8281057: Fix doc references to overriding in JLS

David Holmes dholmes at openjdk.java.net
Wed Feb 2 12:14:04 UTC 2022


On Tue, 1 Feb 2022 16:19:01 GMT, Pavel Rappo <prappo at openjdk.org> wrote:

> While looking into guts of javadoc comment inheritance, I noticed that a number of places in JDK seem to confuse JLS 8.4.6.** with JLS 8.4.8.**.
> 
> Granted, "8.4.6 Method Throws" tangentially addresses overriding. However, I believe that the real target should be "8.4.8. Inheritance, Overriding, and Hiding" and its subsections.

Hi Pavel,

All the section number changes look good and accurate. I have one query above, and also spotted one existing comment that is not correct.

Thanks,
David

src/jdk.compiler/share/classes/com/sun/tools/javac/comp/Check.java line 1793:

> 1791:         }
> 1792: 
> 1793:         // Error if static method overrides instance method (JLS 8.4.8.2).

"overrides" should be "hides"

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

Marked as reviewed by dholmes (Reviewer).

PR: https://git.openjdk.java.net/jdk/pull/7311


More information about the compiler-dev mailing list