This is an automated email from the ASF dual-hosted git repository. acosentino pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/master by this push: new 3aa8ee8 close ResponseInputStream when not included (#4209) 3aa8ee8 is described below commit 3aa8ee8f7a2367f5c7a86b2c9c98743c03ad8680 Author: Filipe Portes <omeuefil...@gmail.com> AuthorDate: Sun Sep 13 20:28:19 2020 +0200 close ResponseInputStream when not included (#4209) --- .../java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java index b044d73..a54e69c 100644 --- a/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java +++ b/components/camel-aws2-s3/src/main/java/org/apache/camel/component/aws2/s3/AWS2S3Consumer.java @@ -189,6 +189,12 @@ public class AWS2S3Consumer extends ScheduledBatchPollingConsumer { s3Objects.add(s3Object); Exchange exchange = getEndpoint().createExchange(s3Object, s3ObjectSummary.key()); answer.add(exchange); + } else { + /** + * If includeFolders != true and the object is not included, it is safe to close the object here. + * If includeFolders == true, the exchage will close the object. + */ + IOHelper.close(s3Object); } } } catch (Throwable e) {