JDK-2187541 : package-info.java file has to be specified on the javac cmdline, else it will not be avail.
  • Type: Backport
  • Backport of: JDK-6920317
  • Component: tools
  • Sub-Component: javac
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2010-01-27
  • Updated: 2012-01-13
  • Resolved: 2012-01-13
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 6 JDK 7
6u19-revFixed 7 b84Fixed
Comments
EVALUATION Currently, annotations on packages in source files are initially handled as exactly that -- annotations on packages -- the package-info class symbol is created during Lower. There is some code in place for accepting package-info files on the source path and class path, but the class symbols that are created are not completed, so these files are effectively ignored. It is not enough to simply complete the symbols for the files on source/classpath, because then they may conflict with annotations on packages in source files. Therefore it is also necessary to create the package-info class symbols much earlier, in Enter.visitTopLevel, so that the file on the command line supercedes any equivalent file on the source/class path.
29-01-2010

EVALUATION Will likely need to fix 6499119 in order to fix this one. Test programs should include cases for -- package-info.java on command line -- package-info.java on source path -- package-info.class on class path
27-01-2010