JDK-8224630 : ElementScannerN, N > 9 should scan type parameters
  • Type: Enhancement
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Priority: P4
  • Status: Resolved
  • Resolution: Fixed
  • Submitted: 2019-05-23
  • Updated: 2020-04-07
  • Resolved: 2019-12-05
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 14
14 b27Fixed
Related Reports
CSR :  
Relates :  
Relates :  
Relates :  
Description
When ever it comes time to introduce another tranche of version-specific visitors/scanners in javax.lang.model.util, the new Scanner implementation should be changed to have the visitType and visitExecutable methods also visit type parameters. This is more likely to be the desired behavior and would also allow at least one  implementation-internal class to be deleted, see JDK-8032230.
Comments
[~kganapureddy], it happens to be the case that the FooVisitor14 classes were created to support records, which happens to be a preview feature. This behavioral change was planned for the next batch of visitor types after 9, which happen to be for 14. I don't think any edit of the ElementScanner14 type is needed. Thanks,
13-12-2019

[~darcy]Thank you
13-12-2019

[~darcy]Thank you. i am looking at class level description: This class is associated with <i>records</i>, a preview * feature of the Java language. Preview features * may be removed in a future release, or upgraded to permanent * features of the Java language. Which is not valid for all the methods in that class.
12-12-2019

[~kganapureddy]; correct the behavioral changes are not tied to records. The "Foo14" visitors are the first batch of visitors added after this problem was recognized so the behavior is being updated there. Note that the docs for the ElementScanner14 class are updated to describe the new behavior, e.g. + * @implSpec This implementation scans the type parameters, if + * any, and then the enclosed elements.
11-12-2019

[~darcy] As i understand the newly overridden methods as part of this CSR are not really bound to "records" preview , i see they are applicable for all type including records? Do we need to modify the doc of the class - ElementScanner14?
11-12-2019

URL: https://hg.openjdk.java.net/jdk/jdk/rev/20dfe7974cc2 User: darcy Date: 2019-12-05 22:14:22 +0000
05-12-2019

Review threads: http://mail.openjdk.java.net/pipermail/build-dev/2019-December/026421.html https://mail.openjdk.java.net/pipermail/compiler-dev/2019-December/013997.html
05-12-2019

With the prospect of new visitors coming in JDK 14 for records, this change in semantics should be included in the update.
06-11-2019