Inspectopedia Help

Unnecessary '{@inheritDoc}' Javadoc comment

Reports Javadoc comments that contain only an {@inheritDoc} tag. Since Javadoc copies the super class' comment if no comment is present, a comment containing only {@inheritDoc} adds nothing.

Also, it reports the {@inheritDoc} usages in invalid locations, for example, in fields.

Suggests removing the unnecessary Javadoc comment.

Example:

class Example implements Comparable<Example> { /** * {@inheritDoc} */ @Override public int compareTo(Example o) { return 0; } }

After the quick-fix is applied:

class Example implements Comparable<Example> { @Override public int compareTo(Example o) { return 0; } }

Inspection Details

Available in:

IntelliJ IDEA 2023.3, Qodana for JVM 2023.3

Plugin:

Java, 233.SNAPSHOT

Last modified: 13 July 2023