Combine semantically equal catch blocks

MSAL

Combine catches in a try that contain semantically equivalent blocks. No change will be made when a caught exception exists if combining catches may change application behavior or type attribution is missing. Merging duplicate catch bodies into multi-catch blocks reduces repetition and makes the exception handling strategy easier to follow.

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

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