Inspectopedia 2024.3 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; } }

Locating this inspection

By ID

Can be used to locate inspection in e.g. Qodana configuration files, where you can quickly enable or disable it, or adjust its settings.

UnnecessaryInheritDoc
Via Settings dialog

Path to the inspection settings via IntelliJ Platform IDE Settings dialog, when you need to adjust inspection settings directly from your IDE.

Settings or Preferences | Editor | Inspections | Java | Javadoc

Inspection Details

By default bundled with:

IntelliJ IDEA 2024.3, Qodana for JVM 2024.3,

Can be installed with plugin:

Java, 243.23126

Last modified: 03 December 2024