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

request for Locale.parseLocale()

    XMLWordPrintable

    Details

    • Type: Enhancement
    • Status: Closed
    • Priority: P4
    • Resolution: Won't Fix
    • Affects Version/s: 6
    • Fix Version/s: None
    • Component/s: core-libs
    • Labels:

      Description

      A DESCRIPTION OF THE REQUEST :
      As already done for many other classes (e.g. any Number class) it would be fine if java.util.Locale also provides a method to parse a Locale-String like "en_GB"

      JUSTIFICATION :
      nearly each developer will come to the point to parse a locale and writes his own solution. It is not much work to integrate it in the Locale class itself and would make it more usable

      EXPECTED VERSUS ACTUAL BEHAVIOR :
      EXPECTED -
      Locale locale = Locale.parseLocale("en");
      locale = Locale.parseLocale("en_GB");
      locale = Locale.parseLocale("en-GB");
      // ...
      ACTUAL -
      locale = myParseLocale("en_GB");

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              naoto Naoto Sato
              Reporter:
              ndcosta Nelson Dcosta (Inactive)
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: