vilmosnagy commented on a change in pull request #4952:
URL: https://github.com/apache/camel/pull/4952#discussion_r566065169



##########
File path: 
components/camel-aws-s3/src/main/java/org/apache/camel/component/aws/s3/S3Consumer.java
##########
@@ -66,9 +67,12 @@ protected int poll() throws Exception {
 
         String fileName = getConfiguration().getFileName();
         String bucketName = getConfiguration().getBucketName();
+        String doneFileName = getConfiguration().getDoneFileName();
         Queue<Exchange> exchanges;
 
-        if (fileName != null) {
+        if (shouldSkipCauseDoneFileIsConfiguredButMissing(bucketName, 
doneFileName)) {

Review comment:
       What do you think about the following:
   
   ```java
   if (!doneFileCheckPasses(bucketName, doneFileName)) {
   ```
   
   Or I was thinking about something like:
   
   ```java
   if (doneFileCheckPasses(bucketName, doneFileName)) {
       // keep everything that was here beforehand
   } else {
       exchanges = new LinkedList<>();
   }
   ```
   
   
   but that would mean a lot of whitespace changes and I don't want to create 
unnecessary changes.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
[email protected]


Reply via email to