On Fri, 28 Apr 2023 19:54:42 GMT, Weijun Wang <[email protected]> wrote:
>> src/java.base/share/classes/sun/security/provider/HSS.java line 423:
>>
>>> 421:
>>> 422: default:
>>> 423: throw new IllegalArgumentException("Unsupported or
>>> bad LMS type");
>>
>> Could this be `InvalidParameterException` instead?
>
> Or should it be a `InvalidKeyException` if the method is called when creating
> a public key?
>
> Anyway, we need to make sure the correct exceptions are thrown in public
> APIs. This needs a lot of tests.
I have caught this at the call sites and converted it to the relevant
exceptions.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13691#discussion_r1183024501