@Deprecated
annotations should not be applied to local variables and
parameters, since they have no effect there.
The
javadoc for @Deprecated
says
Use of the
@Deprecated
annotation on a local variable declaration or on a parameter declaration or a package declaration has no effect on the warnings issued by a compiler.
Suppress false positives by adding the suppression annotation @SuppressWarnings("DeprecatedVariable")
to the enclosing element.