ASF Bugzilla – Attachment 27824 Details for
Bug 52062
[PATCH] SXSSF temporary files not deleted on Windows
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
TextfileOutput
patch.txt (text/plain), 2.21 KB, created by
Stefan Helfert
on 2011-10-20 09:34:50 UTC
(
hide
)
Description:
TextfileOutput
Filename:
MIME Type:
Creator:
Stefan Helfert
Created:
2011-10-20 09:34:50 UTC
Size:
2.21 KB
patch
obsolete
>Index: src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java >=================================================================== >--- src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (Revision 1186638) >+++ src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFSheet.java (Arbeitskopie) >@@ -35,6 +35,7 @@ > * Streaming version of XSSFSheet implementing the "BigGridDemo" strategy. > * > * @author Alex Geller, Four J's Development Tools >+ * @author Stefan Helfert > */ > public class SXSSFSheet implements Sheet, Cloneable > { >@@ -1284,7 +1285,7 @@ > > public SheetDataWriter() throws IOException > { >- _fd = File.createTempFile("poi-sxxsf-sheet", ".xml"); >+ _fd = File.createTempFile("poi-sxssf-sheet", ".xml"); > _fd.deleteOnExit(); > _out = new BufferedWriter(new FileWriter(_fd)); > } >Index: src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java >=================================================================== >--- src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java (Revision 1186638) >+++ src/ooxml/java/org/apache/poi/xssf/streaming/SXSSFWorkbook.java (Arbeitskopie) >@@ -47,6 +47,7 @@ > * Streaming version of XSSFWorkbook implementing the "BigGridDemo" strategy. > * > * @author Alex Geller, Four J's Development Tools >+ * @author Stefan Helfert > */ > public class SXSSFWorkbook implements Workbook > { >@@ -208,7 +209,7 @@ > } > is.close(); > } >- >+ zip.close(); //otherwise xlsx temp file cant be deleted > zos.close(); > } > private static void copyStream(InputStream in, OutputStream out) throws IOException { >@@ -316,6 +317,7 @@ > while(((c=inReader.read())!=-1)) > outWriter.write(c); > outWriter.flush(); >+ worksheetData.close();//Otherwise xml-temp file cant be deleted > } > > public XSSFWorkbook getXSSFWorkbook() >@@ -649,7 +651,7 @@ > } > > //Save the template >- File tmplFile = File.createTempFile("poi-sxxsf-template", ".xlsx"); >+ File tmplFile = File.createTempFile("poi-sxssf-template", ".xlsx"); > tmplFile.deleteOnExit(); > FileOutputStream os = new FileOutputStream(tmplFile); > _wb.write(os);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Raw
Actions:
View
Attachments on
bug 52062
:
27823
|
27824
|
27826
|
27828
|
27894