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. src/java.base/share/classes/java/util/Locale.java line 959: > 957: } > 958: > 959: private static Locale getDisplayLocale() { Should this be `synchronized`? ------------- PR: https://git.openjdk.java.net/jdk/pull/2845