You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@commons.apache.org by "Thomas Neidhart (JIRA)" <ji...@apache.org> on 2014/11/11 16:06:34 UTC

[jira] [Resolved] (FILEUPLOAD-234) Bug in docs: tmp file delete conditions in "Resource Cleanup" section of "using.html"

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

Thomas Neidhart resolved FILEUPLOAD-234.
----------------------------------------
       Resolution: Fixed
    Fix Version/s: 1.4

Fixed in r1638131.

Thanks for the report.

> Bug in docs: tmp file delete conditions in "Resource Cleanup" section of "using.html"
> -------------------------------------------------------------------------------------
>
>                 Key: FILEUPLOAD-234
>                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-234
>             Project: Commons FileUpload
>          Issue Type: Bug
>    Affects Versions: 1.3
>            Reporter: Evgeniy Philippov
>            Priority: Minor
>             Fix For: 1.4
>
>
> The guide at http://commons.apache.org/proper/commons-fileupload/using.html incorrectly writes: "Such temporary files are deleted automatically, if they are no longer used (more precisely, if the corresponding instance of java.io.File is garbage collected.".
> (The following affects maven version: http://search.maven.org/#artifactdetails|commons-fileupload|commons-fileupload|1.2.2|jar )
> However, the code for org.apache.commons.io.FileCleaningTracker.Tracker.Tracker(...) passes org.apache.commons.fileupload.disk.DiskFileItemFactory.this specified by org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(String, String, boolean, String) in tracker.track(result.getTempFile(), this), and not java.io.File. I.e. the "using.html" guide must be corrected.
> The correct (fixed) phrasing is: 
> "Such temporary files are deleted automatically, if they are no longer used (more precisely, if the corresponding instance of org.apache.commons.fileupload.disk.DiskFileItemFactory is garbage collected.".
> (The following affects maven version: http://search.maven.org/#artifactdetails|commons-fileupload|commons-fileupload|1.3|jar )
> However, the code for org.apache.commons.io.FileCleaningTracker.Tracker.Tracker(...) passes DiskFileItem.this specified by org.apache.commons.fileupload.disk.DiskFileItemFactory.createItem(String, String, boolean, String) in DiskFileItem result=[...]; [...]; tracker.track(result.getTempFile(), result), and not java.io.File. I.e. the "using.html" guide must be corrected.
> The correct (fixed) phrasing is: 
> "Such temporary files are deleted automatically, if they are no longer used (more precisely, if the corresponding instance of org.apache.commons.fileupload.disk.DiskFileItem is garbage collected.".
> (The following holds for both versions 1.2.2 and 1.3)
> The correct (fixed) phrasing is: 
> "Such temporary files are deleted automatically, if they are no longer used (more precisely, if the corresponding instance of org.apache.commons.fileupload.disk.DiskFileItem (for commons-fileupload v.1.3) and instance of org.apache.commons.fileupload.disk.DiskFileItemFactory (for commons-fileupload v.1.2.2) is garbage collected.".



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)