Avoid reading volatile fields twice in Locale.getDefault(Category)

XMLWordPrintable

    • Type: Enhancement
    • Resolution: Fixed
    • Priority: P4
    • 17
    • Affects Version/s: None
    • Component/s: core-libs
    • None

      Current implementation of Locale.getDefault(Locale.Category) will read the volatile field holding the default locale at least twice. This has a minor performance cost, and could be unsound.

            Assignee:
            Claes Redestad
            Reporter:
            Claes Redestad
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: