<i18n dev> Integrated: 8263090: Avoid reading volatile fields twice in Locale.getDefault(Category)
Claes Redestad
redestad at openjdk.java.net
Mon Mar 8 11:04:10 UTC 2021
On Fri, 5 Mar 2021 14:14:14 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.
This pull request has now been integrated.
Changeset: 13625beb
Author: Claes Redestad <redestad at openjdk.org>
URL: https://git.openjdk.java.net/jdk/commit/13625beb
Stats: 92 lines in 2 files changed: 72 ins; 5 del; 15 mod
8263090: Avoid reading volatile fields twice in Locale.getDefault(Category)
Reviewed-by: rriggs, naoto, serb
-------------
PR: https://git.openjdk.java.net/jdk/pull/2845
More information about the i18n-dev
mailing list