Community
Participate
Working Groups
3.1 RC2 Steps to reproduce: - Create package-info.java - Insert @Deprecated annotation -> AST View shows that package binding is not deprecated. I exspect the binding and all types declared in this package to be deprecated as well.
Need to check what javac is doing in this case.
This corresponds to http://bugs.sun.com/bugdatabase/view_bug.do?bug_id=6492694 for the javadoc bug. javac seems to ignore it as well.
As of N20070224-0010, it seems that the package deprecation is now causing warnings to appear, somewhat randomly. To repro: Create a project with a class C, an annotation A, and a package-info.java, all in package p. Contents of C are as follows: package p; @A public class C { @A void foo() {} } Save and build. No warnings. Now add @Deprecated to the package-info. Save. Note no warnings. Do a clean build. For me, I see a warning on the second @A, but not the first. Edit C by adding a comment somewhere. Save. The warning disappears. Do a clean build again. The warning reappears. This is responsible for a jdt.apt test failure in this nightly build. This behavior was not present in M5A.
I don't see what could have changed to cause this failure. I'll investigate. Walter, could this test be disabled for now? Thanks.
I have changed the test harness so that it explicitly sets the "org.eclipse.jdt.core.compiler.problem.deprecation" option in the test project to "ignore", which causes the test to pass. The workaround is in apt.tests/ReadAnnotationTests.setupTest(). I'll remove it again when this bug is fixed - arguably it could stay in place, since the test does depend on package deprecations not producing warnings, but I like the fact that it found this problem :-)
*** This bug has been marked as a duplicate of bug 214948 ***
Verified for 3.5M5 using I20090126-1300