Bug 77260

Summary: [Javadoc] deprecation warning should not be reported when @deprecated tag is set
Product: [Eclipse Project] JDT Reporter: Frederic Fusier <frederic_fusier>
Component: CoreAssignee: Frederic Fusier <frederic_fusier>
Status: RESOLVED WORKSFORME QA Contact:
Severity: normal    
Priority: P3 CC: hudsonr
Version: 3.1   
Target Milestone: 3.1 M3   
Hardware: PC   
OS: Windows XP   
Whiteboard:

Description Frederic Fusier CLA 2004-10-29 04:38:45 EDT
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.
Comment 1 Frederic Fusier CLA 2004-11-05 13:48:44 EST
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.
Comment 2 Frederic Fusier CLA 2004-11-05 13:49:29 EST
I'll add specific test cases to JavadocTestMixed to verify that this behavior
will not change...