Simplify catch clauses for Jackson exceptions

Apache 2.0

In Jackson 3, JacksonException and its subtypes extend RuntimeException. This recipe simplifies multi-catch clauses by removing Jackson exception types when RuntimeException is also caught, since catching both is redundant. For example, catch (JacksonException | RuntimeException e) becomes catch (RuntimeException e).

org.openrewrite.java.jackson.SimplifyJacksonExceptionCatch
mod run . --recipe=org.openrewrite.java.jackson.SimplifyJacksonExceptionCatch

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