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

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

commit ed0a077c7a86df0bc637d001338e5501ee6eee62
Author: Otavio R. Piske <angusyo...@gmail.com>
AuthorDate: Sun May 26 13:48:27 2024 +0200

    (chores) camel-file: remove redundant variables
    
    Signed-off-by: Otavio R. Piske <angusyo...@gmail.com>
---
 .../java/org/apache/camel/component/file/GenericFileConsumer.java    | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git 
a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
 
b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
index 5ff664d7189..2ffb5adad41 100644
--- 
a/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
+++ 
b/components/camel-file/src/main/java/org/apache/camel/component/file/GenericFileConsumer.java
@@ -182,7 +182,6 @@ public abstract class GenericFileConsumer<T> extends 
ScheduledBatchPollingConsum
         }
 
         // use a queue for the exchanges
-        Deque<Exchange> q = exchanges;
 
         // we are not eager limiting, but we have configured a limit, so cut 
the
         // list of files
@@ -192,7 +191,7 @@ public abstract class GenericFileConsumer<T> extends 
ScheduledBatchPollingConsum
                         maxMessagesPerPoll);
                 // must first remove excessive files from the in progress
                 // repository
-                removeExcessiveInProgressFiles(q, maxMessagesPerPoll);
+                removeExcessiveInProgressFiles(exchanges, maxMessagesPerPoll);
             }
         }
 
@@ -202,7 +201,7 @@ public abstract class GenericFileConsumer<T> extends 
ScheduledBatchPollingConsum
             LOG.debug("Total {} files to consume", total);
         }
 
-        int polledMessages = processBatch(CastUtils.cast(q));
+        int polledMessages = processBatch(CastUtils.cast((Deque<Exchange>) 
exchanges));
 
         postPollCheck(polledMessages);
 

Reply via email to