On Wed, 18 Sep 2024 14:31:06 GMT, Weijun Wang <[email protected]> wrote:
>> src/java.base/share/classes/javax/crypto/KDF.java line 331:
>>
>>> 329: * if at least one {@code Provider} supports a {@code KDF}
>>> 330: * implementation for the specified algorithm but none of
>>> them
>>> 331: * support the specified parameters
>>
>> I don't understand why this @throws has been removed. @wangweij did you
>> request that this be removed? What about the case where there is a provider
>> that supports the algorithm, but does not support the parameters? I thought
>> we were going to iterate over the providers and try to instantiate each one
>> with the supplied parameters. In that case `NoSuchAlgorithmException` is not
>> appropriate.
>
> Not me.
This is the by-product of the `getNext()` refactoring. I should have modeled
`getNext()` using the code under `getInstance()` instead of `chooseProvider()`
so the debugging and exception can be preserved. Shared the prototype with
Kevin in a haste and just mentioned that additional code may be needed for
debugging.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1765423160