RFR: 8360463: Ambiguity in Cipher.getInstance() specification between NoSuchAlgorithmException and NoSuchPaddingException [v2]

Valerie Peng valeriep at openjdk.org
Wed Aug 13 00:24:11 UTC 2025


On Wed, 13 Aug 2025 00:09:42 GMT, Weijun Wang <weijun at openjdk.org> wrote:

> Is it worth demonstrating the different behaviors with a test?

This is covered by existing TCK test and thus the request for clarification. This is provider-specific, i.e. depending on how provider registers its implementation, it may leads to different exceptions. Given that the difference is only the type of exception, e.g. `NoSuchAlgorithmException` vs `NoSuchPaddingException`, I don't feel it's that critical to add a regression test in addition to the existing TCK test.

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

PR Comment: https://git.openjdk.org/jdk/pull/26489#issuecomment-3181702671


More information about the security-dev mailing list