Avoid potential NPE

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

Branch: refs/heads/camel-2.10.x
Commit: 70ef7024a5f99637fc0c282500b1a044fa1a731b
Parents: 0033647
Author: Claus Ibsen <davscl...@apache.org>
Authored: Sat May 25 08:35:16 2013 +0200
Committer: Claus Ibsen <davscl...@apache.org>
Committed: Sat May 25 08:36:25 2013 +0200

----------------------------------------------------------------------
 .../apache/camel/util/IntrospectionSupport.java    |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/70ef7024/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
----------------------------------------------------------------------
diff --git 
a/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java 
b/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
index 460e1a5..f5c8a44 100755
--- a/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
+++ b/camel-core/src/main/java/org/apache/camel/util/IntrospectionSupport.java
@@ -427,7 +427,7 @@ public final class IntrospectionSupport {
             // we did not find a setter method to use, and if we did try to 
use a type converter then throw
             // this kind of exception as the caused by will hint this error
             throw new IllegalArgumentException("Could not find a suitable 
setter for property: " + name
-                    + " as there isn't a setter method with same type: " + 
value.getClass().getCanonicalName()
+                    + " as there isn't a setter method with same type: " + 
(value != null ? value.getClass().getCanonicalName() : "[null]")
                     + " nor type conversion possible: " + 
typeConversionFailed.getMessage());
         } else {
             return false;

Reply via email to