JDK-8159009 : Remove ExemptionMechanism.finalize() implementation
  • Type: Enhancement
  • Component: security-libs
  • Sub-Component: javax.crypto
  • Priority: P3
  • Status: Closed
  • Resolution: Fixed
  • Submitted: 2016-06-08
  • Updated: 2017-05-17
  • Resolved: 2016-07-09
The Version table provides details related to the release that this issue/RFE will be addressed.

Unresolved : Release in which this issue/RFE will be addressed.
Resolved: Release in which this issue/RFE has been resolved.
Fixed : Release in which this issue/RFE has been fixed. The release containing this fix may be available for download as an Early Access Release or a General Availability Release.

To download the current JDK release, click here.
JDK 9
9 b127Fixed
Sub Tasks
JDK-8159450 :  
Description
The ExemptionMechanism.finalize() is implemented as:

     protected void finalize() {
        keyStored = null;
        // Are there anything else we could do?
    }

We may want to remove this finalize() method as it really does nothing more than the default finalizer but hurt the performance (See Item 7, Effective Java).

Comments
FC Extension Request: CCC and Code got approved. The changeset can be integrated shortly after the FC extension request approval. Hopefully, this request can be approved before July 30. Request to remove the javax.crypto.ExemptionMechanism.finalize() implementation as it really does nothing more than the default finalize() but hurt the performance. The risk of this update is minimal as finalize() is a protected method, and the default implementation (Object.finalize()) works if needed. The Fix can be pushed within 1-2 days of approval since it is already implemented and reviewed.
02-07-2016