Author: davsclaus
Date: Thu Aug 19 03:45:59 2010
New Revision: 987008

URL: http://svn.apache.org/viewvc?rev=987008&view=rev
Log:
CAMEL-3060: GenericFileMessage should not output message body in toString in 
case file has a very big body causing memory issues.

Modified:
    
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java

Modified: 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
URL: 
http://svn.apache.org/viewvc/camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java?rev=987008&r1=987007&r2=987008&view=diff
==============================================================================
--- 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
 (original)
+++ 
camel/trunk/camel-core/src/main/java/org/apache/camel/component/file/GenericFileMessage.java
 Thu Aug 19 03:45:59 2010
@@ -51,11 +51,7 @@ public class GenericFileMessage<T> exten
 
     @Override
     public String toString() {
-        Object body = getBody();
-        if (body instanceof GenericFile) {
-            return "GenericFileMessage with file: " + body;
-        } else {
-            return "GenericFileMessage with body: " + body;
-        }
+        // only output the filename as body can be big
+        return file != null ? file.getFileName() : null;
     }
 }


Reply via email to