RFR: 8284855: Update needed to Cleaners added to jdk.crypto.cryptoki [v4]
Xue-Lei Andrew Fan
xuelei at openjdk.java.net
Fri Apr 15 15:50:20 UTC 2022
On Fri, 15 Apr 2022 15:23:33 GMT, Roger Riggs <rriggs at openjdk.org> wrote:
>> Xue-Lei Andrew Fan has updated the pull request incrementally with one additional commit since the last revision:
>>
>> more update on replace lambda
>
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java line 117:
>
>> 115:
>> 116: // Note: Please don't update this field other than the constructor.
>> 117: // Otherwise, the native data is not able to be collected.
>
> If it is only set in the constructor, it can be 'final".
I would prefer to use 'final'. But this field is set by JNI code. I'm not very sure of the impact if declaring it as final field.
> src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11.java line 235:
>
>> 233: * and any subsequent calls to C_ methods will fail. This method is for
>> 234: * internal use only. Please don't use this method other than finalization.
>> 235: *
>
> Perhaps refer to the code in which the cleanup occurs.
Good point! A reference to the releaserFor() method is added.
-------------
PR: https://git.openjdk.java.net/jdk/pull/8248
More information about the security-dev
mailing list