You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@camel.apache.org by "James Netherton (JIRA)" <ji...@apache.org> on 2018/02/26 16:35:00 UTC

[jira] [Created] (CAMEL-12293) Avoid KeyAlreadyExistsException in ManagedTypeConverterRegistry.listTypeConverters()

James Netherton created CAMEL-12293:
---------------------------------------

             Summary: Avoid KeyAlreadyExistsException in ManagedTypeConverterRegistry.listTypeConverters()
                 Key: CAMEL-12293
                 URL: https://issues.apache.org/jira/browse/CAMEL-12293
             Project: Camel
          Issue Type: Improvement
          Components: camel-core
            Reporter: James Netherton


There is a JMX operation on the TypeConverterRegisty to fetch a list of converters.

 

The TabularData object that's returned is keyed on the 'from' type name and 'to' type name. This mostly works ok. But you could have multiple converters which handle the same 'from' and 'to' types. In this case a KeyAlreadyExistsException exception is thrown when adding CompositeData to TabularData.

 

We could avoid this by using a simple 'index' field in the CompositeData ,which could just be a simple number we increment each time around the type converter list loop.

 



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