RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v37]
Weijun Wang
weijun at openjdk.org
Mon Sep 16 17:46:27 UTC 2024
On Mon, 16 Sep 2024 17:06:26 GMT, Kevin Driver <kdriver at openjdk.org> wrote:
>> src/java.base/share/classes/javax/crypto/KDF.java line 1:
>>
>>> 1: /*
>>
>> I have some overall comments on the implementation of this class:
>>
>> 1. If I understand correctly, whether DPS is completed depends only on whether `pairOfSpiAndProv` is null or not. There seems no need to check the elements inside it using `delegateAndSpiAreInitialized` or whether `serviceIterator` is null.
>> 2. The type name `Delegate` is confusing. How about just call it `SpiAndProv`? The field names `pairOfSpiAndProv` and `firstPairOfSpiAndProv` are also confusing. How about just call them `locked` and `candidate`?
>> 3. There are many places where throws clauses on the 2nd line that are not indented by 8 spaces.
>
> For (2), the name `Delegate` was chosen by another reviewer.
>
> For (3), we need a valid IDE formatting spec. In 2024, we should not be manually indenting. I'll attempt to find a way to specify this in IntelliJ's config.
For (2), I'll see if the another reviewer has a comment.
For (3), my IDE automatically indents 8 chars. It's IntelliJ IDEA of 2024.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1761592695
More information about the security-dev
mailing list