You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Önder Sezgin (JIRA)" <ji...@apache.org> on 2018/07/16 19:45:00 UTC

[jira] [Resolved] (CAMEL-12653) JaxbDataFormat.unmarshal should use passed Exchange when converting given InputStream into XMLStreamReader

     [ https://issues.apache.org/jira/browse/CAMEL-12653?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Önder Sezgin resolved CAMEL-12653.
----------------------------------
    Resolution: Fixed

> 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
>            Assignee: Önder Sezgin
>            Priority: Major
>             Fix For: 2.22.1, 2.23.0, 2.21.3
>
>
> 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)