Find unclosed resources (S2095)

Proprietary

Identifies resources implementing AutoCloseable/Closeable that are opened but not properly closed on all execution paths. Unclosed resources can lead to resource leaks that degrade application performance and stability.

org.openrewrite.analysis.java.dataflow.FindUnclosedResources
mod run . --recipe=org.openrewrite.analysis.java.dataflow.FindUnclosedResources

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