Community
Participate
Working Groups
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(); } } --------------
Like JDK1.3 (or 1.4), we won't report deprecation warning inside the unit declaring the deprecated members. What are you expecting ?
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.
Only external usages are reported (not inside the unit itself declaring the deprecated members). This is the indented behavior. Ok to close?
Yes, it's ok.
Closing