From: Yegor Kozlov Date: Thu, 14 Jan 2010 19:23:13 +0000 (+0000) Subject: avoid creating unnecessary temp files, tighten up usage of temp files in unit tests X-Git-Tag: REL_3_7_BETA1~135 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=5bb2570155bb38bd8434d0e1769714cf473fa853;p=poi.git avoid creating unnecessary temp files, tighten up usage of temp files in unit tests git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@899364 13f79535-47bb-0310-9956-ffa450edef68 --- diff --git a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java index e05e57ec11..20aeadb50f 100644 --- a/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java +++ b/src/ooxml/java/org/apache/poi/xssf/usermodel/XSSFWorkbook.java @@ -266,7 +266,7 @@ public class XSSFWorkbook extends POIXMLDocument implements Workbook, IterableTests HPSF's high-level writing functionality for the well-known property @@ -374,7 +375,7 @@ public class TestWriteWellKnown extends TestCase { /* Write the POI filesystem to a (temporary) file doc2 * and close the latter. */ - final File doc2 = File.createTempFile("POI_HPSF_Test.", ".tmp"); + final File doc2 = TempFile.createTempFile("POI_HPSF_Test.", ".tmp"); doc2.deleteOnExit(); OutputStream out = new FileOutputStream(doc2); poifs.writeFilesystem(out); @@ -503,7 +504,7 @@ public class TestWriteWellKnown extends TestCase { /* *
  • Write the POI filesystem to a (temporary) file doc3 * and close the latter. */ - final File doc3 = File.createTempFile("POI_HPSF_Test.", ".tmp"); + final File doc3 = TempFile.createTempFile("POI_HPSF_Test.", ".tmp"); doc3.deleteOnExit(); out = new FileOutputStream(doc3); poifs.writeFilesystem(out);