You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Jörg Heinicke (JIRA)" <ji...@apache.org> on 2008/05/02 18:30:56 UTC

[jira] Updated: (FILEUPLOAD-155) Fix documentation on resource clean up in conjunction with DiskFileItemFactory

     [ https://issues.apache.org/jira/browse/FILEUPLOAD-155?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Jörg Heinicke updated FILEUPLOAD-155:
-------------------------------------

    Priority: Minor  (was: Major)

> Fix documentation on resource clean up in conjunction with DiskFileItemFactory
> ------------------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-155
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-155
>             Project: Commons FileUpload
>          Issue Type: Improvement
>    Affects Versions: 1.2.1
>            Reporter: Jörg Heinicke
>            Priority: Minor
>
> 1. http://commons.apache.org/fileupload/using.html:
> "return new DiskFileItemFactory(fileCleaningTracker, DiskFileItemFactory.DEFAULT_SIZE_THRESHOLD, repository);"
> DiskFileItemFactory does not have such a constructor.
> 2. http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html
> "When using the DiskFileItemFactory, then you should consider the following: Temporary files are automatically deleted as soon as they are no longer needed. (More precisely, when the corresponding instance of File is garbage collected.) Cleaning up those files is done by an instance of FileCleaningTracker, and an associated thread. In a complex environment, for example in a web application, you should consider terminating this thread, for example, when your web application ends. See the section on "Resource cleanup" in the users guide of commons-fileupload."
> That's at least not precise. By default there is no FileCleaningTracker.
> 3. http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html#getFileCleaningTracker()
> "Returns: An instance of FileCleaningTracker, defaults to FileCleaner.getInstance(). Null, if temporary files aren't tracked."
> There is no default tracker.
> 4. http://commons.apache.org/fileupload/apidocs/org/apache/commons/fileupload/disk/DiskFileItemFactory.html#setFileCleaningTracker(org.apache.commons.io.FileCleaningTracker)
> "Returns the tracker, which is responsible for deleting temporary files."
> Obviously wrong for setter. Copy&Paste error from getter.

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