Community
Participate
Working Groups
In bug 75701#c4, Randy Hudson wrote: Maybe there should be a 3rd option (or enabled should work differently). If the method/class containing the JavaDoc is also @deprecated, then it should be able to refer to other @deprecated API without any warnings. And this should be the default setting, as it is with method calls. "Signal the use of deprecated API within deprecated code" is disabled by default.
It already works as requested... Following test case does not report any deprecation even if option "Report deprecated references" is activated: X.java: /** @deprecated */ public class X { public int x; public void foo() {} } Y.java: /** * @see X * @deprecated */ public class Y { /** @see X#x */ public int x; /** @see X#foo() */ public void foo() {} } Z.java: public class Z { /** * @see X#x * @deprecated */ public int x; /** * @see X#foo() * @deprecated */ public void foo() {} } Of course, compiler will report warnings if option "Signal use of deprecated API inside deprecated code" is activated... In this later case, warnings can be removed by de-activating "Report deprecated references" option.
I'll add specific test cases to JavadocTestMixed to verify that this behavior will not change...