-
Bug
-
Resolution: Done
-
Major
-
3.0.9.Final, 3.0.13.Final
-
None
The fix for RESTEASY-1080 introduced another bug. If the DataSourceProvider uses a temporary file and the InputStream returned by getInputStream() is read until the end, any further call to getInputStream() results in a FileNotFoundException.
The SequenceDataSource used in the DataSourceProvider deletes the temporary file when it has been read until the end. When getInputStream() is called after the temporary file has been deleted new FileInputStream(tempFile) in getInputStream() results in a FileNotFoundException.
The javadoc of javax.activation.DataSource.getInputStream() however states:
(http://docs.oracle.com/javase/7/docs/api/javax/activation/DataSource.html#getInputStream())... Note that a new InputStream object must be returned each time this method is called, and the stream must be positioned at the beginning of the data.
- is caused by
-
RESTEASY-1080 DataSourceProvider does not delete the temporary files it creates
- Closed
- is related to
-
JBEAP-1904 DataSourceProvider produces FileNotFoundException upon second call of getInputStream()
- Closed
- relates to
-
RESTEASY-1596 Memory leak do to jdk File.deleteOnExit in DataSourceProvider
- Closed