cxf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Daniel Kulp (JIRA)" <j...@apache.org>
Subject [jira] [Resolved] (CXF-6364) Large Temporary Files Aren't Deleted After DataHandler InputStream Close
Date Tue, 28 Mar 2017 17:30:42 GMT

     [ 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)

Mime
View raw message