Repository: commons-lang Updated Branches: refs/heads/master ac1c34155 -> c99a78775
LANG-1202: parseDateStrictly does't pass specified locale Project: http://git-wip-us.apache.org/repos/asf/commons-lang/repo Commit: http://git-wip-us.apache.org/repos/asf/commons-lang/commit/c99a7877 Tree: http://git-wip-us.apache.org/repos/asf/commons-lang/tree/c99a7877 Diff: http://git-wip-us.apache.org/repos/asf/commons-lang/diff/c99a7877 Branch: refs/heads/master Commit: c99a787752770b8952297e24e07bd404cb2f4f74 Parents: ac1c341 Author: Chas Honton <[email protected]> Authored: Sat Apr 23 17:44:44 2016 -0700 Committer: Chas Honton <[email protected]> Committed: Sat Apr 23 17:44:48 2016 -0700 ---------------------------------------------------------------------- src/changes/changes.xml | 2 +- .../java/org/apache/commons/lang3/time/DateUtils.java | 2 +- .../java/org/apache/commons/lang3/time/DateUtilsTest.java | 10 +++++++--- 3 files changed, 9 insertions(+), 5 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/commons-lang/blob/c99a7877/src/changes/changes.xml ---------------------------------------------------------------------- diff --git a/src/changes/changes.xml b/src/changes/changes.xml index 35c9185..8118fe1 100644 --- a/src/changes/changes.xml +++ b/src/changes/changes.xml @@ -22,7 +22,7 @@ <body> <release version="3.5" date="tba" description="tba"> - + <action issue="LANG-1202" type="fix" dev="chas" due-to="Markus Jelsma">parseDateStrictly does't pass specified locale</action> <action issue="LANG-1219" type="fix" dev="chas" due-to="Jarek">FastDateFormat doesn't respect summer daylight in some localized strings</action> <action issue="LANG-1201" type="add" dev="ggregory" due-to="Gary Gregory">Add a TimeUnit-like classes for base 2 and base 10 digital conversions (bits, bytes, KB, MB, and so on)</action> <action issue="LANG-1146" type="add" dev="ggregory" due-to="Gabor Liptak">z/OS identification in SystemUtils</action> http://git-wip-us.apache.org/repos/asf/commons-lang/blob/c99a7877/src/main/java/org/apache/commons/lang3/time/DateUtils.java ---------------------------------------------------------------------- diff --git a/src/main/java/org/apache/commons/lang3/time/DateUtils.java b/src/main/java/org/apache/commons/lang3/time/DateUtils.java index 7be8c74..c242bd5 100644 --- a/src/main/java/org/apache/commons/lang3/time/DateUtils.java +++ b/src/main/java/org/apache/commons/lang3/time/DateUtils.java @@ -339,7 +339,7 @@ public class DateUtils { * @since 3.2 */ public static Date parseDateStrictly(final String str, final Locale locale, final String... parsePatterns) throws ParseException { - return parseDateWithLeniency(str, null, parsePatterns, false); + return parseDateWithLeniency(str, locale, parsePatterns, false); } /** http://git-wip-us.apache.org/repos/asf/commons-lang/blob/c99a7877/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java ---------------------------------------------------------------------- diff --git a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java index ecf4bb6..2710432 100644 --- a/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java +++ b/src/test/java/org/apache/commons/lang3/time/DateUtilsTest.java @@ -36,15 +36,15 @@ import java.util.Locale; import java.util.NoSuchElementException; import java.util.TimeZone; -import junit.framework.AssertionFailedError; - -import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.apache.commons.lang3.test.SystemDefaults; +import org.apache.commons.lang3.test.SystemDefaultsSwitch; import org.junit.Before; import org.junit.BeforeClass; import org.junit.Rule; import org.junit.Test; +import junit.framework.AssertionFailedError; + /** * Unit tests {@link org.apache.commons.lang3.time.DateUtils}. */ @@ -1663,5 +1663,9 @@ public class DateUtilsTest { } } + @Test + public void testLANG799() throws ParseException { + DateUtils.parseDateStrictly("09 abril 2008 23:55:38 GMT", new Locale("es"), new String[]{"dd MMM yyyy HH:mm:ss zzz"}); + } }
