Prior to Java SE 5.0, deprecation was formally indicated using the "@deprecated" javadoc tag. Java SE 5.0 instead defined the java.lang.Deprecated annotation type for that purpose, with the @deprecated tag being retained to provide helpful suggestions on what to do instead of using the deprecated API.
However, javac has continued to treat the @deprecated javadoc tag as indicating deprecation and issues the same warning messages as if @Deprecated were used.
At least for source levels of 9 and above, I'd recommend javac
1) Stop treating @deprecated as an indication of deprecation
2) Issue a warning message if @deprecated is used on a declaration that is not also @Deprecated
However, javac has continued to treat the @deprecated javadoc tag as indicating deprecation and issues the same warning messages as if @Deprecated were used.
At least for source levels of 9 and above, I'd recommend javac
1) Stop treating @deprecated as an indication of deprecation
2) Issue a warning message if @deprecated is used on a declaration that is not also @Deprecated
- relates to
-
JDK-8141234 javac/javadoc should warn if @Deprecated annotation is present but @deprecated javadoc tag is missing
- Open
-
JDK-8068626 Add javac lint warning when the @Deprecated annotation is used where it is a no-op
- Closed
-
JDK-8164073 Javac should unconditionally warn if deprecated javadoc tag is used without @Deprecated annotation
- Closed