JDK-8035766 : Execute TypeAnnotate visitor at queue flush time
  • Type: Sub-task
  • Component: tools
  • Sub-Component: javac
  • Affected Version: 8,9
  • Priority: P4
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2014-02-25
  • Updated: 2014-07-29
  • Resolved: 2014-02-27
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 9
9 b04Fixed
Description
Presently, the TypeAnnotate visitor is executed during the MemberEnter stage, which is not the desirable behavior.  Presently, the TypeAnnotate visitor walks down the JCTree, finding type annotations and calling annotateTypeLater, which adds a worker to the queue that eventually executes actualEnterTypeAnnotations on them.  It would be better if the order of execution were rearranged so that the Worker executes the TypeAnnotate visitor, which walks down the tree and calls actualEnterTypeAnnotations on any type annotations it finds.