JDK 9 RFR of JDK-8172910: Use default methods as appropriate for language model visitors

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Jan 18 23:19:38 UTC 2017


Looks OK to me.

-- Jon

On 01/18/2017 02:45 PM, joe darcy wrote:
> Hello,
>
> When visitModule as added to ElementVisitor (JDK-8142968), it was 
> added as a normal abstract interface method. This approach was 
> necessary in analogous cases back 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.
>
> Please review the webrev which implements this improvement:
>
>     8172910: Use default methods as appropriate for language model 
> visitors
>     http://cr.openjdk.java.net/~darcy/8172910.1/
>
> Likewise, several convenience methods in the visitor interfaces can be 
> upgraded to default methods as a small convenience for those directly 
> implementing the interfaces.
>
> Thanks,
>
> -Joe
>



More information about the compiler-dev mailing list