Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-865

LocaleUtils.toLocale does not parse strings starting with an underscore

    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 3.1
    • Fix Version/s: 3.2
    • Component/s: lang.*
    • Labels:

      Description

      Hi,

      Javadocs of Locale.toString() states that "If the language is missing, the string will begin with an underbar.". This is not handled in the LocaleUtils.toLocale method if it is meant to be the inversion method of Locale.toString().

      The fix for the ticket 328 does not handle well the case "fr__P", which I found out during fixing the first bug.

      I am attaching the patch for both problems.

        Attachments

        1. LANG-865.patch
          6 kB
          Endre Jeges

          Activity

            People

            • Assignee:
              Unassigned
              Reporter:
              endre.jeges Endre Jeges
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 3h
                3h
                Remaining:
                Remaining Estimate - 3h
                3h
                Logged:
                Time Spent - Not Specified
                Not Specified