RFR: 8358076: KeyFactory.getInstance("EdDSA").generatePublic(null) throws NPE [v2]

Anthony Scarpino ascarpino at openjdk.org
Fri May 30 15:57:09 UTC 2025


> 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.

Anthony Scarpino has updated the pull request incrementally with one additional commit since the last revision:

  most should be must

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/25533/files
  - new: https://git.openjdk.org/jdk/pull/25533/files/c5b9a941..78653485

Webrevs:
 - full: https://webrevs.openjdk.org/?repo=jdk&pr=25533&range=01
 - incr: https://webrevs.openjdk.org/?repo=jdk&pr=25533&range=00-01

  Stats: 8 lines in 4 files changed: 0 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/jdk/pull/25533.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/25533/head:pull/25533

PR: https://git.openjdk.org/jdk/pull/25533


More information about the security-dev mailing list