Search code examples
javajavadoc

Javadoc omits methods in method summary


I have the following interface.

interface Some {

    default <T extends Appendable> T append(final T appendable) {
    }

    default <T extends File> T append(final T file) { // Omitted form the Method Summary section
    }
}

Now, when I generate javadoc, the <T extends Appendable> T append(final T appendable) method is listed on the Method Summary section but the <T extends File> T append(final T file) method is not.

The Method Details section contains both methods.

Is this normal? How can I fix it?


Solution

  • I can reproduce the bug on JDK21's javadoc tool, so, yes. Bug reports can be filed at bugreport.java.com - unless you have a commercially supported JDK in which case you might want to file with them (and they can file with the openJDK bug repo, which only OpenJDK members can submit bug reports to).

    Fixing it would involve, well, downloading the source (the javadoc tool is open source), fixing it, sending a PR somewhere, and carrying on with your fixed javadoc. That, or rename one of the methods, or write a post-processor that adds the missing HTML.