camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/2] camel git commit: [CAMEL-8635] XStream no longer supports dynamic CL updates
Date Tue, 14 Apr 2015 14:40:45 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.15.x 22766a51c -> 57738f7f1
  refs/heads/master bd3962033 -> 23b975a8f


[CAMEL-8635] XStream no longer supports dynamic CL updates


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/57738f7f
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/57738f7f
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/57738f7f

Branch: refs/heads/camel-2.15.x
Commit: 57738f7f1c075758019acd3d9159a76eed654fac
Parents: 22766a5
Author: Thomas Diesler <thomas.diesler@jboss.com>
Authored: Tue Apr 14 16:35:46 2015 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Apr 14 16:42:38 2015 +0200

----------------------------------------------------------------------
 .../camel/dataformat/xstream/AbstractXStreamWrapper.java       | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/57738f7f/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
----------------------------------------------------------------------
diff --git a/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
b/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
index b4e6423..0f206fc 100644
--- a/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
+++ b/components/camel-xstream/src/main/java/org/apache/camel/dataformat/xstream/AbstractXStreamWrapper.java
@@ -28,6 +28,7 @@ import javax.xml.stream.XMLStreamException;
 
 import com.thoughtworks.xstream.XStream;
 import com.thoughtworks.xstream.converters.Converter;
+import com.thoughtworks.xstream.core.util.CompositeClassLoader;
 import com.thoughtworks.xstream.io.HierarchicalStreamDriver;
 import com.thoughtworks.xstream.io.HierarchicalStreamReader;
 import com.thoughtworks.xstream.io.HierarchicalStreamWriter;
@@ -111,8 +112,9 @@ public abstract class AbstractXStreamWrapper implements DataFormat {
             xstream.setMode(getModeFromString(mode));
         }
 
-        if (classLoader != null) {
-            xstream.setClassLoader(classLoader);
+        ClassLoader xstreamLoader = xstream.getClassLoader();
+        if (classLoader != null && xstreamLoader instanceof CompositeClassLoader)
{
+            ((CompositeClassLoader) xstreamLoader).add(classLoader);
         }
 
         try {


Mime
View raw message