This is an automated email from the ASF dual-hosted git repository. davsclaus pushed a commit to branch camel-2.21.x in repository https://gitbox.apache.org/repos/asf/camel.git
commit 5b6958ab06422d596b1aa357994184f6f7219851 Author: vgvineet4 <vgvine...@gmail.com> AuthorDate: Sat Dec 22 02:02:33 2018 +0530 add defensive check (#2684) --- .../file/strategy/FileChangedExclusiveReadLockStrategy.java | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java b/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java index e2a274f..9aa7698 100644 --- a/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java +++ b/camel-core/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java @@ -71,6 +71,11 @@ public class FileChangedExclusiveReadLockStrategy extends MarkerFileExclusiveRea } } + if(!target.exists()) { + CamelLogger.log(LOG,readLockLoggingLevel,"File "+target.getName()+" got deleted."); + return false; + } + long newLastModified = target.lastModified(); long newLength = target.length(); long newOlderThan = startTime + watch.taken() - minAge;