RFR: 8365288: PEMDecoder should throw ClassCastException [v2]

Anthony Scarpino ascarpino at openjdk.org
Tue Aug 12 17:43:30 UTC 2025


> This bug fix is to change PEMDecoder.decode(..., Class<>) using PKCS8EncodedKeySpec and X509EncodedKeySpec will throw an IllegalArgumentException when the decoded data does not match. It should be ClassCastException.
> 
> Thanks
> 
> Tony

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

  change to isInstance

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

Changes:
  - all: https://git.openjdk.org/jdk/pull/26734/files
  - new: https://git.openjdk.org/jdk/pull/26734/files/b82a2ab7..5450a160

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

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.org/jdk/pull/26734.diff
  Fetch: git fetch https://git.openjdk.org/jdk.git pull/26734/head:pull/26734

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


More information about the security-dev mailing list