You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by da...@apache.org on 2014/05/23 09:04:58 UTC

[2/3] git commit: CAMEL-7451: Fixed potentail NPE in ftp changed read lock.

CAMEL-7451: Fixed potentail NPE in ftp changed read lock.


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

Branch: refs/heads/camel-2.13.x
Commit: b11850e0eb050ac4d35eb1351836a4be604f7210
Parents: c4b2c82
Author: Claus Ibsen <da...@apache.org>
Authored: Fri May 23 09:03:47 2014 +0200
Committer: Claus Ibsen <da...@apache.org>
Committed: Fri May 23 09:04:06 2014 +0200

----------------------------------------------------------------------
 .../remote/strategy/FtpChangedExclusiveReadLockStrategy.java     | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/camel/blob/b11850e0/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpChangedExclusiveReadLockStrategy.java
----------------------------------------------------------------------
diff --git a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpChangedExclusiveReadLockStrategy.java b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpChangedExclusiveReadLockStrategy.java
index 5ff78a6..3169f18 100644
--- a/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpChangedExclusiveReadLockStrategy.java
+++ b/components/camel-ftp/src/main/java/org/apache/camel/component/file/remote/strategy/FtpChangedExclusiveReadLockStrategy.java
@@ -80,8 +80,10 @@ public class FtpChangedExclusiveReadLockStrategy implements GenericFileExclusive
             LOG.trace("List files {} found {} files", file.getAbsoluteFilePath(), files.size());
             for (FTPFile f : files) {
                 if (f.getName().equals(file.getFileNameOnly())) {
-                    newLastModified = f.getTimestamp().getTimeInMillis();
                     newLength = f.getSize();
+                    if (f.getTimestamp() != null) {
+                        newLastModified = f.getTimestamp().getTimeInMillis();
+                    }
                 }
             }