JDK-7178712 : @Deprecated should support a string-value containing an explenation
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: java.lang
  • Affected Version: 7
  • Priority: P4
  • Status: Closed
  • Resolution: Duplicate
  • OS: windows_7
  • CPU: x86
  • Submitted: 2012-06-21
  • Updated: 2012-07-18
  • Resolved: 2012-07-18
Related Reports
Duplicate :  
Description
A DESCRIPTION OF THE REQUEST :
The @java.lang.Deprecated annotations has no possibility to pass a reason as string.
E.g.:
@Deprecated("Use def() instead, because it is more performant")
public void abc()

JUSTIFICATION :
Currently one places @Deprecated on the e.g. method and writes additionally @deprecated in the javadoc with an explenation and the new method to use.
I think this should be possible to do in one place. So that it is not required to maintain the information in two places.

EXPECTED VERSUS ACTUAL BEHAVIOR :
EXPECTED -
see description.
ACTUAL -
see description.

Comments
EVALUATION The current design was intentional; closing as a duplicate of 6707041.
18-07-2012