JDK-8172910 : Use default methods as appropriate for language model visitors
  • Type: Bug
  • Component: core-libs
  • Sub-Component: javax.lang.model
  • Affected Version: 9
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2017-01-17
  • Updated: 2017-05-17
  • Resolved: 2017-01-19
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 10 JDK 9
10Fixed 9 b154Fixed
Related Reports
CSR :  
Relates :  
Description
When visitModule as added to ElementVisitor (JDK-8142968), it was added as a normal abstract interface method. This approach was necessary in Java SE 8 since the package in question is built under the previously JDK during the bootstrap process. For 9, better source compatibility would come from using a default method here.

Likewise, several convenience methods in the visitors can be upgraded to default methods.
Comments
Review thread: http://mail.openjdk.java.net/pipermail/compiler-dev/2017-January/010677.html
18-01-2017