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

LocaleUtils.toLocale does not parse strings starting with an underscore

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Major
    • Resolution: Fixed
    • 3.1
    • 3.2
    • lang.*

    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

            Unassigned Unassigned
            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