Replace Inflater and Deflater end() calls with close()

MSAL

Replace end() method calls with close() method calls for Inflater and Deflater classes in Java 25+, as they now implement AutoCloseable.

org.openrewrite.java.migrate.util.MigrateInflaterDeflaterToClose
mod run . --recipe=org.openrewrite.java.migrate.util.MigrateInflaterDeflaterToClose

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

Recipe list

It runs these recipes, in this order.

  1. Change method name java.util.zip.Deflater end() to close
  2. Change method name java.util.zip.Inflater end() to close