Community
Participate
Working Groups
Here's the test case: p2/I.java package p2; /** @deprecated */ interface I {} p1/X.java package p1; public class X { @Deprecated class Y implements p2.I {} } I expected not to have any warning but got one in X.java saying that p2.I is deprecated... Note that replacing @Deprecated annotation by /** @deprecated */ javadoc tag fixes the problem: p2/I.java /** @deprecated */ interface I {} p1/X.java package p1; public class X { /** deprecated */ class Y implements p2.I {} }
Added AnnotationTest#test186 (disabled). Problem comes from the fact that the deprecation warning is reported while connecting member type hierarchy, which is a stage at which @Deprecated hasn't yet been resolved; thus warning cannot be silenced. Could be addressed by ensuring #resolveSuperType never does perform any deprecation check, and deferring it to later point.
Also see AnnotationTest#test187 for a variation on same topic using import references.
Tuned Scope#isInsideDeprecatedCode() to lazily request init of @Deprecated annotation before checking deprecated flag. Fixed, enabled AnnotationTest#test186-187
Verified for 3.2 M5 using build I20060215-0010 (note that interface I has to be public for the original test case to compiler without error)