On Thu, 13 May 2021 23:53:18 GMT, Valerie Peng <valer...@openjdk.org> wrote:

>> Anyone can help review this somewhat trivial fix? The main change is inside 
>> src/jdk.crypto.cryptoki/share/native/libj2pkcs11/p11_objmgmt.c. This is to 
>> help better troubleshooting by reporting the type of unavailable attributes 
>> in PKCS11 exception message when C_GetAttributeValue(...) call failed. The 
>> java file changes are just cleanup for consolidating the CKR_* constants 
>> definition into PKCS11Exception class.
>> 
>> Thanks,
>> Valerie
>
> Valerie Peng has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   PKCS11Exception class refactoring - use enum instead of HashMap

src/jdk.crypto.cryptoki/share/classes/sun/security/pkcs11/wrapper/PKCS11Exception.java
 line 212:

> 210:         long value() {
> 211:             return value;
> 212:         }

I guess it is safe to use the 'value' variable directly for enum.  The value() 
method may be not necessary.  Just a personal preference, ignore it if you like 
the current way.

-------------

PR: https://git.openjdk.java.net/jdk/pull/3709

Reply via email to