Bug 46937 - [Compiler] Marking a field deprecated still report deprecated usage
Summary: [Compiler] Marking a field deprecated still report deprecated usage
Status: VERIFIED FIXED
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 3.0   Edit
Hardware: PC Windows 2000
: P3 normal (vote)
Target Milestone: 2.1.3   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-11-19 05:46 EST by Jerome Lanneluc CLA
Modified: 2004-04-07 10:04 EDT (History)
0 users

See Also:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
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.