Bug 26658 - No deprecation warning
Summary: No deprecation warning
Status: RESOLVED WONTFIX
Alias: None
Product: JDT
Classification: Eclipse Project
Component: Core (show other bugs)
Version: 2.1   Edit
Hardware: PC Windows NT
: P3 normal (vote)
Target Milestone: 2.1 M4   Edit
Assignee: Philipe Mulet CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2002-11-19 08:10 EST by Michael Lupp CLA
Modified: 2002-11-20 05:49 EST (History)
0 users

See Also:


Attachments

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