RFR: 8365288: PEMDecoder should throw ClassCastException [v5]

Weijun Wang weijun at openjdk.org
Thu Aug 28 22:03:42 UTC 2025


On Thu, 28 Aug 2025 21:26:27 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> 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:
> 
>   nits

LGTM.

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

Marked as reviewed by weijun (Reviewer).

PR Review: https://git.openjdk.org/jdk/pull/26734#pullrequestreview-3166682868


More information about the security-dev mailing list