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

Note that type parameters are not visited by ElementScanners

    Details

    • Type: Enhancement
    • Status: Resolved
    • Priority: P4
    • Resolution: Fixed
    • Affects Version/s: 8, 9, 13
    • Fix Version/s: 13
    • Component/s: core-libs
    • Labels:
      None

      Description

      The behavior of the existing ElementScannerN classes is to *not* visit type parameters as part of the actions of their visitType and visitExecutable methods.

      This is a consequence of type parameters not being considered part of the enclosed elements of a type or executable.

      This behavior of skipping type parameters may be unexpected by users and has led to code like an internal RoundElement method "ElementScanningIncludingTypeParameters" (JDK-8032230).

      The behavior should at least be noted for the current visitors and should likely be changed when the ElementScanner(N+k) is eventually added.

        Attachments

          Issue Links

            Activity

              People

              • Assignee:
                darcy Joe Darcy
                Reporter:
                darcy Joe Darcy
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: