camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From si...@apache.org
Subject camel git commit: CAMEL-10111: Creating an InputStream from XMLStreamReader fails with ASCII default platform encoding
Date Fri, 01 Jul 2016 09:57:00 GMT
Repository: camel
Updated Branches:
  refs/heads/master f1764ee81 -> 52ad12085


CAMEL-10111: Creating an InputStream from XMLStreamReader fails with ASCII default platform
encoding

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

Branch: refs/heads/master
Commit: 52ad120851c0572c6a4c1a23a89ac40ebda24f52
Parents: f1764ee
Author: Stephan Siano <stephan.siano@sap.com>
Authored: Fri Jul 1 10:56:34 2016 +0200
Committer: Stephan Siano <stephan.siano@sap.com>
Committed: Fri Jul 1 10:56:34 2016 +0200

----------------------------------------------------------------------
 .../camel/converter/jaxp/XMLStreamReaderInputStream.java     | 2 +-
 .../camel/component/cxf/converter/CxfPayloadConverter.java   | 8 ++++----
 2 files changed, 5 insertions(+), 5 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/52ad1208/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
----------------------------------------------------------------------
diff --git a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
index 96783d4..ab8de5c 100644
--- a/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
+++ b/camel-core/src/main/java/org/apache/camel/converter/jaxp/XMLStreamReaderInputStream.java
@@ -45,7 +45,7 @@ class XMLStreamReaderInputStream extends InputStream {
         this.chunk = new TrimmableByteArrayOutputStream();
         this.charset = charset == null ? "utf-8" : charset;
         try {
-            this.writer = outfactory.createXMLStreamWriter(chunk, charset);
+            this.writer = outfactory.createXMLStreamWriter(chunk, this.charset);
         } catch (XMLStreamException e) {
             //ignore
         }

http://git-wip-us.apache.org/repos/asf/camel/blob/52ad1208/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
index 196dbce..1da3fff 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CxfPayloadConverter.java
@@ -202,7 +202,7 @@ public final class CxfPayloadConverter {
                     if (payload.getNsMap() != null) {
                         r = new DelegatingXMLStreamReader(r, payload.getNsMap());
                     }
-                    return (T)tc.convertTo(type, r);
+                    return (T)tc.convertTo(type, exchange, r);
                 }
                 tc = registry.lookup(type, Source.class);
                 if (tc != null) {
@@ -217,12 +217,12 @@ public final class CxfPayloadConverter {
                             s = new StAXSource(new DelegatingXMLStreamReader(r, payload.getNsMap()));
                         }
                     }
-                    return (T)tc.convertTo(type, s);
+                    return (T)tc.convertTo(type, exchange, s);
                 }
             }
             TypeConverter tc = registry.lookup(type, NodeList.class);
             if (tc != null) {
-                Object result = tc.convertTo(type, cxfPayloadToNodeList((CxfPayload<?>)
value, exchange));
+                Object result = tc.convertTo(type, exchange, cxfPayloadToNodeList((CxfPayload<?>)
value, exchange));
                 if (result == null) {
                     // no we could not do it currently, and we just abort the convert here
                     return (T) Void.TYPE;
@@ -237,7 +237,7 @@ public final class CxfPayloadConverter {
             if (tc != null) {
                 NodeList nodeList = cxfPayloadToNodeList((CxfPayload<?>) value, exchange);
                 if (nodeList.getLength() > 0) {
-                    return tc.convertTo(type, nodeList.item(0));
+                    return tc.convertTo(type, exchange, nodeList.item(0));
                 } else {
                     // no we could not do it currently
                     return (T) Void.TYPE;


Mime
View raw message