Title: [2283] branches/v-1.4.x: Merge fix for CGLIBEnhancedConverter initialization from trunk.

Diff

Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java (2282 => 2283)


--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java	2014-04-08 20:47:51 UTC (rev 2282)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java	2014-04-08 20:49:05 UTC (rev 2283)
@@ -1,6 +1,6 @@
 /*
  * Copyright (C) 2004, 2005, 2006 Joe Walnes.
- * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2008, 2009, 2010, 2011, 2012, 2013, 2014 XStream Committers.
  * All rights reserved.
  *
  * The software in this package is published under the terms of the BSD
@@ -53,7 +53,7 @@
     public AbstractReflectionConverter(Mapper mapper, ReflectionProvider reflectionProvider) {
         this.mapper = mapper;
         this.reflectionProvider = reflectionProvider;
-        serializationMethodInvoker = new SerializationMethodInvoker();
+        init();
     }
     
     protected boolean canAccess(Class type) {
@@ -558,8 +558,12 @@
         serializationMethodInvoker.flushCache();
     }
 
+    protected void init() {
+        serializationMethodInvoker = new SerializationMethodInvoker();
+    }
+
     private Object readResolve() {
-        serializationMethodInvoker = new SerializationMethodInvoker();
+        init();
         return this;
     }
 

Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter.java (2282 => 2283)


--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter.java	2014-04-08 20:47:51 UTC (rev 2282)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter.java	2014-04-08 20:49:05 UTC (rev 2283)
@@ -1,5 +1,5 @@
 /*
- * Copyright (C) 2006, 2007, 2008, 2010, 2011, 2013 XStream Committers.
+ * Copyright (C) 2006, 2007, 2008, 2010, 2011, 2013, 2014 XStream Committers.
  * All rights reserved.
  *
  * The software in this package is published under the terms of the BSD
@@ -439,6 +439,7 @@
     }
 
     private Object readResolve() {
+        init();
         fieldCache = new HashMap();
         return this;
     }

Modified: branches/v-1.4.x/xstream-distribution/src/content/changes.html (2282 => 2283)


--- branches/v-1.4.x/xstream-distribution/src/content/changes.html	2014-04-08 20:47:51 UTC (rev 2282)
+++ branches/v-1.4.x/xstream-distribution/src/content/changes.html	2014-04-08 20:49:05 UTC (rev 2283)
@@ -39,6 +39,7 @@
     	<li>Fix: DateConverter ignores provided locale.</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>
     </ul>
 
     <h2>API changes</h2>

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to