openrewrite / rewrite-static-analysis

OpenRewrite recipes for identifying and fixing static analysis issues.
Apache License 2.0
31 stars 46 forks source link

Combine semantically equal catch blocks with same var declarations #280

Closed Marklinzi closed 5 months ago

Marklinzi commented 6 months ago

What's changed?

Fix NPE in CombineSemanticallyEqualCatchBlocks occurring when semantically equal catch blocks contain a variable declaration.

What's your motivation?

Fixes https://github.com/openrewrite/rewrite-static-analysis/issues/278.

Have you considered any alternatives or workarounds?

No.

Checklist

timtebeek commented 5 months ago

Thanks a lot for the detailed look and response to my question. Good to have this case fixed. We expect to follow up with a release early next week. Until then you can try it out from our snapshot versions