Code Review Request, JDK-8159009: Useless ExemptionMechanism.finalize() implementation

Xuelei Fan xuelei.fan at oracle.com
Sat Jul 9 02:22:13 UTC 2016


Hi,

Please review this simple code cleanup:

   http://cr.openjdk.java.net/~xuelei/8159009/webrev.00/

The javax.crypto.ExemptionMechanism.finalize() is implemented as:

    /**
     * Ensures that the key stored away by this ExemptionMechanism
     * object will be wiped out when there are no more references to it.
     */
     protected void finalize() {
        keyStored = null;
        // Are there anything else we could do?
    }

Plan to remove this finalize() method as it really does nothing more
than the default finalizer but hurt the performance.

Thanks,
Xuelei



More information about the security-dev mailing list