camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-8095: CaseInsensitiveMap for Camel headers should preserve original key cases in keySet
Date Mon, 01 Dec 2014 09:50:52 GMT
Repository: camel
Updated Branches:
  refs/heads/master 4e1b96052 -> 897a77a90


CAMEL-8095: CaseInsensitiveMap for Camel headers should preserve original key cases in keySet


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

Branch: refs/heads/master
Commit: 897a77a90e9d42d17838bb078e650d1e8efef75d
Parents: 4e1b960
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Mon Dec 1 10:50:43 2014 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Mon Dec 1 10:50:43 2014 +0100

----------------------------------------------------------------------
 .../ws/filter/impl/BasicMessageFilter.java      | 26 +++++++-------------
 .../ws/filter/impl/BasicMessageFilterTest.java  |  2 +-
 2 files changed, 10 insertions(+), 18 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/897a77a9/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilter.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilter.java
b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilter.java
index 9c36284..800fbb0 100644
--- a/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilter.java
+++ b/components/camel-spring-ws/src/main/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilter.java
@@ -36,7 +36,7 @@ import org.springframework.ws.soap.SoapMessage;
  * instance.
  */
 public class BasicMessageFilter implements MessageFilter {
-    private static final String LOWERCASE_BREADCRUMB_ID = "breadcrumbid";
+    private static final String BREADCRUMB_ID = "BreadcrumbId";
 
     @Override
     public void filterProducer(Exchange exchange, WebServiceMessage response) {
@@ -88,14 +88,6 @@ public class BasicMessageFilter implements MessageFilter {
      * key a value with the QName object, it is directly added as a new header
      * element. If it contains only a String value, it is transformed into a
      * header attribute. Following headers are excluded:
-     * {@code LOWERCASE_BREADCRUMB_ID}
-     * 
-     * @see SpringWebserviceConstants.SPRING_WS_SOAP_ACTION, @see
-     *      SpringWebserviceConstants.SPRING_WS_ADDRESSING_ACTION), @see
-     *      SpringWebserviceConstants.SPRING_WS_ENDPOINT_URI This the convinient
-     *      method for overriding.
-     * @param inOrOut
-     * @param soapMessage
      */
     protected void doProcessSoapHeader(Message inOrOut, SoapMessage soapMessage) {
         SoapHeader soapHeader = soapMessage.getSoapHeader();
@@ -104,15 +96,15 @@ public class BasicMessageFilter implements MessageFilter {
 
         HashSet<String> headerKeySet = new HashSet<String>(headers.keySet());
 
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_SOAP_ACTION.toLowerCase());
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ENDPOINT_URI.toLowerCase());
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_ACTION.toLowerCase());
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_PRODUCER_FAULT_TO.toLowerCase());
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_PRODUCER_REPLY_TO.toLowerCase());
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_CONSUMER_FAULT_ACTION.toLowerCase());
-        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_CONSUMER_OUTPUT_ACTION.toLowerCase());
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_SOAP_ACTION);
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ENDPOINT_URI);
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_ACTION);
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_PRODUCER_FAULT_TO);
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_PRODUCER_REPLY_TO);
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_CONSUMER_FAULT_ACTION);
+        headerKeySet.remove(SpringWebserviceConstants.SPRING_WS_ADDRESSING_CONSUMER_OUTPUT_ACTION);
 
-        headerKeySet.remove(LOWERCASE_BREADCRUMB_ID);
+        headerKeySet.remove(BREADCRUMB_ID);
 
         for (String name : headerKeySet) {
             Object value = headers.get(name);

http://git-wip-us.apache.org/repos/asf/camel/blob/897a77a9/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
----------------------------------------------------------------------
diff --git a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
index 072a601..22e88f5 100644
--- a/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
+++ b/components/camel-spring-ws/src/test/java/org/apache/camel/component/spring/ws/filter/impl/BasicMessageFilterTest.java
@@ -92,7 +92,7 @@ public class BasicMessageFilterTest extends ExchangeTestSupport {
         exchange.getOut().getHeaders().put(SpringWebserviceConstants.SPRING_WS_ADDRESSING_CONSUMER_OUTPUT_ACTION,
"mustBeRemoved");
         exchange.getOut().getHeaders().put(SpringWebserviceConstants.SPRING_WS_ENDPOINT_URI,
"mustBeRemoved");
 
-        exchange.getOut().getHeaders().put("breadcrumbId", "mustBeRemoved");
+        exchange.getOut().getHeaders().put("BreadcrumbId", "mustBeRemoved");
 
         filter.filterConsumer(exchange, message);
 


Mime
View raw message