Uploaded image for project: 'logback'
  1. logback
  2. LOGBACK-969

DatePatternToRegexTest fails on non English locale

    XMLWordPrintable

    Details

    • Type: Bug
    • Status: Resolved
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: 1.1.2
    • Fix Version/s: 1.1.3
    • Component/s: logback-core
    • Labels:

      Description

      When I have Czech locale test fails.

      Failed tests: 
        DatePatternToRegexTest.timeZone:68->doTest:93->doTest:89->verify:105 [2009-IX-03 21:57:16 CEST] does not match regex [\d{4}-.{3,12}-\d{2} \d{2}:\d{2}:\d{2} .*]
        DatePatternToRegexTest.dot:62->doTest:93->doTest:89->verify:105 [2009.IX.03] does not match regex [\d{4}\..{3,12}\.\d{2}]
        DatePatternToRegexTest.month:56->doTest:93->doTest:89->verify:105 [2009-IX-03] does not match regex [\d{4}-.{3,12}-\d{2}]
        DatePatternToRegexTest.dayInWeek:74->doTest:93->doTest:89->verify:105 [2009-IX-Čt] does not match regex [\d{4}-.{3,12}-.{2,12}]
        DatePatternToRegexTest.amPm:81->doTest:93->doTest:89->verify:105 [2009-09-03 odp.] does not match regex [\d{4}-\d{2}-\d{2} .{2}]

      It looks like that CharSequenceToRegexMapper suppose that MMM means string of length from 3 to 12 chars. But SimpleDateFormat uses Locale names for months and it could be string of length 1 to n chars.

        Attachments

          Activity

            People

            Assignee:
            ceki Ceki Gülcü
            Reporter:
            ivo.smid Ivo Smid
            Votes:
            1 Vote for this issue
            Watchers:
            3 Start watching this issue

              Dates

              Created:
              Updated:
              Resolved: