[
https://issues.apache.org/jira/browse/CXF-7585?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16283729#comment-16283729
]
ASF GitHub Bot commented on CXF-7585:
-------------------------------------
gebhardt opened a new pull request #355: [CXF-7585] Close InputStream in
AttachmentSerializer when base64 encoding is used
URL: https://github.com/apache/cxf/pull/355
Here is a propsed fix for the bug that closes the `InputStream` after it has
been encoded an written to the `OutputSteam`.
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
> base64 attachment encoding does not close the inputSteam
> --------------------------------------------------------
>
> Key: CXF-7585
> URL: https://issues.apache.org/jira/browse/CXF-7585
> Project: CXF
> Issue Type: Bug
> Components: Core
> Affects Versions: 3.1.14, 3.2.1
> Reporter: Joern Gebhardt
>
> The {{AttachmentSerializer}} class gets in the {{writeAttachments()}} and
> {{InputStream}} from the {{DataHandler}} and calls the {{encodeBase64(..)}}
> method.
> However, it does not close the InputStream.
> Instead a try-with-resource approach should be used here
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)