Convert switch cases where every case returns into a returned switch expression
MSALSwitch 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. SwitchCaseReturnsToSwitchExpressionmod run . --recipe= org. openrewrite. java. migrate. lang. SwitchCaseReturnsToSwitchExpressionInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.