You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ja...@apache.org on 2018/02/27 10:36:57 UTC

[camel] branch master updated: CAMEL-12293: Avoid KeyAlreadyExistsException for listTypeConverters JMX operation

This is an automated email from the ASF dual-hosted git repository.

jamesnetherton pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/master by this push:
     new a6e3d4d  CAMEL-12293: Avoid KeyAlreadyExistsException for listTypeConverters JMX operation
a6e3d4d is described below

commit a6e3d4d0ce44ab2f08237a43d8fea6b9720e5dbd
Author: James Netherton <ja...@gmail.com>
AuthorDate: Tue Feb 27 10:35:47 2018 +0000

    CAMEL-12293: Avoid KeyAlreadyExistsException for listTypeConverters JMX operation
---
 .../apache/camel/management/mbean/ManagedTypeConverterRegistry.java   | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
index 23a18df..c5a810e 100644
--- a/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
+++ b/camel-core/src/main/java/org/apache/camel/management/mbean/ManagedTypeConverterRegistry.java
@@ -114,7 +114,9 @@ public class ManagedTypeConverterRegistry extends ManagedService implements Mana
                 String from = entry[0].getCanonicalName();
                 String to = entry[1].getCanonicalName();
                 CompositeData data = new CompositeDataSupport(ct, new String[]{"from", "to"}, new Object[]{from, to});
-                answer.put(data);
+                if (!answer.containsValue(data)) {
+                    answer.put(data);
+                }
             }
             return answer;
         } catch (Exception e) {

-- 
To stop receiving notification emails like this one, please contact
jamesnetherton@apache.org.