Uploaded image for project: 'JDK'
  1. JDK
  2. JDK-8263090

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

    XMLWordPrintable

    Details

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

      Description

      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.

        Attachments

          Issue Links

            Activity

              People

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

                Dates

                Created:
                Updated:
                Resolved: