You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Sebb (JIRA)" <ji...@apache.org> on 2010/09/28 16:02:35 UTC
[jira] Reopened: (IO-216) Delete files quietly when an exception is
thrown during initialization
[ https://issues.apache.org/jira/browse/IO-216?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Sebb reopened IO-216:
---------------------
Assignee: (was: Niall Pemberton)
The problem with ignoring the deletion failure is that the stale lock file may be detected until much later when an attempt to lock a file fails unexpectedly.
The exception does give the name of the lockFile, but it could be difficult to determine where it was created, and indeed whether it is still in use.
Not sure how best to solve this.
In the meantime, I propose to update the Javadoc to mention that the lock file could theoretically be left behind after close or on init failure.
> Delete files quietly when an exception is thrown during initialization
> ----------------------------------------------------------------------
>
> Key: IO-216
> URL: https://issues.apache.org/jira/browse/IO-216
> Project: Commons IO
> Issue Type: Bug
> Components: Streams/Writers
> Affects Versions: 1.4
> Reporter: Sebb
> Fix For: 2.0
>
> 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.