RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v10]

Kevin Driver kdriver at openjdk.org
Fri Aug 16 21:16:36 UTC 2024


On Fri, 16 Aug 2024 18:46:39 GMT, Kevin Driver <kdriver at openjdk.org> wrote:

>> src/java.base/share/classes/javax/crypto/KDF.java line 479:
>> 
>>> 477:         throws InvalidAlgorithmParameterException {
>>> 478: 
>>> 479:             if (alg == null || alg.isEmpty()) {
>> 
>> Well, should NPE be thrown for empty string? Is there any precedent? The above javadoc for NPE does not state so?
>
> I agree. I'll add `NoSuchAlgorithmException` to the method signature.

Addressed in https://github.com/openjdk/jdk/pull/20301/commits/c6f491cd05c76088e6431b2ba9d4ab42b29e4055. Please indicate if this is resolved.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1720355234



More information about the security-dev mailing list