Remove Java 14's instanceof pattern matching

MSAL

Adds an explicit variable declaration at the beginning of the if statement instead of instanceof pattern matching. A record pattern, or a pattern whose variable is used outside the if statement or ternary that tests it, is left unchanged.

org.openrewrite.staticanalysis.RemoveInstanceOfPatternMatch
mod run . --recipe=org.openrewrite.staticanalysis.RemoveInstanceOfPatternMatch

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