[prev in list] [next in list] [prev in thread] [next in thread] 

List:       poi-dev
Subject:    fixed failing tests in TestOutlookTextExtractor.
From:       Yegor Kozlov <yegor.kozlov () dinom ! ru>
Date:       2012-10-24 12:10:53
Message-ID: CAAwi-j_x_kWtWYsvwYApoNGohZ55nqL0eTK3AtqgQg5tPVG=hA () mail ! gmail ! com
[Download RAW message or body]

The POI build in Gump has been failing for a while. The trouble was
with two locale-dependent tests in TestOutlookTextExtractor. If locale
was UTC+1 then all was good and the tests passed. Any other time
ettings didn't work and the tests failed. It happened because
OutlookTextExtactor didn't not set time zone when formatting dates and
the result depended on the default settings taken from OS.

The fix is simple: always force the UTC time zone when formatting dates:

format.setTimeZone(TimeZone.getTimeZone("UTC"));

This way the extracted text is always the same and does not depend on
the time zone in OS.

Yegor

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic