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

Revise usage of volatile in j.u.Locale

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Fixed
    • P4
    • 19
    • None
    • core-libs
    • None
    • b26

    Description

      - cached hash code of Locale and Locale$LanguageRange shouldn't be volatile, even in case of concurrent access in the worst case it is recalculated at most once per thread
      - defaultLocale field is read multiple times in initDefault()
      - isoLanguages is accessed multiple times in getISOLanguages()
      - languageTag is read twice in toLanguageTag()

      Attachments

        Issue Links

          Activity

            People

              stsypanov Sergey Tsypanov
              stsypanov Sergey Tsypanov
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: