Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-6392118

mismatch between JavacTaskImpl.context and JSR 269

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 6
    • 6
    • tools
    • None
    • b78
    • generic
    • generic
    • Verified

      There is a serious mismatch between the use of a context in JavacTaskImpl (which believes there is just one context for the life of the compilation) and JSR269 (which creates a new context for each round of annotation processing.)

      This can show up if some 199 user code (eg a DiagnosticListener) calls tree code (eg Trees.instance(CompilationTask) ) which will use the context in the JavacTaskImpl, which has potentially been cleared by JavacProcessingEnvironment.contextForNextRound.

      In addition, it is conceptually wrong for JavacTaskImpl to call its endContext as it does, because in the face of 269, that is no longer the "correct" /"active" context.

            jjg Jonathan Gibbons
            jjg Jonathan Gibbons
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: