This is an automated email from the ASF dual-hosted git repository.

bvahdat pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/camel.git


The following commit(s) were added to refs/heads/main by this push:
     new c5bbbd5  fix the failing source check validation
c5bbbd5 is described below

commit c5bbbd5b58569fbbd00d2936223f4d52ed23f78d
Author: Babak Vahdat <bvah...@apache.org>
AuthorDate: Sun Jun 20 22:07:17 2021 +0200

    fix the failing source check validation
---
 .../src/main/java/org/apache/camel/component/file/FileEndpoint.java   | 2 +-
 .../component/file/strategy/FileChangedExclusiveReadLockStrategy.java | 4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
 
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
index 3b26bf6..dc51742 100644
--- 
a/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
+++ 
b/components/camel-file/src/main/java/org/apache/camel/component/file/FileEndpoint.java
@@ -175,7 +175,7 @@ public class FileEndpoint extends GenericFileEndpoint<File> 
{
         ObjectHelper.notNull(operations, "operations");
 
         // you cannot use temp file and file exists append
-        if (getFileExist() == GenericFileExist.Append && ((getTempPrefix() != 
null) || (getTempFileName() != null))) {
+        if (getFileExist() == GenericFileExist.Append && (getTempPrefix() != 
null || getTempFileName() != null)) {
             throw new IllegalArgumentException("You cannot set both 
fileExist=Append and tempPrefix/tempFileName options");
         }
 
diff --git 
a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
 
b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
index b04d33a..99e6f2e 100644
--- 
a/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
+++ 
b/components/camel-file/src/main/java/org/apache/camel/component/file/strategy/FileChangedExclusiveReadLockStrategy.java
@@ -87,8 +87,8 @@ public class FileChangedExclusiveReadLockStrategy extends 
MarkerFileExclusiveRea
             LOG.trace("Previous length: {}, new length: {}", length, 
newLength);
             LOG.trace("New older than threshold: {}", newOlderThan);
 
-            if (newLength >= minLength && ((minAge == 0 && newLastModified == 
lastModified && newLength == length)
-                    || (minAge != 0 && newLastModified < newOlderThan))) {
+            if (newLength >= minLength && minAge == 0 && newLastModified == 
lastModified && newLength == length
+                    || minAge != 0 && newLastModified < newOlderThan) {
                 LOG.trace("Read lock acquired.");
                 exclusive = true;
             } else {

Reply via email to