Skip to content

Use switch expressions where appropriate #31527

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

dreis2211
Copy link
Contributor

Hi,

this PR fixes #28180 by applying switch expressions where appropriate (there are a couple of places where they didn't make things more concise imho).

The nice side-benefit is that with switch expressions we get a compilation failure now if a new enum case is added instead of needing to rely on throwing exceptions during runtime.

Cheers,
Christoph

@spring-projects-issues spring-projects-issues added the status: waiting-for-triage An issue we've not yet triaged label Jun 24, 2022
@wilkinsona wilkinsona added this to the 3.0.0-M4 milestone Jun 24, 2022
@wilkinsona wilkinsona added type: task A general task and removed status: waiting-for-triage An issue we've not yet triaged labels Jun 24, 2022
wilkinsona pushed a commit that referenced this pull request Jun 24, 2022
@wilkinsona
Copy link
Member

Thanks very much, @dreis2211.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type: task A general task
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Use switch expressions where appropriate
3 participants