You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by nf...@apache.org on 2022/10/24 07:24:17 UTC

[camel] 01/01: CAMEL-18608: camel-file - Fix is done file checker

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

nfilotto pushed a commit to branch CAMEL-18608/regression-in-GenericFileEndpoint
in repository https://gitbox.apache.org/repos/asf/camel.git

commit cf71ca26e3641f673dcbe053280292c7c84f8308
Author: Nicolas Filotto <nf...@talend.com>
AuthorDate: Mon Oct 24 09:23:45 2022 +0200

    CAMEL-18608: camel-file - Fix is done file checker
---
 .../java/org/apache/camel/component/file/GenericFileEndpoint.java     | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
index 71f29e59362..6544a266c6f 100644
--- a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
+++ b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileEndpoint.java
@@ -1715,8 +1715,8 @@ public abstract class GenericFileEndpoint<T> extends ScheduledPollEndpoint imple
         }
 
         // the static part of the pattern, is that a prefix or suffix?
-        // its a prefix if ${ start token is not at the start of the pattern
-        boolean prefix = pattern.contains("${");
+        // it is a prefix if ${ start token is not at the start of the pattern
+        boolean prefix = pattern.indexOf("${") > 0; // NOSONAR
 
         // remove dynamic parts of the pattern so we only got the static part
         // left