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

Case Fold Locale Legacy Tags On Demand

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Fixed
    • Icon: P4 P4
    • 26
    • 26
    • core-libs
    • None
    • master
    • generic
    • generic

      LanguageTag builds a HashMap which contains a String to Array of String mapping. As all the legacy tags are known, we could reduce the need for the map + the 26 String arrays by replacing the mapping with a String to String switch statement. This would facilitate cleanup of all the calculations performed in the static block of LanguageTag: creating the map, case folding all the legacy tag keys to lower case, and populating the map.

      Instead of requiring the case folded legacy tag, we can map the keys as lower case legacy tags, and fold them correctly on demand. This should be reasonable since those legacy tags are grandfathered and are not subject to change, so our process on case-folding the non standard tags should remain stable.

            jlu Justin Lu
            jlu Justin Lu
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: