JDK-8249070 : @inheritDoc does not work if standalone
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 10,11,12,13,14,15
  • Priority: P3
  • Status: Closed
  • Resolution: Not an Issue
  • OS: generic
  • CPU: generic
  • Submitted: 2020-07-08
  • Updated: 2020-07-08
  • Resolved: 2020-07-08
Related Reports
Relates :  
Description
Prefixing a method with 

    /**
     * {@inheritDoc}
     */

is ignored by Javadoc. Seems to be that way since JDK 10, okay in 9.

Examples can be found in
   MutableCallSite::dynamicInvoker
   VolatileCallSite::dynamicInvoker
   Constructor::getModifiers
   Constructor::getParameterTypes
   Constructor::getExceptionTypes
   Executable::getDeclaredAnnotations
   Field::getDeclaredAnnotations
   Method::getModifiers
   Method::getParameterTypes
   Method::getExceptionTypes
   DecimalFormat::setGroupingUsed

There are 554 occurrences in the JDK, grep: /\*\*\s*\n\s*\*\s*\{@inheritDoc\}\s*\n\s*\*/

Comments
If you add additional text, beyond the minimal `{@inheritDoc}` then the method will show up in the main part of the summary table.
08-07-2020

The feature was requested by JDK developers who needed to override lots of methods for implementation purposes only, and who did not want these methods to show up in the main summary table, because the entries provided no new additional information. The methods are still documented; they are just documented lower down in the summary table, in the "Methods declared in ..." lists.
08-07-2020

No, this is an intentional feature. See JDK-8157000.
08-07-2020

So is this a build issue (flags)?
08-07-2020

This looks like the optional feature that methods that just override a method for implementation purposes without changing the spec (i.e. just using `{@inheritDoc}` do not get listed in the main part of the summary table. Instead, they get listed lower down, under the (renamed) header "Methods declared in ...." (previously "Methods inherited from") The feature is optional but default on. See https://docs.oracle.com/en/java/javase/11/tools/javadoc.html --override-methods (detail|summary) Documents overridden methods in the detail or summary sections.
08-07-2020