On Sat, 7 Jan 2023 08:21:38 GMT, Sergey Bylokhov <[email protected]> wrote:
>> Volker Simonis has updated the pull request incrementally with one
>> additional commit since the last revision:
>>
>> Updated copyright year to 2023
>
> src/java.base/share/classes/sun/security/ssl/SSLSessionContextImpl.java line
> 209:
>
>> 207: // Package-private, used only from
>> SessionTicketExtension.KeyState::getCurrentKey.
>> 208: SessionTicketExtension.StatelessKey getKey(HandshakeContext hc) {
>> 209: SessionTicketExtension.StatelessKey ssk =
>> keyHashMap.get(currentKeyID);
>
> is it safe to assume that the "currentKeyID" initialized/updated before on a
> different thread can be correctly read here?
Yes, because `currentKeyID` is updated in a synchronized section *after* the
corresponding key was added to `keyHashMap`.
-------------
PR: https://git.openjdk.org/jdk/pull/11590