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

davsclaus pushed a commit to branch camel-2.19.x
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/camel-2.19.x by this push:
     new 0665c01  CAMEL-12293: Avoid KeyAlreadyExistsException for 
listTypeConverters JMX operation
0665c01 is described below

commit 0665c01bd821bf8b8436f3bf10a6d6128b953bc9
Author: James Netherton <[email protected]>
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 bbd07f9..6b13c99 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
@@ -110,7 +110,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
[email protected].

Reply via email to