On Wed, 8 May 2024 17:57:22 GMT, Naoto Sato <na...@openjdk.org> wrote:

>> Claes Redestad has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Remove redundant constructor
>
> src/java.base/share/classes/sun/util/locale/BaseLocale.java line 96:
> 
>> 94:     // Interned BaseLocale cache
>> 95:     private static final ReferencedKeySet<BaseLocale> CACHE =
>> 96:             ReferencedKeySet.create(true, 
>> ReferencedKeySet.concurrentHashMapSupplier());
> 
> Should this supplier be in `BaseLocale` class? Otherwise `ReferencedKeySet` 
> may end up with static suppliers for each map type?

Maybe, though I think most potential uses of `ReferenceKeySet/-Map` will want 
to be using a plain `CHM` as the backing store, so keeping these next to their 
respective `create` methods will encourage sharing.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/19140#discussion_r1594444407

Reply via email to