camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject svn commit: r764710 - /camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
Date Tue, 14 Apr 2009 08:35:34 GMT
Author: davsclaus
Date: Tue Apr 14 08:35:33 2009
New Revision: 764710

URL: http://svn.apache.org/viewvc?rev=764710&view=rev
Log:
Fixed potential ArrayIndexOutOfBounds reported by team city on a windows box.

Modified:
    camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java

Modified: camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
URL: http://svn.apache.org/viewvc/camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java?rev=764710&r1=764709&r2=764710&view=diff
==============================================================================
--- camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
(original)
+++ camel/branches/camel-1.x/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/FtpConsumer.java
Tue Apr 14 08:35:33 2009
@@ -109,7 +109,9 @@
                 }
                 // list the files in the fold and poll the first file
                 final FTPFile[] files = client.listFiles(fileName.substring(index + 1));
-                pollFile(files[0]);
+                if (files != null && files.length > 0) {
+                    pollFile(files[0]);
+                }
             }
 
             lastPollTime = System.currentTimeMillis();



Mime
View raw message