On Fri, 15 Apr 2022 15:23:33 GMT, Roger Riggs <rri...@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

Reply via email to