Re: RFR: 8287860: Revise usage of volatile in j.u.Locale [v3]
On Mon, 6 Jun 2022 20:19:22 GMT, Сергей Цыпанов 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()` > > Сергей Цыпанов has updated the pull request incrementally with one additional > commit since the last revision: > > 8287860: Rename local vars Looks good. Thanks for fixing this. - Marked as reviewed by naoto (Reviewer). PR: https://git.openjdk.java.net/jdk/pull/9041
Re: RFR: 8287860: Revise usage of volatile in j.u.Locale [v3]
> - 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()` Сергей Цыпанов has updated the pull request incrementally with one additional commit since the last revision: 8287860: Rename local vars - Changes: - all: https://git.openjdk.java.net/jdk/pull/9041/files - new: https://git.openjdk.java.net/jdk/pull/9041/files/d4534346..454621d4 Webrevs: - full: https://webrevs.openjdk.java.net/?repo=jdk=9041=02 - incr: https://webrevs.openjdk.java.net/?repo=jdk=9041=01-02 Stats: 14 lines in 1 file changed: 0 ins; 0 del; 14 mod Patch: https://git.openjdk.java.net/jdk/pull/9041.diff Fetch: git fetch https://git.openjdk.java.net/jdk pull/9041/head:pull/9041 PR: https://git.openjdk.java.net/jdk/pull/9041