[
https://issues.apache.org/jira/browse/OAK-7031?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16280294#comment-16280294
]
Francesco Mari commented on OAK-7031:
-------------------------------------
I made the spool folder a parameter of {{ResponseDecoder}} at r1817296. This
allows me to use a random folder for each test, thus preventing unwanted
interactions to happen between tests using the same file names. Moreover, I
fixed a genuine bug at r1817297. The {{ResponseDecoder}} opened a
{{FileChannel}} to get the size on disk of the spool file, but never closed it.
This actually leaks a file and explains the error message detected on Windows.
> DeleteOnCloseFileInputStream should properly handle errors when deleting the
> file
> ---------------------------------------------------------------------------------
>
> Key: OAK-7031
> URL: https://issues.apache.org/jira/browse/OAK-7031
> Project: Jackrabbit Oak
> Issue Type: Improvement
> Components: segment-tar
> Reporter: Francesco Mari
> Assignee: Francesco Mari
> Fix For: 1.8, 1.7.13
>
>
> {{DeleteOnCloseFileInputStream}} uses {{File#delete}} to delete the temporary
> file. It would be an improvement to use {{Files#deleteIfExists}}, which would
> provided more detailed reports in case of errors.
--
This message was sent by Atlassian JIRA
(v6.4.14#64029)