Pattern: Missing java.lang.Deprecated
annotation and/or @deprecated
tag
Issue: -
Verifies that both the java.lang.Deprecated
annotation is present and the @deprecated
Javadoc tag is present when either is present.
To configure the check:
<module name="MissingDeprecated"/>
In addition you can configure this check with skipNoJavadoc option:
<module name="MissingDeprecated">
<property name="skipNoJavadoc" value="true" />
</module>
Examples of validating source code with skipNoJavadoc:
@deprecated
public static final int MY_CONST = 123456; // no violation
/** This Javadoc is missing deprecated tag. */
@deprecated
public static final int COUNTER = 10; // violation as Javadoc exists