JDK 14 RFR of JDK-8233096: Update javax.lang.model for switch expressions

Jonathan Gibbons jonathan.gibbons at oracle.com
Wed Nov 13 01:43:59 UTC 2019


Hi Joe,

There seems to be a lot of repeated code in the test, perhaps because it 
has been slowly growing over the years.

It might be worth considering using an enum to encapsulate the 
properties/predicate/name of "keyword" vs "name".

It also seems like the check calls always come in pairs for true/false 
for the first argument. In conjunction with the previous suggestion, 
this could maybe be simplified as well.

-- Jon

On 11/12/19 3:37 PM, Joe Darcy wrote:
>
> Coming back to this after the switch expression changes were pushed, 
> I've updated the test to give a more informative output message on an 
> error:
>
> http://cr.openjdk.java.net/~darcy/8233096.1/
>


More information about the compiler-dev mailing list