Convert switch cases where every case returns into a returned switch expression

MSAL

Switch statements where each case returns a value can be converted to a switch expression that returns the value directly. This recipe is only applicable for Java 21 and later.

org.openrewrite.java.migrate.lang.SwitchCaseReturnsToSwitchExpression
mod run . --recipe=org.openrewrite.java.migrate.lang.SwitchCaseReturnsToSwitchExpression

Install it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.