Title: [2342] branches/v-1.4.x: Merge change for XSTR-768 from trunk.
Revision
2342
Author
joehni
Date
2015-02-17 17:20:23 -0600 (Tue, 17 Feb 2015)

Log Message

Merge change for XSTR-768 from trunk.

Modified Paths


Property Changed

Diff

Property changes: branches/v-1.4.x


Modified: svn:mergeinfo

+ /trunk:2151-2152,2154-2156,2158-2163,2165,2172,2175,2177,2188-2189,2197,2199-2201,2204,2206,2210,2212,2214-2217,2226,2229,2231,2233-2234,2236-2238,2247-2249,2279-2280,2285,2291-2292,2294,2298-2299,2301,2303,2306-2310,2312,2314,2316-2318,2320,2322,2324,2326,2329,2333,2335,2339,2341

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:

http://xircles.codehaus.org/manage_email

Reply via email to