[ 
https://issues.apache.org/jira/browse/CXF-4618?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
 ]

Steve Hodecker updated CXF-4618:
--------------------------------

    Attachment: DataSourceProvider.java.patch

Proposed patch attached.
                
> DataSourceProvider is not closing inputstream acquired from DataSource
> ----------------------------------------------------------------------
>
>                 Key: CXF-4618
>                 URL: https://issues.apache.org/jira/browse/CXF-4618
>             Project: CXF
>          Issue Type: Bug
>          Components: JAX-RS
>    Affects Versions: 2.7.0
>         Environment: Windows
>            Reporter: Steve Hodecker
>         Attachments: DataSourceProvider.java.patch
>
>
> When a REST method returns a DataSource, e.g.:
> @GET
> public DataSource getFile() { ...
> ...the CXF JAX-RS framework obtains an inputstream from the datasource but 
> does  close the stream after use.  This is noticeable on windows environments 
> for the case of a provided FileDataSource, since the underlying file cannot 
> be deleted while this file handle remains open.
> I've tracked down the problem to the writeTo() method of 
> org.apache.cxf.jaxrs.provider.DataSourceProvider and will attach a proposed 
> patch.

--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
For more information on JIRA, see: http://www.atlassian.com/software/jira

Reply via email to