[
https://issues.apache.org/jira/browse/IO-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Niall Pemberton updated IO-216:
-------------------------------
Attachment: IO-216-deleteQuietly.patch
lockFile.delete() is called three times. Two of those are in the initWriter()
method, trying to clean up when an exception is thrown. I assume you mean by
"report" to throw an exception - but that would *hide* the underlying exception
that is re-thrown later. In fact I think we should use the
FileUtils.deleteQuietly() method here to avoid that (attaching a patch for
that).
The other time is in the close() method. We could throw an exception here, but
I'm not sure about that - since although it is a failure it has done its job.
Anyway, perhaps you could put forward a more concrete proposal about how this
should be resolved.
> LockableFileWriter fails to report lock file deletion failure
> -------------------------------------------------------------
>
> Key: IO-216
> URL: https://issues.apache.org/jira/browse/IO-216
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Reporter: Sebb
> Attachments: IO-216-deleteQuietly.patch
>
>
> LockableFileWriter fails to report lock file deletion failure - it calls
> lockFile.delete() several times but fails to check the return code.
> N.B. IIRC, file.delete() returns false if there was no file to delete, so any
> fix needs to take this into account.
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.