RFR: 8223607: --override-methods=summary ignores some signature changes

Jonathan Gibbons jjg at openjdk.java.net
Wed Dec 16 18:17:57 UTC 2020


On Thu, 10 Dec 2020 13:17:49 GMT, Hannes Wallnöfer <hannesw at openjdk.org> wrote:

> This change causes overriding methods to be documented in the details section under some conditions even when javadoc is run with `--override-methods=summary` and the method does not have a doc comment. Previously this already happened when the overriding method had a covariant return type (JDK-8219147). The following conditions will now trigger the same behaviour:
> 
>  - method visibility changes from `protected` to `public`
>  - any change in thrown exceptions
>  - change in documented annotations anywhere in the method signature
> 
> The conditions are simple by intention as we don't want to do checks that add to much complexity (such as distinguishing between checked and unchecked exceptions) and instead want to set the bar for inclusion in the details section relatively low.

This looks good, but given the noteworthy and significant changes in `VisibleMemberTable`,
I'd like to suggest you address JDK-8258429 at this time, which has significant overlap.

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/toolkit/util/VisibleMemberTable.java line 607:

> 605:     // Check whether the signature of an overriding method has any changes worth
> 606:     // being documented compared to the overridden method.
> 607:     private boolean overridingSignatureChanged(ExecutableElement method, ExecutableElement overriddenMethod) {

In the body of this method, can you add in:

change in abstract/non-abstract (both ways)
change in final/non-final

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

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


More information about the javadoc-dev mailing list