Replace finalize method in java.util.zip.ZipFile, java.util.zip.Inflater and java.util.zip.Deflater

MSAL

The finalize method in java.util.zip.ZipFile is replaced with the close method and is replaced by the end method in java.util.zip.Inflater and java.util.zip.Deflater as it is no longer available in Java SE 12 and later.

org.openrewrite.java.migrate.RemovedZipFinalizeMethods
mod run . --recipe=org.openrewrite.java.migrate.RemovedZipFinalizeMethods

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.Inflater finalize() to end
  2. Change method name java.util.zip.Deflater finalize() to end
  3. Change method name java.util.zip.ZipFile finalize() to close