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

request for Locale.parseLocale()

XMLWordPrintable

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

      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");

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

              Created:
              Updated:
              Resolved:
              Imported:
              Indexed: