camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject git commit: CAMEL-6598: Dont add existing bean mapper if we already have it.
Date Thu, 29 Aug 2013 12:40:31 GMT
Updated Branches:
  refs/heads/master c1a520dbe -> 3e0153a01


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/3e0153a0
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/3e0153a0
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/3e0153a0

Branch: refs/heads/master
Commit: 3e0153a012919468eb7266c785c8be4a88dd94e1
Parents: c1a520d
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Thu Aug 29 14:40:21 2013 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Thu Aug 29 14:40:21 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/3e0153a0/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