camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject camel git commit: CAMEL-9710: Avoid NPE as the class is mandatory
Date Tue, 15 Mar 2016 19:55:05 GMT
Repository: camel
Updated Branches:
  refs/heads/master 927bb8a4c -> 337a67564


CAMEL-9710: Avoid NPE as the class is mandatory


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

Branch: refs/heads/master
Commit: 337a6756480354afea7531a1a4216de9d232f211
Parents: 927bb8a
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Tue Mar 15 20:54:57 2016 +0100
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Tue Mar 15 20:54:57 2016 +0100

----------------------------------------------------------------------
 .../main/java/org/apache/camel/component/dozer/CustomMapper.java | 4 ++++
 1 file changed, 4 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/337a6756/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
----------------------------------------------------------------------
diff --git a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
index 5924706..72bc783 100644
--- a/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
+++ b/components/camel-dozer/src/main/java/org/apache/camel/component/dozer/CustomMapper.java
@@ -73,6 +73,10 @@ public class CustomMapper extends BaseConverter {
     }
 
     Object mapCustom(Object source) {
+        if (source == null) {
+            return null;
+        }
+
         // The converter parameter is stored in a thread local variable, so
         // we need to parse the parameter on each invocation
         // ex: custom-converter-param="org.example.MyMapping,map"


Mime
View raw message