This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push:
new 840f1eb Fixed CS for Camel-CXF
840f1eb is described below
commit 840f1eb9deeb767bb59910b9a4c077a1d4cbd849
Author: Andrea Cosentino <[email protected]>
AuthorDate: Mon Jan 28 15:46:18 2019 +0100
Fixed CS for Camel-CXF
---
.../component/cxf/converter/CachedCxfPayload.java | 22 +++++++++++-----------
.../component/cxf/util/CxfUtilsTestHelper.java | 2 +-
2 files changed, 12 insertions(+), 12 deletions(-)
diff --git
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
index 650632c..16b6ee2 100644
---
a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
+++
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/converter/CachedCxfPayload.java
@@ -102,6 +102,17 @@ public class CachedCxfPayload<T> extends CxfPayload<T>
implements StreamCache {
}
}
+ private CachedCxfPayload(CachedCxfPayload<T> orig, Exchange exchange)
throws IOException {
+ super(orig.getHeaders(), new ArrayList<>(orig.getBodySources()),
orig.getNsMap());
+ ListIterator<Source> li = getBodySources().listIterator();
+ while (li.hasNext()) {
+ Source source = li.next();
+ if (source instanceof StreamCache) {
+ li.set((Source) (((StreamCache) source)).copy(exchange));
+ }
+ }
+ }
+
private static void toResult(Source source, Result result) throws
TransformerException {
if (source != null) {
XMLConverterHelper xml = new XMLConverterHelper();
@@ -124,17 +135,6 @@ public class CachedCxfPayload<T> extends CxfPayload<T>
implements StreamCache {
}
}
- private CachedCxfPayload(CachedCxfPayload<T> orig, Exchange exchange)
throws IOException {
- super(orig.getHeaders(), new ArrayList<>(orig.getBodySources()),
orig.getNsMap());
- ListIterator<Source> li = getBodySources().listIterator();
- while (li.hasNext()) {
- Source source = li.next();
- if (source instanceof StreamCache) {
- li.set((Source) (((StreamCache) source)).copy(exchange));
- }
- }
- }
-
@Override
public void reset() {
for (Source source : getBodySources()) {
diff --git
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfUtilsTestHelper.java
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfUtilsTestHelper.java
index 03c87fc..5bc0649 100644
---
a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfUtilsTestHelper.java
+++
b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/util/CxfUtilsTestHelper.java
@@ -34,7 +34,7 @@ import org.apache.cxf.message.Message;
import org.apache.cxf.staxutils.StaxUtils;
import org.apache.cxf.staxutils.W3CDOMStreamWriter;
-public class CxfUtilsTestHelper {
+public final class CxfUtilsTestHelper {
private CxfUtilsTestHelper() {
// helper class