Bug 46937

Summary: [Compiler] Marking a field deprecated still report deprecated usage
Product: [Eclipse Project] JDT Reporter: Jerome Lanneluc <jerome_lanneluc>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: VERIFIED FIXED QA Contact:
Severity: normal    
Priority: P3    
Version: 3.0   
Target Milestone: 2.1.3   
Hardware: PC   
OS: Windows 2000   
Whiteboard:

Description Jerome Lanneluc CLA 2003-11-19 05:46:13 EST
Build 20031119

Assuming that B is deprecated, a 'type B is deprecated' warning is reported 
against 'field'. It is not reported against 'foo()'.

public class A {

	/**
	 * @deprecated
	 */
	B field;
	
	/**
	 * @deprecated
	 */
	B foo() {
		return null;
	}
}
Comment 1 Philipe Mulet CLA 2003-12-05 06:55:47 EST
Field type check was outside the block of code updating the 
#fieldDeclarationIndex on initialization scope.

Fixed
Comment 2 David Audel CLA 2003-12-17 07:48:51 EST
Verified for 3.0M6
Comment 3 Frederic Fusier CLA 2004-03-01 07:32:06 EST
This was backported to 2.1 stream.
Verified for 2.1.3 with build I200402251535.
Comment 4 Frederic Fusier CLA 2004-03-01 12:09:31 EST
Build was M200402251535 and not I200402251535....
Comment 5 okano CLA 2004-04-06 21:53:10 EDT
/* In this case (define class in method), reported yet. */
class A {
 public static void main(String[] args) {
  /** @deprecated (Great! Javadoc comments can be written here) */
  class C {
   class D extends B {} // 2 warnigs in this line
  }
 }
}
Comment 6 Philipe Mulet CLA 2004-04-07 10:04:43 EDT
okano: please file separate bug report for your issue. Don't append to close 
ones.