poi-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject [Bug 53493] New: delete xml's temporary files when write workbook
Date Sun, 01 Jul 2012 15:19:55 GMT
https://issues.apache.org/bugzilla/show_bug.cgi?id=53493

          Priority: P2
            Bug ID: 53493
          Assignee: dev@poi.apache.org
           Summary: delete xml's temporary files when write workbook
          Severity: normal
    Classification: Unclassified
                OS: All
          Reporter: submax@tiscalinet.it
          Hardware: All
            Status: NEW
           Version: 3.8
         Component: SXSSF
           Product: POI

Created attachment 29018
  --> https://issues.apache.org/bugzilla/attachment.cgi?id=29018&action=edit
patch for delete xml's temporary files when write workbook

the xml's temporary files are not deleted when call write method of
SXSSFWorkbook class.

Example:
/var/tmp/poi-sxssf-sheet-xml127328075585779261.gz
or when compress is active:
/var/tmp/poi-sxssf-sheet127328075585779261

In the SXSSF code there is not a part for this purpose.

There is only _fd.deleteOnExit() in SheetDataWriter class, but is not enough if
the program that use POI not exit from jvm and these files remain on file
system.

For confirm this, in the method write in SXSSFWorkbook class, there is already
tmplFile.delete() for another tmp file.

In conclusion in write method missing the delete on xml's temporary files.

I believe the correct solution is to have SXSSF tidy up when it's done with
files, rather than requiring users to do that via explicit temp directory
controls.

I attach a patch for fix this issue. This is very rudimental patch (I don't
know the structure of SXSSF classes), this is an example,  but it works very
well.

-- 
You are receiving this mail because:
You are the assignee for the bug.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@poi.apache.org
For additional commands, e-mail: dev-help@poi.apache.org


Mime
View raw message