RFR: 8177100: APIs duplicated in JavaDoc

Nizar Benalla nbenalla at openjdk.org
Thu May 8 15:02:35 UTC 2025


Please review this patch to fix a bug where a method can be documented multiple times 
Consider these 4 classes

                    A       (interface)
                   / \
                  /   \
(abstract class)  C     B   ( interface)
                  \   /
                   \ /
                    D       (class)


Where `A` declares `testA()`, `C` implements it `public final void testA()`, `B` extends `A` but does *not* override it, `D` extends `C` and implements `B`

In the generated javadoc, `testA()` is documented twice.

![Screenshot 2025-05-08 at 15 51 19](https://github.com/user-attachments/assets/46538e61-1546-4128-8041-296d8491406f)

After the patch, `testA()` is only documented once:

![Screenshot 2025-05-08 at 15 52 16](https://github.com/user-attachments/assets/a6b86a21-7104-460c-8f3f-36cee5962eed)

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

Commit messages:
 - merge methods from invisible supetypes

Changes: https://git.openjdk.org/jdk/pull/25123/files
  Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=25123&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8177100
  Stats: 114 lines in 2 files changed: 111 ins; 1 del; 2 mod
  Patch: https://git.openjdk.org/jdk/pull/25123.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25123/head:pull/25123

PR: https://git.openjdk.org/jdk/pull/25123


More information about the javadoc-dev mailing list