Title: [2280] trunk: Fix: CGLIBEnhancedConverter does not initialize transient members of parent after deserialization.
Revision
2280
Author
joehni
Date
2014-04-08 15:32:23 -0500 (Tue, 08 Apr 2014)

Log Message

Fix: CGLIBEnhancedConverter does not initialize transient members of parent after deserialization.

Modified Paths

Diff

Modified: trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java (2279 => 2280)


--- trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java	2014-04-08 20:26:49 UTC (rev 2279)
+++ trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/AbstractReflectionConverter.java	2014-04-08 20:32:23 UTC (rev 2280)
@@ -53,7 +53,7 @@
     public AbstractReflectionConverter(final Mapper mapper, final ReflectionProvider reflectionProvider) {
         this.mapper = mapper;
         this.reflectionProvider = reflectionProvider;
-        serializationMethodInvoker = new SerializationMethodInvoker();
+        init();
     }
 
     protected boolean canAccess(final Class<?> type) {
@@ -532,8 +532,12 @@
         serializationMethodInvoker.flushCache();
     }
 
+    protected void init() {
+        serializationMethodInvoker = new SerializationMethodInvoker();
+    }
+
     private Object readResolve() {
-        serializationMethodInvoker = new SerializationMethodInvoker();
+        init();
         return this;
     }
 

Modified: trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter.java (2279 => 2280)


--- trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter.java	2014-04-08 20:26:49 UTC (rev 2279)
+++ trunk/xstream/src/java/com/thoughtworks/xstream/converters/reflection/CGLIBEnhancedConverter.java	2014-04-08 20:32:23 UTC (rev 2280)
@@ -436,6 +436,7 @@
     }
 
     private Object readResolve() {
+        init();
         fieldCache = new HashMap<String, List<Field>>();
         return this;
     }

Modified: trunk/xstream-distribution/src/content/changes.html (2279 => 2280)


--- trunk/xstream-distribution/src/content/changes.html	2014-04-08 20:26:49 UTC (rev 2279)
+++ trunk/xstream-distribution/src/content/changes.html	2014-04-08 20:32:23 UTC (rev 2280)
@@ -64,6 +64,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