Uploaded image for project: 'Camel'
  1. Camel
  2. CAMEL-16000

Type converter regression in Camel 3.7.0

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Resolved
    • Minor
    • Resolution: Fixed
    • 3.7.0
    • 3.7.1, 3.8.0
    • came-core
    • None
    • Unknown
    • Regression

    Description

      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

      from("timer:foo?repeatCount=1").
      setBody(constant(Map.of("a", "A", "b", "B"))).
      convertBodyTo(Collection.class).
      split(body()).log("${body}");
      

      In 3.6.0 it finds the converter org.apache.camel.converter.CollectionConverter#toSet(java.util.Map<K,V>) but now in 3.7.0 it throws the following exception

      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
      

      Can you have a look? Thank you very much

      Attachments

        Activity

          People

            Unassigned Unassigned
            antoine.dessaigne Antoine DESSAIGNE
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: