camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ningji...@apache.org
Subject [1/5] git commit: CAMEL-6602 fix the ClassCastException when using cxf FailoverFeature
Date Tue, 06 Aug 2013 11:11:09 GMT
Updated Branches:
  refs/heads/camel-2.11.x ba7dd72bc -> 968ad485a


CAMEL-6602 fix the ClassCastException when using cxf FailoverFeature


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

Branch: refs/heads/camel-2.11.x
Commit: 9f2ca6756aa5251318b2151e76fc74e0b215bc04
Parents: ba7dd72
Author: Willem Jiang <ningjiang@apache.org>
Authored: Tue Aug 6 07:36:17 2013 +0800
Committer: Willem Jiang <ningjiang@apache.org>
Committed: Tue Aug 6 18:59:54 2013 +0800

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/cxf/CxfEndpoint.java    | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/9f2ca675/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
----------------------------------------------------------------------
diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
index 6105269..88cdda6 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/CxfEndpoint.java
@@ -922,7 +922,9 @@ public class CxfEndpoint extends DefaultEndpoint implements HeaderFilterStrategy
                 message.remove(CxfConstants.CAMEL_CXF_ATTACHMENTS);
             }
 
-            if (DataFormat.PAYLOAD == message.get(DataFormat.class)) {
+            // Don't try to reset the parameters if the parameter is not CxfPayload instance
+            // as the setParameter will be called more than once when using the fail over
feature
+            if (DataFormat.PAYLOAD == message.get(DataFormat.class) && params[0]
instanceof CxfPayload) {
 
                 CxfPayload<?> payload = (CxfPayload<?>) params[0];
                 List<Source> elements = payload.getBodySources();


Mime
View raw message