The switch expressions feature, currently preview, is to be made final.
The switch expressions features is in the preview mode for a second release, with overall positive feedback.
The feature is going to be marked as final. The set of legal Java programs is not being changed, only "--enable-preview" will not be needed to enable the feature, it will be enough to use source level 14 or later, implicitly or explicitly.
The final specification draft is attached and is also available for convenience here: http://cr.openjdk.java.net/~gbierman/jep361/jep361-20190927/specs/switch-expressions-jls.html
Specdiff for updated Trees API (removal of @PreviewFeature annotation and associated text) is attached, and is also available for convenience here: http://cr.openjdk.java.net/~jlahoda/8232684/specdiff.00/overview-summary.html
- csr of
JDK-8232684 Make switch expressions final