[
https://issues.apache.org/jira/browse/CXF-6364?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Daniel Kulp resolved CXF-6364.
------------------------------
Resolution: Cannot Reproduce
Fix Version/s: Invalid
Cannot reproduce with current code and logged against an ancient and
unsupported version of CXF.
> Large Temporary Files Aren't Deleted After DataHandler InputStream Close
> ------------------------------------------------------------------------
>
> Key: CXF-6364
> URL: https://issues.apache.org/jira/browse/CXF-6364
> Project: CXF
> Issue Type: Bug
> Affects Versions: 2.3
> Environment: Occurs on Ubuntu and Windows
> Reporter: kyle o
> Fix For: Invalid
>
>
> This appears to be a re-occurrence of CXF-2016
> (https://issues.apache.org/jira/browse/CXF-2106). I'm closing the DataHandler
> InputStream, but the temporary file isn't being deleted.
> Sample code:
> if (null != message.getAttachments()) {
> Collection<Attachment> attachmentCollection = message.getAttachments();
>
> if (attachmentCollection.size() > 0) {
> for (Attachment attachment : attachmentCollection) {
>
> DataHandler handler = attachment.getDataHandler();
>
> if (null != handler.getInputStream()) {
> attachmentMap.put(attachment.getId(),
> Utils.convertStreamToString(handler.getInputStream()));
> }
>
> if(handler != null)
> if(handler.getInputStream() != null)
> handler.getInputStream().close();
>
> }
> }
> }
--
This message was sent by Atlassian JIRA
(v6.3.15#6346)