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

classic Classic list List threaded Threaded
1 message Options
Reply | Threaded
Open this post in threaded view
|

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

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

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


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

commit 442e8eb22994e179dc4f7c392c1ffc6f375a37ce
Author: Freeman Fang <[hidden email]>
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)
    (cherry picked from commit 07a2e125f2744731aee8d86da28be241f7c71b2b)
    (cherry picked from commit 5f8f8541685d8286206addafaa91996145a3a876)
---
 .../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);
     }