JDK-8024811 : compiler warns about missing annotation class files in some cases
  • Type: Bug
  • Component: tools
  • Sub-Component: javac
  • Priority: P2
  • Status: Closed
  • Resolution: Duplicate
  • Submitted: 2013-09-13
  • Updated: 2015-01-21
  • Resolved: 2015-01-21
Related Reports
Duplicate :  
Description
Run attached test.sh.  Note that compiler complains about missing Ann.class but not
about missing Impl.class.  There's no reason the compiler should need the annotation
class file to compile code using the library.

If you remove the "message" method from Ann.java, the compiler won't complain about
the missing Ann.class file.

The compiler should *not* warn in either case.  Annotations used in the implementation
of a library should not impact users of the library.  This is consistent with how unknown
annotations are handled at runtime.
Comments
Duplicate of changes made for JDK-8068639; warning message in question is now opt-in under -Xlint:classfile.
21-01-2015

Now that we've agreed this is a real issue that should be fixed, I've bumped the priority in the hope that it will be fixed in an update release soon since we've had to fall back to the 1.6 version of the annotation processor to work around this bug.
16-09-2014