RFR: 8230016: re-visit test sun/security/pkcs11/Serialize/SerializeProvider.java [v3]

Mikhail Yankelevich myankelevich at openjdk.org
Wed Apr 30 14:36:03 UTC 2025


On Tue, 29 Apr 2025 19:02:38 GMT, Sean Mullan <mullan at openjdk.org> wrote:

>> Mikhail Yankelevich has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   removed unneeded check
>
> test/jdk/sun/security/pkcs11/Serialize/SerializeProvider.java line 51:
> 
>> 49: 
>> 50:         if (Security.getProvider(p.getName()) != p) {
>> 51:             throw new SkippedException("Provider not installed in Security, skipping");
> 
> Hmm, is this check needed? The provider was added on line 47.

Good point, thanks. It is going to throw an skip exception in PKCS11Test before this code actually. I have removed this in the next commit. In case of the null being passed, the `if (Security.getProvider(p.getName()) != p) {` will throw a null pointer.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24750#discussion_r2068791728


More information about the security-dev mailing list