aboutsummaryrefslogtreecommitdiffstats
path: root/src/testcases/org/apache/poi/hpsf
diff options
context:
space:
mode:
authorYegor Kozlov <yegor@apache.org>2010-01-14 19:23:13 +0000
committerYegor Kozlov <yegor@apache.org>2010-01-14 19:23:13 +0000
commit5bb2570155bb38bd8434d0e1769714cf473fa853 (patch)
tree97f5cad2b4856898e883fcbd7e3c65ccc652ce8b /src/testcases/org/apache/poi/hpsf
parent2956525db2196e355196e02f85fae24e3bd50f2a (diff)
downloadpoi-5bb2570155bb38bd8434d0e1769714cf473fa853.tar.gz
poi-5bb2570155bb38bd8434d0e1769714cf473fa853.zip
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
Diffstat (limited to 'src/testcases/org/apache/poi/hpsf')
-rw-r--r--src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java b/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java
index 8c95fdb7bf..049f98d567 100644
--- a/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java
+++ b/src/testcases/org/apache/poi/hpsf/basic/TestWriteWellKnown.java
@@ -54,6 +54,7 @@ import org.apache.poi.poifs.filesystem.DocumentEntry;
import org.apache.poi.poifs.filesystem.DocumentInputStream;
import org.apache.poi.poifs.filesystem.POIFSFileSystem;
import org.apache.poi.POIDataSamples;
+import org.apache.poi.util.TempFile;
/**
* <p>Tests 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 <em>doc2</em>
* 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 {
/*
* <li><p>Write the POI filesystem to a (temporary) file <em>doc3</em>
* 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);