Since Java 9, @Deprecated has two additional arguments to the annotation:

In order to ease the maintainers work, it is recommended to always add one or both of these arguments.

This rule reports an issue when @Deprecated is used without any argument.

Noncompliant Code Example

@Deprecated

Compliant Solution

@Deprecated(since="4.2", forRemoval=true)

Exceptions

The members and methods of a deprecated class or interface are ignored by this rule. The classes and interfaces themselves are still subject to it.

See Also