Uploaded image for project: 'Commons FileUpload'
  1. Commons FileUpload
  2. FILEUPLOAD-189

DiskFileItemFactory use of FileCleaningTracker is documented or coded wrong

VotersWatch issueWatchersLinkCloneUpdate Comment AuthorReplace String in CommentUpdate Comment VisibilityDelete Comments
    XMLWordPrintableJSON

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: 1.2.2
    • Fix Version/s: 1.3
    • Labels:
      None

      Description

      Regarding latest SVN revision:

      The DiskFileItemFactory documents:
      Temporary files are automatically deleted as soon as they are no longer needed. (More precisely, when the corresponding instance of

      {@link java.io.File}

      is garbage collected.)

      But the code in DiskFileItemFactory.createItem() is doing:
      tracker.track(result.getTempFile(), this);

      Which means the file is cleaned when DiskFileItemFactory is garbage collected.

      This error is propably introduced in Rev 578253 when the code was moved from DiskFileItem to DiskFileItemFactory, without changing "this" (which was DiskFileItem) and is not DiskFileItemFactory.

        Attachments

        Issue Links

          Activity

            People

            • Assignee:
              simone.tripodi Simone Tripodi
              Reporter:
              gregork Gregor K

              Dates

              • Created:
                Updated:
                Resolved:

                Time Tracking

                Estimated:
                Original Estimate - 1h
                1h
                Remaining:
                Remaining Estimate - 1h
                1h
                Logged:
                Time Spent - Not Specified
                Not Specified

                  Issue deployment