Skip to content

Include MissingDeprecated in the default checks #420

Closed
@wilkinsona

Description

@wilkinsona

https://checkstyle.sourceforge.io/checks/annotation/missingdeprecated.html

Having @deprecated in the javadoc without @Deprecated on the element can lead to an inconsistent view of whether or not something is deprecated. The JLS requires compilers to warn when someone uses code that is annotated with @Deprecated. It does not require them to warn when code is documented with @deprecated, but javac does so. It would be good to always use @deprecated and @Deprecated together so that our code avoids this potential inconsistency.

If we do this, it would also make sense to change this setting in Eclipse:

This would also align with the cleanup settings where @Deprecated is added automatically when the javadoc contains @deprecated:

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions