Replace Optional#isPresent() with Optional#ifPresent()

MSAL

Replace Optional#isPresent() with Optional#ifPresent(). This recipe only applies to if statements without an else branch and with a single condition.

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

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