<div dir="auto">Make sense to me. Thank you! I have no more comments.</div><div><br><div class="gmail_quote gmail_quote_container"><div dir="ltr" class="gmail_attr">On Wed, Feb 4, 2026 at 6:17 PM Artur Barashev <<a href="mailto:abarashev@openjdk.org">abarashev@openjdk.org</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-style:solid;padding-left:1ex;border-left-color:rgb(204,204,204)">On Wed, 4 Feb 2026 23:33:44 GMT, Xue-Lei Andrew Fan <<a href="mailto:xuelei@openjdk.org" target="_blank">xuelei@openjdk.org</a>> wrote:<br>
<br>
>> Artur Barashev has updated the pull request incrementally with one additional commit since the last revision:<br>
>> <br>
>> Correct message name in javadoc<br>
><br>
> src/java.base/share/classes/sun/security/ssl/SSLContextImpl.java line 236:<br>
> <br>
>> 234: return compCertCache;<br>
>> 235: }<br>
>> 236: <br>
> <br>
> Thank you for the update, @artur-oracle! As sslContext instance are normally run in multiple threads context, could cache operation synchronization be a concern?<br>
<br>
I considered synchronization but I don't think it's really needed, the situation is the same as with cache being static actually:<br>
<br>
- `SoftMemoryCache` being used is already synchronized internally for `get` and `put` operations.<br>
- Race condition is possible in between `get` and `put` operations in `CompressedCertProducer`, but the worst that can happen is that we either compress certMsg that is cached already, or insert the same compressed certMsg into cache twice. Not something worth to synchronize for IMO.<br>
- I chose `SoftMemoryCache` over `ConcurrentHashMap` because of LRU and soft reference mechanisms. Otherwise the former provides better per-bucket synchronization and atomic `computeIfAbsent` call.<br>
<br>
-------------<br>
<br>
PR Review Comment: <a href="https://git.openjdk.org/jdk/pull/28682#discussion_r2766747778" rel="noreferrer" target="_blank">https://git.openjdk.org/jdk/pull/28682#discussion_r2766747778</a><br>
</blockquote></div></div>