-
Bug
-
Resolution: Fixed
-
P3
-
None
-
b04
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8291865 | 11.0.18-oracle | Christian Stein | P3 | Resolved | Fixed | b01 |
JDK-8290114 | 11.0.17 | Dukebot | P3 | Resolved | Fixed | b01 |
The annotation processing Filer is obliged to maintain various invariants:
"During each run of an annotation processing tool, a file with a given pathname may be created only once. If that file already exists before the first attempt to create it, the old contents will be deleted. Any subsequent attempt to create the same file during a run will throw a FilerException, as will attempting to create both a class file and source file for the same type name or same package name. The initial inputs to the tool are considered to be created by the zeroth round; therefore, attempting to create a source or class file corresponding to one of those inputs will result in a FilerException."
The handling of package-info files and the handling of files for types are subject to the same constraints.
However, the javac Filer implementation does not correctly catch attempting to open a package-info file through the Filer when the same file has been passed as an initial argument.
"During each run of an annotation processing tool, a file with a given pathname may be created only once. If that file already exists before the first attempt to create it, the old contents will be deleted. Any subsequent attempt to create the same file during a run will throw a FilerException, as will attempting to create both a class file and source file for the same type name or same package name. The initial inputs to the tool are considered to be created by the zeroth round; therefore, attempting to create a source or class file corresponding to one of those inputs will result in a FilerException."
The handling of package-info files and the handling of files for types are subject to the same constraints.
However, the javac Filer implementation does not correctly catch attempting to open a package-info file through the Filer when the same file has been passed as an initial argument.
- backported by
-
JDK-8290114 Fix Filer handling of package-info initial elements
- Resolved
-
JDK-8291865 Fix Filer handling of package-info initial elements
- Resolved
- relates to
-
JDK-8295850 Backport of JDK-8193462 to JDK 11 reintroduces JDK-8222091
- Closed
-
JDK-8222091 Javadoc does not handle package annotations correctly on package-info.java
- Resolved
(1 links to)