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

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

XMLWordPrintable

    • Icon: Enhancement Enhancement
    • Resolution: Fixed
    • Icon: P4 P4
    • 17
    • None
    • 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.

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

              Created:
              Updated:
              Resolved: