On Fri, 5 Mar 2021 14:14:14 GMT, Claes Redestad <redes...@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 <redes...@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

Reply via email to