Bug 26658

Summary: No deprecation warning
Product: [Eclipse Project] JDT Reporter: Michael Lupp <m.lupp>
Component: CoreAssignee: Philipe Mulet <philippe_mulet>
Status: RESOLVED WONTFIX QA Contact:
Severity: normal    
Priority: P3    
Version: 2.1   
Target Milestone: 2.1 M4   
Hardware: PC   
OS: Windows NT   
Whiteboard:

Description Michael Lupp CLA 2002-11-19 08:10:51 EST
If I compile the following class with JDK 1.3 I don't get any deprecation warning:

--------------
public class DeprecatedTest {

	public static interface MyInterface {
		/**
		 * @deprecated because this shouldn't be used any more
		 */
		public void f();
		public void g();
	}

	public static class MyClass implements MyInterface {
		/**
		 * @deprecated because this shouldn't be used any more
		 */
		public void f() {}
		/**
		 * @deprecated because this shouldn't be used any more
		 */
		public void g() {}
		/**
		 * @deprecated because this shouldn't be used any more
		 */
		public void h() {}
	}

	public DeprecatedTest() {
		MyClass     myClass = new MyClass();
		MyInterface myIF    = myClass;

		myIF.f();
		myIF.g();

		((MyClass) myIF).f();

		myClass.f();
		myClass.g();
		myClass.h();
	}
}
--------------
Comment 1 Philipe Mulet CLA 2002-11-19 09:46:47 EST
Like JDK1.3 (or 1.4), we won't report deprecation warning inside the unit 
declaring the deprecated members. 

What are you expecting ?
Comment 2 Michael Lupp CLA 2002-11-19 10:10:26 EST
I did expect that the compiler shows deprected warning for every using of the
deprecated methods in method 'public DeprecatedTest()', so that I know that
there are still some deprecated methods in use.
Comment 3 Philipe Mulet CLA 2002-11-19 11:10:29 EST
Only external usages are reported (not inside the unit itself declaring the 
deprecated members).

This is the indented behavior.

Ok to close?
Comment 4 Michael Lupp CLA 2002-11-20 01:47:42 EST
Yes, it's ok.
Comment 5 Philipe Mulet CLA 2002-11-20 05:49:55 EST
Closing