You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Karen Lease (Jira)" <ji...@apache.org> on 2022/06/01 21:32:00 UTC

[jira] [Commented] (CAMEL-18133) Custom TypeConverter not used and BulkTypeConverters used instead

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

Karen Lease commented on CAMEL-18133:
-------------------------------------

[~davsclaus] Unfortunately the failing example is using Spring xml configuration of the context and the override doesn't work when set there (CAMEL-18160).

But in any case, the type converters in the Bulk converter (such as byte array to int) are not registered separately so they are not seen by the check for the existing converter. I'll find some other solution for the failing spring-pulsar example.

> Custom TypeConverter not used and BulkTypeConverters used instead
> -----------------------------------------------------------------
>
>                 Key: CAMEL-18133
>                 URL: https://issues.apache.org/jira/browse/CAMEL-18133
>             Project: Camel
>          Issue Type: Bug
>          Components: camel-core
>    Affects Versions: 3.17.0
>            Reporter: Karen Lease
>            Priority: Minor
>
> A custom TypeConverter "intFromByteArray(byte[] bytes)" is registered in Camel but is not used to convert from the body which contains [0,0,0,22]. Instead CamelBaseBulkConverterLoader is used which tries to convert the byte array to a String and then to an integer, which fails.
> The test case which fails is in [the spring-pulsar example|https://github.com/apache/camel-examples/tree/main/examples/spring-pulsar].



--
This message was sent by Atlassian Jira
(v8.20.7#820007)