commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "loremipsum (JIRA)" <j...@apache.org>
Subject [jira] [Created] (FILEUPLOAD-270) CLONE - Bug in docs: tmp file delete conditions in "Resource Cleanup" section of "using.html"
Date Sun, 27 Dec 2015 23:16:49 GMT
loremipsum created FILEUPLOAD-270:
-------------------------------------

             Summary: CLONE - Bug in docs: tmp file delete conditions in "Resource Cleanup"
section of "using.html"
                 Key: FILEUPLOAD-270
                 URL: https://issues.apache.org/jira/browse/FILEUPLOAD-270
             Project: Commons FileUpload
          Issue Type: Bug
    Affects Versions: 1.3
            Reporter: loremipsum
            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)

Mime
View raw message