You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@camel.apache.org by ac...@apache.org on 2018/05/08 08:47:49 UTC
[camel] branch camel-2.20.x updated: CAMEL-12487: S3Producer must
close the streams it opens
This is an automated email from the ASF dual-hosted git repository.
acosentino pushed a commit to branch camel-2.20.x
in repository https://gitbox.apache.org/repos/asf/camel.git
The following commit(s) were added to refs/heads/camel-2.20.x by this push:
new c0afb55 CAMEL-12487: S3Producer must close the streams it opens
c0afb55 is described below
commit c0afb55dcc575219d6ab816879cbbff23b340a6e
Author: damienb-opt <36...@users.noreply.github.com>
AuthorDate: Tue May 8 10:34:09 2018 +0200
CAMEL-12487: S3Producer must close the streams it opens
See https://issues.apache.org/jira/browse/CAMEL-12487
---
.../main/java/org/apache/camel/component/aws/s3/S3Producer.java | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)
diff --git a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
index c6f7df6..d42c8c5 100644
--- a/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
+++ b/components/camel-aws/src/main/java/org/apache/camel/component/aws/s3/S3Producer.java
@@ -248,10 +248,11 @@ public class S3Producer extends DefaultProducer {
message.setHeader(S3Constants.VERSION_ID, putObjectResult.getVersionId());
}
+ // close streams
+ IOHelper.close(putObjectRequest.getInputStream());
+ IOHelper.close(is);
+
if (getConfiguration().isDeleteAfterWrite() && filePayload != null) {
- // close streams
- IOHelper.close(putObjectRequest.getInputStream());
- IOHelper.close(is);
FileUtil.deleteFile(filePayload);
}
}
--
To stop receiving notification emails like this one, please contact
acosentino@apache.org.