RFR: 8196869: Optimize Locale creation

Paul Sandoz paul.sandoz at oracle.com
Thu Feb 8 02:06:15 UTC 2018

This is looking much better, definitely easier to understand.


> On Feb 7, 2018, at 4:38 PM, Claes Redestad <claes.redestad at oracle.com> wrote:
> Hi,
> On 2018-02-07 15:23, Claes Redestad wrote:
>> - use map.replace to safely update the entry when putIfAbsent returns an object
>>   but it points to a cleared value, so that (benign) races to create new Locale objects
>>   will canonicalize
> turns out the implementation attempted here with map.replace was problematic,
> causing certain tests to fail. Seems there are subtle issues here around
> establishing a stable equality relationship which may or may not be easy to
> resolve, so I reverted back these particular changes to LocaleObjectCache from this
> RFE.
> I also did some cleanup in BaseLocale based on offline feedback from Paul:
> http://cr.openjdk.java.net/~redestad/8196869/jdk.03/
> Thanks!
> /Claes

More information about the core-libs-dev mailing list