On Mon, 6 Jun 2022 12:58:39 GMT, Сергей Цыпанов <d...@openjdk.java.net> wrote:

> - cached hash code of `Locale` and `Locale$LanguageRange` shouldn't be 
> volatile, even in case of race in the worst case it is recalculated at most 
> once per thread
> - `defaultLocale` field is read multiple times in `initDefault()`
> - `isoLanguages` is accessed multiple times in `getISOLanguages()`
> - `languageTag` is read twice in `toLanguageTag()`

This pull request has now been integrated.

Changeset: 4fe0ca9e
Author:    Sergey Tsypanov <sergei.tsypa...@yandex.ru>
Committer: Naoto Sato <na...@openjdk.org>
URL:       
https://git.openjdk.java.net/jdk/commit/4fe0ca9ec3b995eb113ac214219cae22f83333c9
Stats:     24 lines in 2 files changed: 5 ins; 0 del; 19 mod

8287860: Revise usage of volatile in j.u.Locale

Reviewed-by: naoto

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

PR: https://git.openjdk.java.net/jdk/pull/9041

Reply via email to