Adopt switch pattern matching (JEP 441)
MSALJEP 441 describes how some switch statements can be improved with pattern matching. This recipe applies some of those improvements where applicable.
org. openrewrite. java. migrate. SwitchPatternMatchingmod run . --recipe= org. openrewrite. java. migrate. SwitchPatternMatchingInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.
Recipe list
It runs these recipes, in this order.