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

request for Locale.parseLocale()

    XMLWordPrintable

Details

    • Enhancement
    • Resolution: Won't Fix
    • P4
    • None
    • 6
    • core-libs

    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

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

              Dates

                Created:
                Updated:
                Resolved:
                Imported:
                Indexed: