camel-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From davscl...@apache.org
Subject [1/3] git commit: CAMEL-7451: Fixed potentail NPE in ftp changed read lock.
Date Fri, 23 May 2014 07:04:57 GMT
Repository: camel
Updated Branches:
  refs/heads/camel-2.12.x 6369450f3 -> 291683f16
  refs/heads/camel-2.13.x c4b2c8280 -> b11850e0e
  refs/heads/master 57ba1bdea -> 6a696116c


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/6a696116
Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/6a696116
Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/6a696116

Branch: refs/heads/master
Commit: 6a696116c6102b82eccfb81a65ba85a37a3c0d2e
Parents: 57ba1bd
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:03:47 2014 +0200

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


http://git-wip-us.apache.org/repos/asf/camel/blob/6a696116/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