On Tue, 30 Sep 2025 11:28:32 GMT, Matthew Donovan <[email protected]> wrote:

>> A4-A6 are expected to throw an exception. That's why I catch the exception 
>> and print "pass".
>> Am I missing something?
>
> As you say, `load()` is expected to throw an exception so if it doesn't, the 
> test should fail. Without throwing an explicit exception after `ks.load()`, 
> the test will still pass.
> 
> Suggestion:
> 
>                     try {
>                         ks = KeyStore.getInstance("PKCS12");
>                         ks.load(...);
>                         throw new Exception("The expected exception was not 
> thrown.");
>                     } catch (Exception expected) {
>                         System.out.println("PASS");
>                     }

I see it now.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/24429#discussion_r2393139000

Reply via email to