Author: davsclaus
Date: Sat Aug 23 03:43:34 2008
New Revision: 688292

URL: http://svn.apache.org/viewvc?rev=688292&view=rev
Log:
CAMEL-839: Debug log for no type converter found.

Modified:
    
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java

Modified: 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java
URL: 
http://svn.apache.org/viewvc/activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java?rev=688292&r1=688291&r2=688292&view=diff
==============================================================================
--- 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java
 (original)
+++ 
activemq/camel/trunk/camel-core/src/main/java/org/apache/camel/impl/converter/DefaultTypeConverter.java
 Sat Aug 23 03:43:34 2008
@@ -64,6 +64,11 @@
 
     @SuppressWarnings("unchecked")
     public <T> T convertTo(Class<T> type, Exchange exchange, Object value) {
+        if (LOG.isTraceEnabled()) {
+            LOG.trace("Converting " + (value == null ? "null" : 
value.getClass().getCanonicalName())
+                + " -> " + type.getCanonicalName() + " with value: " + value);
+        }
+
         // same instance type
         if (type.isInstance(value)) {
             return type.cast(value);
@@ -101,8 +106,8 @@
 
         if (LOG.isDebugEnabled()) {
             LOG.debug("Could not find a type converter for converting "
-                + value.getClass().getCanonicalName() + " -> " + 
type.getCanonicalName()
-                + " with value: " + value);
+                + (value == null ? "null" : 
value.getClass().getCanonicalName())
+                + " -> " + type.getCanonicalName() + " with value: " + value);
         }
         return null;
     }


Reply via email to