RFR: 8366159: SkippedException is treated as a pass for pkcs11/KeyStore, pkcs11/SecretKeyFactory and pkcs11/SecureRandom

Francesco Andreuzzi duke at openjdk.org
Tue Aug 26 14:50:37 UTC 2025


On Tue, 26 Aug 2025 14:19:06 GMT, Mikhail Yankelevich <myankelevich at openjdk.org> wrote:

>> test/jdk/sun/security/pkcs11/KeyStore/CertChainRemoval.java line 130:
>> 
>>> 128:             printKeyStore("Initial PKCS11 KeyStore: ", p11ks);
>>> 129:         } catch (Exception e) {
>>> 130:             throw new SkippedException("Skip test, due to " + e);
>> 
>> Maybe `e` can be specified as a real `cause` now?
>
> I might be misunderstanding your point, but I think in this case a full exception stack trace would be more helpful. It covers everything this way.

The usual way to print exceptions includes the cause too. So if you create `SkippedException` as `new SkippedException("Skip test", e)` you should see `e` too in the error.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/26942#discussion_r2301251031


More information about the security-dev mailing list