JDK-6985205 : access to tree positions and doc comments may be lost across annotation processing rounds
Type:Bug
Component:tools
Sub-Component:javac
Affected Version:7
Priority:P3
Status:Closed
Resolution:Fixed
OS:generic
CPU:generic
Submitted:2010-09-16
Updated:2014-02-18
Resolved:2011-03-08
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.
There are reports that doc comments are not reliably available when processing annotations.
Comments
EVALUATION
JavaCompiler maintains two booleans, keepComments and genEndPos. The two booleans are to control the use of the DocCommentScanner and the EndPosParser, The values are normally set from options, and so will be recomputed to the same value for each round of processing. BUT, 199 uses a public backdoor to set them, and these settings will not persist across annotation processing rounds when the compiler is invoked by the Compiler API.