camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [6/9] git commit: CAMEL-6598: Dont add existing bean mapper if we already have it.
Date Fri, 30 Aug 2013 08:10:51 GMT
CAMEL-6598: Dont add existing bean mapper if we already have it.


Project: http://git-wip-us.apache.org/repos/asf/camel/repo
Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/cb0422b0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/cb0422b0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/cb0422b0

Branch: refs/heads/camel-2.12.x
Commit: cb0422b0996879fde2143723716e026b47b9dc51
Parents: 7faa288
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Aug 29 14:40:21 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri Aug 30 10:10:04 2013 +0200

----------------------------------------------------------------------
 .../apache/camel/converter/dozer/DozerTypeConverterLoader.java    | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/cb0422b0/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
index dc42c94..bb488b0 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/converter/dozer/DozerTypeConverterLoader.java
@@ -112,7 +112,8 @@ public class DozerTypeConverterLoader implements CamelContextAware {
         BeanContainer.getInstance().setClassLoader(adapter);
         
         Map<String, DozerBeanMapper> mappers = lookupDozerBeanMappers();
-        if (mapper != null) {
+        // only add if we do not already have it
+        if (mapper != null && !mappers.containsValue(mapper)) {
             mappers.put("parameter", mapper);
         }
         if (mappers.size() > 1) {


Mime
View raw message