[ 
https://issues.apache.org/jira/browse/LANG-1362?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16222237#comment-16222237
 ] 

ASF GitHub Bot commented on LANG-1362:
--------------------------------------

GitHub user jodastephen opened a pull request:

    https://github.com/apache/commons-lang/pull/304

    Fix DateUtilsTest to work reliably on Java 9

    Fixes failures due to MST time-zone not being formatted as "MST"
    Also sets and unsets time-zones in finally blocks
    to avoid pollution global state when tests fail
    
    See [LANG-1362](https://issues.apache.org/jira/browse/LANG-1362)

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/jodastephen/commons-lang date-tests

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/commons-lang/pull/304.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #304
    
----
commit 0a6d43fc284b9a085d1b72ca38011187c761321e
Author: Stephen Colebourne <step...@opengamma.com>
Date:   2017-10-27T11:56:28Z

    Fix DateUtilsTest to work reliably on Java 9
    
    Fixes failures due to MST time-zone not being formatted as "MST"
    Also sets and unsets time-zones in finally blocks
    to avoid pollution global state when tests fail

----


> Fix tests for Java 9
> --------------------
>
>                 Key: LANG-1362
>                 URL: https://issues.apache.org/jira/browse/LANG-1362
>             Project: Commons Lang
>          Issue Type: Bug
>            Reporter: Stephen Colebourne
>             Fix For: 3.7
>
>
> 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).



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to