On Thu, 9 Oct 2025 16:50:01 GMT, Anthony Scarpino <[email protected]> wrote:
>> On NPE, there is no `key` param. > > Ok, I can reword RuntimeException somewhat, but it really is summed up by > `Cipher.doFinal()` throwing an error, so an actual "encryption error". What I mean is that it is very rare for an API to be specified to throw a `RuntimeException`. It is typically a subclass. Also, I know the PEM API is more geared towards throwing unchecked exceptions, but this is an existing lower-level class that already throws checked exceptions when things go wrong, so it does feel to me a bit inconsistent to be throwing runtime exceptions when crypto operations fail in the new methods. Consider having another look at the way errors are treated in the next API update. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/27147#discussion_r2432926931
