Log Message
Merge change for XSTR-768 from trunk.
Modified Paths
- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/extended/ISO8601GregorianCalendarConverter.java
- branches/v-1.4.x/xstream-distribution/src/content/changes.html
Property Changed
Diff
Property changes: branches/v-1.4.x
Modified: svn:mergeinfo
Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/extended/ISO8601GregorianCalendarConverter.java (2341 => 2342)
--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/extended/ISO8601GregorianCalendarConverter.java 2015-02-17 22:57:51 UTC (rev 2341)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/extended/ISO8601GregorianCalendarConverter.java 2015-02-17 23:20:23 UTC (rev 2342)
@@ -1,6 +1,6 @@
/*
* Copyright (C) 2005 Joe Walnes.
- * Copyright (C) 2006, 2007, 2011, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2011, 2013, 2014, 2015 XStream Committers.
* All rights reserved.
*
* The software in this package is published under the terms of the BSD
@@ -31,7 +31,7 @@
*
* @author Mauro Talevi
* @author Jörg Schaible
- * @see "http://www.iso.org/iso/catalogue_detail?csnumber=40874"
+ * @see <a href="" 8601</a>
* @since 1.1.3
*/
public class ISO8601GregorianCalendarConverter extends AbstractSingleValueConverter {
@@ -97,12 +97,12 @@
// try with next formatter
}
}
- String timeZoneID = TimeZone.getDefault().getID();
+ final DateTimeZone dateTimeZone = DateTimeZone.forTimeZone(TimeZone.getDefault());
for (int i = 0; i < formattersNoUTC.length; i++ ) {
try {
- DateTimeFormatter formatter = formattersNoUTC[i].withZone(DateTimeZone.forID(timeZoneID));
- DateTime dt = formatter.parseDateTime(str);
- Calendar calendar = dt.toGregorianCalendar();
+ final DateTimeFormatter formatter = element.withZone(dateTimeZone);
+ final DateTime dt = formatter.parseDateTime(str);
+ final Calendar calendar = dt.toGregorianCalendar();
calendar.setTimeZone(TimeZone.getDefault());
return calendar;
} catch (IllegalArgumentException e) {
Modified: branches/v-1.4.x/xstream-distribution/src/content/changes.html (2341 => 2342)
--- branches/v-1.4.x/xstream-distribution/src/content/changes.html 2015-02-17 22:57:51 UTC (rev 2341)
+++ branches/v-1.4.x/xstream-distribution/src/content/changes.html 2015-02-17 23:20:23 UTC (rev 2342)
@@ -48,6 +48,7 @@
<li>XSTR-759: Support deserialization of <a href="" datetime format</a>
in DateConverter with Java 7 runtime.</li>
<li>Fix: DateConverter ignores provided locale.</li>
+ <li>XSTR-768: ISO8601GregorianCalendarConverter may set invalid time zone for Joda-Time.</li>
<li>Fix: WeakCache.entrySet().iterator().next.setValue(value) returns the reference instead of the old value.</li>
<li>Fix: SqlTimestampConverter throws IllegalArgumentException instead of ConversionException on fromString().</li>
<li>Fix: CGLIBEnhancedConverter does not initialize transient members of parent after deserialization.</li>
To unsubscribe from this list please visit:
