JDK-6392177 : JSR269: Support creating package-info.java files
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.annotation.processing
  • Affected Version: 6
  • Priority: P2
  • Status: Closed
  • Resolution: Fixed
  • OS: generic
  • CPU: generic
  • Submitted: 2006-03-01
  • Updated: 2017-05-16
  • Resolved: 2006-07-20
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
6 b92Fixed
Related Reports
Relates :  
Description
The JSR 269 Filer API supports creating new source files for annotation processing.  The resulting "types" are treated as one of the inputs to the next round of processing.  To support package annotations, JSR 175 allowed "package-info.java" files to be created too.  These files don't quite follow all the rules of other Java source code and their creation isn't currently supported by the Filer; if such a file was created as a general text file, it would not be subject to annotation processing.  JSR 269 should consider whether or not the creation of such files needs to be supported.

Comments
SUGGESTED FIX See 6380018 for code deltas.
17-07-2006

EVALUATION It would be nice if Filer.createSourceFile could accept a package name as an argument, and infer that the new file should be named package-info.java. But javac can't always know for sure that the name is a package rather than a type. The method could instead accept a pseudo-type name like "com.sun.pkg.package-info". Alternately, there could be a new method Filer.createPackageInfoFile.
01-03-2006

EVALUATION Should be considered.
01-03-2006