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

Fix tests DateUtilsTest for Java 9 with en_GB locale

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Closed
    • Minor
    • Resolution: Fixed
    • None
    • 3.7
    • lang.time.*
    • None

    Description

      On Java 9 I see DateUtilsTest fail. This is because "MST7MDT" zone is not formatted as "MST". I'm unclear as to why this is, but it is not relevant to what the test is trying to do. As such, I've changed the zone to "America/Denver" and changed the format letter from "z" to "XXX" to make it more reliable.

      The PR also uses try-finally when setting the default time-zone to avoid pollution of global state if a test fails (the pollution here made it look like 8 test failures when there was only in fact 1).

      Attachments

        Issue Links

          Activity

            People

              ggregory Gary D. Gregory
              scolebourne@joda.org Stephen Colebourne
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved: