${file:length} should return 0 instead of null if the file length is 0
----------------------------------------------------------------------

                 Key: CAMEL-3100
                 URL: https://issues.apache.org/activemq/browse/CAMEL-3100
             Project: Apache Camel
          Issue Type: Bug
            Reporter: Willem Jiang
             Fix For: 2.5.0


--- camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java   
(revision 991781)
+++ camel-core/src/main/java/org/apache/camel/component/file/GenericFile.java   
(working copy)
@@ -122,7 +122,8 @@
             message.setHeader("CamelFileRelativePath", getRelativeFilePath());
             message.setHeader(Exchange.FILE_PARENT, getParent());
     
-            if (getFileLength() > 0) {
+            if (getFileLength() >= 0) {
                 message.setHeader("CamelFileLength", getFileLength());
             }
             if (getLastModified() > 0) {


-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to