You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "Antoine DESSAIGNE (Jira)" <ji...@apache.org> on 2021/01/05 15:30:00 UTC

[jira] [Updated] (CAMEL-16000) Type converter regression in Camel 3.7.0

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

Antoine DESSAIGNE updated CAMEL-16000:
--------------------------------------
    Component/s: came-core

> Type converter regression in Camel 3.7.0
> ----------------------------------------
>
>                 Key: CAMEL-16000
>                 URL: https://issues.apache.org/jira/browse/CAMEL-16000
>             Project: Camel
>          Issue Type: Bug
>          Components: came-core
>    Affects Versions: 3.7.0
>            Reporter: Antoine DESSAIGNE
>            Priority: Major
>
> Hello,
> When trying to update from 3.6.0 to 3.7.0 we noticed a regression in the type converter system.
> The following route no longer works
> {code}
> from("timer:foo?repeatCount=1").
> setBody(constant(Map.of("a", "A", "b", "B"))).
> convertBodyTo(Collection.class).
> split(body()).log("${body}");
> {code}
> I used to find the converter {{org.apache.camel.converter.CollectionConverter#toSet(java.util.Map<K,V>)}} but now it throws the following exception
> {noformat}
> Caused by: org.apache.camel.NoTypeConversionAvailableException: No type converter available to convert from type: java.util.ImmutableCollections.MapN to the required type: java.util.Collection with value {a=A, b=B}
> 	at org.apache.camel.impl.converter.CoreTypeConverterRegistry.mandatoryConvertTo(CoreTypeConverterRegistry.java:275)
> 	at org.apache.camel.support.MessageSupport.getMandatoryBody(MessageSupport.java:115)
> 	... 11 more
> {noformat}
> Can you have a look? Thank you very much



--
This message was sent by Atlassian Jira
(v8.3.4#803005)