RFR: 8331008: Implement JEP 478: Key Derivation Function API (Preview) [v10]
Kevin Driver
kdriver at openjdk.org
Fri Sep 6 18:45:42 UTC 2024
On Fri, 6 Sep 2024 14:06:08 GMT, Viktor Klang <vklang at openjdk.org> wrote:
>> My understanding is that `volatile` is used when accessing the contents of the object, which we are not doing with this locking object, so IMO there is no reason for the keyword to be added.
>>
>> I'll apply your other suggestion about explicit comments.
>
> If the lock is used for double-checked locking the member which is lazily initialized needs `volatile` if the instance is not completely immutable.
I added the above comments, as suggested, in https://github.com/openjdk/jdk/pull/20301/commits/5573558cc0c78a2acc9713d27eab8a082ce5ff78.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/20301#discussion_r1747569424
More information about the security-dev
mailing list