Skip to content

Conversation

@arteam
Copy link
Contributor

@arteam arteam commented Jan 3, 2022

JEP 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.

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.
@arteam arteam force-pushed the use-switch-expressions branch from 4779bd2 to 4b50990 Compare January 3, 2022 19:31
@arteam arteam added :Core/Infra/Core Core issues without another label >non-issue >refactoring auto-backport Automatically create backport pull requests when merged v8.0.0 labels Jan 4, 2022
@arteam arteam marked this pull request as ready for review January 4, 2022 08:38
@elasticmachine elasticmachine added the Team:Core/Infra Meta label for core/infra team label Jan 4, 2022
@elasticmachine
Copy link
Collaborator

Pinging @elastic/es-core-infra (Team:Core/Infra)

@pugnascotia
Copy link
Contributor

See #82090 for the formatting problem - I've already filed an issue with Eclipse, but I suspect I'd have to fix it myself 🙈

…apshots/status/TransportSnapshotsStatusAction.java

Co-authored-by: Rory Hunter <[email protected]>
@arteam
Copy link
Contributor Author

arteam commented Jan 6, 2022

@elasticmachine update branch

Copy link
Contributor

@pugnascotia pugnascotia left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@arteam arteam merged commit 0699c93 into elastic:master Jan 10, 2022
@arteam
Copy link
Contributor Author

arteam commented Jan 10, 2022

Thanks, Rory!

@elasticsearchmachine
Copy link
Collaborator

💔 Backport failed

Status Branch Result
8.0 Commit could not be cherrypicked due to conflicts

You can use sqren/backport to manually backport by running backport --upstream elastic/elasticsearch --pr 82178

@arteam arteam deleted the use-switch-expressions branch January 10, 2022 09:12
arteam added a commit to arteam/elasticsearch that referenced this pull request Jan 10, 2022
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)
arteam added a commit that referenced this pull request Jan 10, 2022
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)

* Rollback switch expressions for the SQL plugin (#82349)

It was updated to Java 8 compatibility in #82274

(cherry picked from commit 78509f4)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auto-backport Automatically create backport pull requests when merged :Core/Infra/Core Core issues without another label >non-issue >refactoring Team:Core/Infra Meta label for core/infra team v8.0.0 v8.1.0

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants