[ 
https://issues.apache.org/jira/browse/CAMEL-12653?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16545148#comment-16545148
 ] 

ASF GitHub Bot commented on CAMEL-12653:
----------------------------------------

GitHub user ribeaud opened a pull request:

    https://github.com/apache/camel/pull/2429

    [CAMEL-12653] Pass given 'Exchange' to type converter

    See https://issues.apache.org/jira/browse/CAMEL-12653.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/ribeaud/camel feature/CAMEL-12653

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/camel/pull/2429.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 #2429
    
----
commit 04bd0ff6ac4abadcf4d23b7a5307c8ad19c83992
Author: ribeaud <chri@...>
Date:   2018-07-16T12:29:39Z

    [CAMEL-12653] Pass given 'Exchange' to type converter

----


> JaxbDataFormat.unmarshal should use passed Exchange when converting given 
> InputStream into XMLStreamReader
> ----------------------------------------------------------------------------------------------------------
>
>                 Key: CAMEL-12653
>                 URL: https://issues.apache.org/jira/browse/CAMEL-12653
>             Project: Camel
>          Issue Type: Improvement
>          Components: camel-jaxb
>    Affects Versions: 2.21.1
>            Reporter: Christian Ribeaud
>            Priority: Major
>
> From {{JaxbDataFormat.unmarshal}}:
> {code:java}
> ...
> XMLStreamReader xmlReader;
>   if (needFiltering(exchange)) {
>     xmlReader = typeConverter.convertTo(XMLStreamReader.class, 
> createNonXmlFilterReader(exchange, stream));
>   } else {
>     xmlReader = typeConverter.convertTo(XMLStreamReader.class, stream);
>   }
> ...
> {code}
> The passed {{Exchange}} is not used during the {{convertTo}} invocation. Any 
> other invocation in the *JaxbDataFormat* class passes the given {{Exchange}} 
> object.
> Passing the {{Exchange}} object gives a chance to the type converter to 
> configure itself before converting.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

Reply via email to