Skip to content

Conversation

@arteam
Copy link
Contributor

@arteam arteam commented Jan 10, 2022

Backports to 8.0:

JEP 361[https://openjdk.java.net/jeps/361] added support for switch expressions
which can be much more terse and less error-prone than switch statements.

Another useful feature of switch expressions is exhaustiveness: we can make
sure that an enum switch expression covers all the cases at compile time.

(cherry picked from commit 0699c93)
It was updated to Java 8 compatibility in elastic#82274

(cherry picked from commit 78509f4)
@arteam arteam merged commit 358484b into elastic:8.0 Jan 10, 2022
@arteam arteam deleted the backport-switch-expressions branch January 10, 2022 12:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants