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

LocaleUtils.toLocale(String) cannot parse four segments

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Major
    • Resolution: Fixed
    • 3.14.0
    • 3.16.0
    • lang.*
    • None
    • jdk18

    Description

      the Locale construct method can handle it while the LocaleUtils.toLocale can not

      the test code is
      @Testpublic void testLocaleUtilsToLocaleWithFourSegments() {
      String localeStr = "en_001_US_POSIX"; Locale expectedLocale = new Locale("en", "001", "US_POSIX"); Locale actualLocale = LocaleUtils.toLocale(localeStr); assertEquals(expectedLocale, actualLocale);}

      Attachments

        Activity

          People

            ggregory Gary D. Gregory
            sustech-whl Wang Hailong
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: