[
https://issues.apache.org/jira/browse/CAMEL-10446?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15644192#comment-15644192
]
ASF GitHub Bot commented on CAMEL-10446:
----------------------------------------
GitHub user tadayosi opened a pull request:
https://github.com/apache/camel/pull/1253
CAMEL-10446 - Need to consolidate header mapping logic between Camel and
CXF messages
https://issues.apache.org/jira/browse/CAMEL-10446
My initial attempt for the refactoring: It moves all the header mapping
logic in `DefaultCxfRsBinding` into `CxfHeaderHelper` including the
`camelToCxfHeaderMap` and `cxfToCamelHeaderMap` fields. It also introduces Java
8 API and lambdas so that the code looks clearer. `CxfHeaderHelperTest` is
enhanced as well in order to make sure Camel headers are not tainted with
CXF-specific headers and vice versa.
There is still room for refactoring, however: both `DefaultCxfBinding` and
`DefaultCxfRsBinding` still have a bit of header mapping logic yet! I may
pursue another pull req for the refactoring.
You can merge this pull request into a Git repository by running:
$ git pull https://github.com/tadayosi/camel CAMEL-10446
Alternatively you can review and apply these changes as the patch at:
https://github.com/apache/camel/pull/1253.patch
To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:
This closes #1253
----
commit 6041d9c897d15ee7e820556c6d020c5d306d87eb
Author: Tadayoshi Sato <[email protected]>
Date: 2016-11-07T13:15:20Z
CAMEL-10446 - Need to consolidate header mapping logic between Camel and
CXF messages
----
> Need to consolidate header mapping logic between Camel and CXF messages
> -----------------------------------------------------------------------
>
> Key: CAMEL-10446
> URL: https://issues.apache.org/jira/browse/CAMEL-10446
> Project: Camel
> Issue Type: Bug
> Components: camel-cxf, camel-cxfrs
> Affects Versions: 2.18.0
> Reporter: Tadayoshi Sato
>
> In the current codebase of {{camel-cxf}} and {{camel-cxf-transport}}, the
> header mapping logic between CXF and Camel messages is scattered around
> {{DefaultCxfRsBinding}}, {{CxfHeaderHelper}}, and other classes. It should be
> consolidated into a single place, e.g. {{CxfHeaderHelper}}, as much as
> possible.
> I'd like to call it a "bug" because due to this lack of unified header
> mappings I observe some CXF-specific headers accidentally flow into the Camel
> world and vice versa.
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)