commons-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Holger Hoffstätte (JIRA) <>
Subject [jira] Commented: (IO-116) Replace static FileCleaner methods
Date Sun, 04 Mar 2007 16:32:50 GMT


Holger Hoffstätte commented on IO-116:

Hi Jochen, this is already much better than what is in the last release but please check out
my suggestion to a similar problem in LANG-324. Your patch still creates the reaper Thread
and it would be IMHO better to let the user/webapp/environment manage the lifecycle of that
Thread, if only to be able to properly interrupt it.
Also instead of using an extra Thread it should be possible to use an injected Timer; deleting
the files is (as far as I understand it?) not a real-time activity since it happens asynchronously
Creating/keeping static Thread references should have never made it into a released commons
API :(

> Replace static FileCleaner methods
> ----------------------------------
>                 Key: IO-116
>                 URL:
>             Project: Commons IO
>          Issue Type: Improvement
>          Components: Utilities
>    Affects Versions: 1.3.1
>            Reporter: Jochen Wiedmann
>            Priority: Critical
>             Fix For: 1.4
>         Attachments: commons-io-filecleaningtracker.patch
> The attached patch aims to finally resolve the problems, which are named in IO-99, FILEUPLOAD-120,
> I choosed a conservative strategy: Basically I copied the FileCleaner class to an instantiable
class FileCleaningTracker with instance methods. The static FileCleaner methods are now implemented
by a static instance of FileCleaningTracker. (The name FileCleaningTracker is, of course,
> The FileCleaningTestCase was also created by simply copying FileCleaner to FileCleaningTestCase.
FileCleanerTestCase is now similarly implemented as a subclass of FileCleanerTestCase which
uses the static instance of FileCleaner rather than a dynamically created instance.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message