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

Mike Rettig mike.rettig at
Thu May 20 22:48:18 UTC 2021

Will non-expression switches be exhaustive? I know that this has been
discussed but I wanted to confirm the behavior for jdk 17.

Sealed classes will be far more useful with exhaustiveness.



More information about the jdk-dev mailing list