<i18n dev> RFR: 8263090: Avoid reading volatile fields twice in Locale.getDefault(Category) [v2]

Claes Redestad redestad at openjdk.java.net
Fri Mar 5 18:53:29 UTC 2021


> 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

-------------

Changes:
  - all: https://git.openjdk.java.net/jdk/pull/2845/files
  - new: https://git.openjdk.java.net/jdk/pull/2845/files/5d2f0da4..4980d2d6

Webrevs:
 - full: https://webrevs.openjdk.java.net/?repo=jdk&pr=2845&range=01
 - incr: https://webrevs.openjdk.java.net/?repo=jdk&pr=2845&range=00-01

  Stats: 1 line in 1 file changed: 0 ins; 0 del; 1 mod
  Patch: https://git.openjdk.java.net/jdk/pull/2845.diff
  Fetch: git fetch https://git.openjdk.java.net/jdk pull/2845/head:pull/2845

PR: https://git.openjdk.java.net/jdk/pull/2845


More information about the i18n-dev mailing list