Simplify catch clauses for Jackson exceptions
Apache 2.0In 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. SimplifyJacksonExceptionCatchmod run . --recipe= org. openrewrite. java. jackson. SimplifyJacksonExceptionCatchInstall it once from Recipe actions, then run it on every repository under the current directory. New to the Moderne CLI? Set it up.