Details
-
Sub-task
-
Resolution: Delivered
-
P4
-
12
-
Verified
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.
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.