You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ff...@apache.org on 2019/05/24 15:25:11 UTC

[camel] branch camel-2.x updated: [CAMEL-13576]avoid adding cxf message context map into camel exchange

This is an automated email from the ASF dual-hosted git repository.

ffang pushed a commit to branch camel-2.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.x by this push:
     new 07a2e12  [CAMEL-13576]avoid adding cxf message context map into camel exchange
07a2e12 is described below

commit 07a2e125f2744731aee8d86da28be241f7c71b2b
Author: Freeman Fang <fr...@gmail.com>
AuthorDate: Fri May 24 11:21:06 2019 -0400

    [CAMEL-13576]avoid adding cxf message context map into camel exchange
    
    (cherry picked from commit ec56002b1a9740cf0422231b21a685c7b12f88c9)
---
 .../main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java   | 1 -
 .../java/org/apache/camel/component/cxf/CxfProducerContextTest.java   | 4 +---
 2 files changed, 1 insertion(+), 4 deletions(-)

diff --git a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
index baaa5ca..4c7aa52 100644
--- a/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
+++ b/components/camel-cxf/src/main/java/org/apache/camel/component/cxf/DefaultCxfBinding.java
@@ -528,7 +528,6 @@ public class DefaultCxfBinding implements CxfBinding, HeaderFilterStrategyAware
             cxfContext.putAll(camelExchange.getProperties());
         }
         
-        camelExchange.setProperty(contextKey, cxfContext);
     }
 
     /**
diff --git a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
index c4a64cb..9c71f45 100644
--- a/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
+++ b/components/camel-cxf/src/test/java/org/apache/camel/component/cxf/CxfProducerContextTest.java
@@ -47,9 +47,7 @@ public class CxfProducerContextTest extends CxfProducerTest {
         // No direct access to native CXF Message but we can verify the 
         // request context from the Camel exchange
         assertNotNull(exchange);
-        Map<String, Object> requestContext = CastUtils.cast((Map<?, ?>)exchange.getProperty(Client.REQUEST_CONTEXT));
-        assertNotNull(requestContext);
-        String actualValue = (String)requestContext.get(TEST_KEY);
+        String actualValue = (String)exchange.getProperties().get(TEST_KEY);
         assertEquals("exchange property should get propagated to the request context", TEST_VALUE, actualValue);
     }