On Thu, 29 May 2025 23:32:59 GMT, Weijun Wang <wei...@openjdk.org> wrote:

>> I need a code review to throw `InvalidKeySpecException` when null is passed 
>> with `generatePublic()` and `generatePrivate()`.  This change takes the 
>> opportunity to modernize the KeyFactory code by using `switch` syntax for 
>> `instanceof` checking, as well as, keeping the previous design of the 
>> implementation method handling the null case.  There are existing JCK test 
>> cover this case, so no regression test is added.
>
> src/java.base/share/classes/sun/security/ec/ECKeyFactory.java line 223:
> 
>> 221:             }
>> 222:             case null -> throw new InvalidKeySpecException(
>> 223:                 "keySpec most not be null");
> 
> `s/most/must/`. Add every other `case null` in this PR.

Sigh.. one typo that is cut and pasted repeatedly.  Sure.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/25533#discussion_r2114909524

Reply via email to