Title: [2205] branches/v-1.4.x: Merge bugfix for separate ConverterLookup/ConverterRegistry from HEAD.
Revision
2205
Author
joehni
Date
2013-12-27 12:42:46 -0600 (Fri, 27 Dec 2013)

Log Message

Merge bugfix for separate ConverterLookup/ConverterRegistry from HEAD.

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

Modified: branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/XStream.java (2204 => 2205)


--- branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/XStream.java	2013-12-27 18:40:40 UTC (rev 2204)
+++ branches/v-1.4.x/xstream/src/java/com/thoughtworks/xstream/XStream.java	2013-12-27 18:42:46 UTC (rev 2205)
@@ -481,11 +481,17 @@
     }
     
     private XStream(
-        ReflectionProvider reflectionProvider, HierarchicalStreamDriver driver,
-        ClassLoaderReference classLoader, Mapper mapper, DefaultConverterLookup defaultConverterLookup) {
-        this(
-            reflectionProvider, driver, classLoader, mapper, defaultConverterLookup,
-            defaultConverterLookup);
+            ReflectionProvider reflectionProvider, HierarchicalStreamDriver driver, ClassLoaderReference classLoader,
+            Mapper mapper, final DefaultConverterLookup defaultConverterLookup) {
+        this(reflectionProvider, driver, classLoader, mapper, new ConverterLookup() {
+            public Converter lookupConverterForType(Class type) {
+                return defaultConverterLookup.lookupConverterForType(type);
+            }
+        }, new ConverterRegistry() {
+            public void registerConverter(Converter converter, int priority) {
+                defaultConverterLookup.registerConverter(converter, priority);
+            }
+        });
     }
 
     /**
@@ -586,7 +592,7 @@
             mapper = buildMapperDynamically(ANNOTATION_MAPPER_TYPE, new Class[]{
                 Mapper.class, ConverterRegistry.class, ConverterLookup.class,
                 ClassLoaderReference.class, ReflectionProvider.class}, new Object[]{
-                mapper, converterLookup, converterLookup, classLoaderReference,
+                mapper, converterRegistry, converterLookup, classLoaderReference,
                 reflectionProvider});
         }
         mapper = wrapMapper((MapperWrapper)mapper);

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


--- branches/v-1.4.x/xstream-distribution/src/content/changes.html	2013-12-27 18:40:40 UTC (rev 2204)
+++ branches/v-1.4.x/xstream-distribution/src/content/changes.html	2013-12-27 18:42:46 UTC (rev 2205)
@@ -36,6 +36,8 @@
     
     <ul>
    		<li>java.bean.EventHandler no longer handled automatically because of severe security vulnerability.</li>
+   		<li>Fix instantiation of AnnotationMapper that requires ConverterLookup and ConverterRegistry to be the same
+   		instance.</li>
     </ul>
 
     <h2>Minor changes</h2>
@@ -44,6 +46,7 @@
    		<li>XSTR-749: NPE if ReflectionConverter.canConvert(type) is called with null as argument.</li>
    		<li>Add constructor to ReflectionConverter taking an additional type to create an instance that is
    		dedicated to a specific type only.</li>
+   		<li>The ConverterLookup used by default cannot be casted to a ConverterRegistry anymore.</li>
     </ul>
 
     <h2>API changes</h2>

To unsubscribe from this list please visit:

http://xircles.codehaus.org/manage_email

Reply via email to