RFR: 8328608: Multiple NewSessionTicket support for TLS [v2]

Anthony Scarpino ascarpino at openjdk.org
Mon Jul 29 14:58:34 UTC 2024


On Thu, 27 Jun 2024 18:10:37 GMT, Anthony Scarpino <ascarpino at openjdk.org> wrote:

>> src/java.base/share/classes/sun/security/util/Cache.java line 716:
>> 
>>> 714:                 }
>>> 715:                 if (entry.isValid(time)) {
>>> 716:                     // SoftReference get() returns the same as entry.getValue()
>> 
>> this doesn't look right
>
> I checked it through debugging.  I was a bit surprised myself that it didn't return the `QueueCacheEntry`.get().  I can switch it the below if that's agreeable.
> 
>                 if (entry.isValid(time)) {
>                     if (entry instanceof SoftCacheEntry<K,V> sce) {
>                         return sce.get();
>                     }
>                     return entry.getValue();
>                 }

What what's it's worth, I changed the behavior here.  The SoftCacheEntry is now  only soft referenced, the QueueCacheEntry is not.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19465#discussion_r1695385929



More information about the security-dev mailing list