JDK-8224628 : Note that type parameters are not visited by ElementScanners
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Affected Version: 8,9,13
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-22
  • Updated: 2019-05-30
  • Resolved: 2019-05-23
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 13
13 b23Fixed
Related Reports
Relates :  
Relates :  
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.


Comments
Review thread: https://mail.openjdk.java.net/pipermail/compiler-dev/2019-May/013368.html
23-05-2019