JDK-8296607 : Review and specify no-spec-change overrides
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 21
  • Priority: P3
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-11-08
  • Updated: 2024-01-15
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
Other
tbdUnresolved
Related Reports
Relates :  
Relates :  
Description
JDK-8157000 introduced a mechanism that caused some overrides to be displayed differently from others. The implementation of that mechanism seems to be confusing for authors, who don't have a clear mental model to built expectation on.

* One example of circumventing that mechanism can be seen in jdk.incubator.vector:

    // Note: A surprising behavior in javadoc
    // sometimes makes a lone /** {@inheritDoc} */
    // comment drop the method altogether,
    // apparently if the method mentions an
    // parameter or return type of Vector<Double>
    // instead of Vector<E> as originally specified.
    // Adding an empty HTML fragment appears to
    // nudge javadoc into providing the desired
    // inherited documentation.  We use the HTML
    // comment <!--workaround--> for this.
 
* An attempt to update the mechanism for covariant returns can be seen in JDK-8219147.

The bottom line is, the mechanism introduced in JDK-8157000 must be reviewed and clearly specified in the Documentation Comment Specification for the Standard Doclet.
Comments
In implementation we seem to have two related but different code paths that deal with this sort of differences between overriding and overridden methods: VisibleMemberTable#overridingSignatureChanged and Utils#isSimpleOverride.
08-11-2022