<i18n dev> RFR: 8263090: Avoid reading volatile fields twice in Locale.getDefault(Category) [v2]
Naoto Sato
naoto at openjdk.java.net
Fri Mar 5 19:01:09 UTC 2021
On Fri, 5 Mar 2021 18:53:29 GMT, Claes Redestad <redestad at openjdk.org> wrote:
>> This patch refactors Locale.getDefault(Category) so that the volatile field holding the Locale is typically only read once. This has a small performance advantage, and might be more robust if initialization is racy.
>
> Claes Redestad has updated the pull request incrementally with one additional commit since the last revision:
>
> Fix omitted synchronized
Looks good.
-------------
Marked as reviewed by naoto (Reviewer).
PR: https://git.openjdk.java.net/jdk/pull/2845
More information about the i18n-dev
mailing list