camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [3/3] git commit: CAMEL-7451: Fixed potentail NPE in ftp changed read lock.
Date Fri, 23 May 2014 07:04:59 GMT
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/291683f1
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/291683f1
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/291683f1

Branch: refs/heads/camel-2.12.x
Commit: 291683f16caba9eebebfafcbbe039db1241554b3
Parents: 6369450
Author: Claus Ibsen <davsclaus@apache.org>
Authored: Fri May 23 09:03:47 2014 +0200
Committer: Claus Ibsen <davsclaus@apache.org>
Committed: Fri May 23 09:04:40 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/camel/blob/291683f1/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();
+                    }
                 }
             }
 


Mime
View raw message