JEP proposed to target JDK 17: 406: Pattern Matching for switch (Preview)

Mike Rettig mike.rettig at
Tue Jun 1 18:48:37 UTC 2021

>From the JEP:
> It may be the case that future compilers of the Java language will emit
warnings for legacy switch statements that are not complete.

It would be ideal to add a compiler switch to make it an error instead of a
warning on incomplete switches.


More information about the jdk-dev mailing list