JDK-8295277 : Expand {@inheritDoc} in @throws fully
  • Type: Bug
  • Component: tools
  • Sub-Component: javadoc(tool)
  • Affected Version: 20
  • Priority: P4
  • Status: Open
  • Resolution: Unresolved
  • Submitted: 2022-10-13
  • Updated: 2022-10-13
Related Reports
Relates :  
Relates :  
Description
The solution provided for JDK-6509045 and JDK-8067757 becomes inadequate if documentation inheritance depth > 1 and {@inheritDoc} expands to multiple @throws tags on the higher levels of the inheritance hierarchy.

The solution fails because the code that processes {@inheritDoc} in that case does not have necessary context to complete its job. While every @throws tag that a particular {@inheritDoc} expands to, translates to a separate entry in the "Throws:" section, by the time such an {@inheritDoc} is processed, the "Throws:" section is unavailable.

One solution is to process {@inheritDoc} deeply and collectively in ThrowsTaglet#getAllBlockTagOutput. This hijacks the model of context-free processing, however, it does so just for one specific tag: @throws. 


Comments
There's this TagletWriterImpl.Context class. It could be explored in an alternative approach to fix this issue.
13-10-2022