Question about @inheritDoc

Jonathan Gibbons jonathan.gibbons at oracle.com
Fri Apr 26 23:45:43 UTC 2019


Kharbas,

This looks like an instance of a recent change to javadoc to not repeat 
the documentation when it would be an exact copy of the inherited 
documentation. The change was made to avoid methods being spuriously 
documented when the method is overridden to provide a different 
implementation without changing the specification.

If you modify the doc comment to include more text than just 
`{@inheritDoc}, you should see the modified documentation appearing in 
your generated docs.

If you want the old behavior, use the following option, listed in the 
command line help

     --override-methods (detail|summary)
                   Document overridden methods in the detail or summary 
sections

-- Jon


On 04/26/2019 04:36 PM, Kharbas, Kishor wrote:
>
> Hi!
>
> I am working on the panama project in OpenJDK where I have used 
> @inheritDoc for the overridden methods. The generated Javadoc although 
> does not inherit the Javadoc from superclass method.
>
> An example is,
>
> add(Vector<Integer> v) in 
> http://hg.openjdk.java.net/panama/dev/file/54c20dc2769a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/IntVector.java 
> line 467
>
> overriding add(Vector<E> v) in 
> http://hg.openjdk.java.net/panama/dev/file/54c20dc2769a/src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Vector.java 
> line 317
>
> You can see the generated Javadoc at 
> http://cr.openjdk.java.net/~kkharbas/vector-api/javadoc/VectorApi-JavaDoc.05/jdk.incubator.vector/jdk/incubator/vector/package-summary.html 
> <http://cr.openjdk.java.net/%7Ekkharbas/vector-api/javadoc/VectorApi-JavaDoc.05/jdk.incubator.vector/jdk/incubator/vector/package-summary.html>
>
> Am I missing something? Any option that needs to be used while Javadoc 
> generation?
>
> Thanks,
>
> Kishor
>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://mail.openjdk.java.net/pipermail/javadoc-dev/attachments/20190426/46b20057/attachment.html>


More information about the javadoc-dev mailing list