aboutsummaryrefslogtreecommitdiffstats
path: root/poi-examples
diff options
context:
space:
mode:
authorPJ Fanning <fanningpj@apache.org>2022-01-27 00:32:01 +0000
committerPJ Fanning <fanningpj@apache.org>2022-01-27 00:32:01 +0000
commit7ad12383930f826899d559466f15fa6b49d491bd (patch)
treee546199a75827d8442dbac52a6267ea9e548737a /poi-examples
parent6fac15c3bdc8b2ac7d7316705ef3b8bde02965c0 (diff)
downloadpoi-7ad12383930f826899d559466f15fa6b49d491bd.tar.gz
poi-7ad12383930f826899d559466f15fa6b49d491bd.zip
[bug-65849] use Files.createTempFile
git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897524 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'poi-examples')
-rw-r--r--poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java4
1 files changed, 2 insertions, 2 deletions
diff --git a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java
index 1bb8409369..f73e25a2c2 100644
--- a/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java
+++ b/poi-examples/src/main/java/org/apache/poi/examples/xssf/usermodel/BigGridDemo.java
@@ -25,7 +25,6 @@ import java.io.InputStream;
import java.io.OutputStream;
import java.io.OutputStreamWriter;
import java.io.Writer;
-import java.nio.file.Files;
import java.util.Calendar;
import java.util.Enumeration;
import java.util.HashMap;
@@ -44,6 +43,7 @@ import org.apache.poi.ss.usermodel.HorizontalAlignment;
import org.apache.poi.ss.usermodel.IndexedColors;
import org.apache.poi.ss.util.CellReference;
import org.apache.poi.util.LocaleUtil;
+import org.apache.poi.util.TempFile;
import org.apache.poi.xssf.usermodel.XSSFCellStyle;
import org.apache.poi.xssf.usermodel.XSSFDataFormat;
import org.apache.poi.xssf.usermodel.XSSFFont;
@@ -102,7 +102,7 @@ public final class BigGridDemo {
}
//Step 2. Generate XML file.
- tmp = Files.createTempFile("sheet", ".xml").toFile();
+ tmp = TempFile.createTempFile("sheet", ".xml");
try (
FileOutputStream stream = new FileOutputStream(tmp);
Writer fw = new OutputStreamWriter(stream, XML_ENCODING)