Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8212129 Remove Finalize methods from ZipFile, Inflater and Deflater
  3. JDK-8212621

Release Note: Removal of finalize Method in java.util.ZipFile/Inflator/Deflator

    XMLWordPrintable

Details

    Description

      The `finalize` method in `java.util.ZipFile`, `java.util.Inflator`, and `java.util.Deflator` was deprecated for removal in JDK 9 and its implementation was updated to be a no-op. The `finalize` method in `java.util.ZipFile`, `java.util.Inflator`, and `java.util.Deflator` has been removed in this release. Subclasses that override `finalize` in order to perform cleanup should be modified to use alternative cleanup mechanisms and to remove the overriding `finalize` method.

      The removal of the finalize methods will expose `Object.finalize` to subclasses of `ZipFile`, `Deflater`, and `Inflater`. Compilation errors might occur on the override of `finalize` due to the change in declared exceptions. `Object.finalize` is now declared to throw `java.lang.Throwable`. Previously, only `java.io.IOException` was declared.

      Attachments

        Activity

          People

            lancea Lance Andersen
            lancea Lance Andersen
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: