From 6fac15c3bdc8b2ac7d7316705ef3b8bde02965c0 Mon Sep 17 00:00:00 2001 From: PJ Fanning Date: Thu, 27 Jan 2022 00:16:31 +0000 Subject: [PATCH] [bug-65849] use Files.createTempFile git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897523 13f79535-47bb-0310-9956-ffa450edef68 --- poi/src/test/java/org/apache/poi/util/TestIOUtils.java | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/poi/src/test/java/org/apache/poi/util/TestIOUtils.java b/poi/src/test/java/org/apache/poi/util/TestIOUtils.java index 1ce390f96a..077755c591 100644 --- a/poi/src/test/java/org/apache/poi/util/TestIOUtils.java +++ b/poi/src/test/java/org/apache/poi/util/TestIOUtils.java @@ -37,7 +37,6 @@ import java.io.PushbackInputStream; import java.nio.ByteBuffer; import java.nio.channels.ReadableByteChannel; import java.nio.charset.StandardCharsets; -import java.nio.file.Files; import org.apache.commons.io.output.UnsynchronizedByteArrayOutputStream; import org.apache.poi.EmptyFileException; @@ -182,7 +181,7 @@ final class TestIOUtils { @Test void testCopyToFile() throws IOException { - File dest = Files.createTempFile("poi-ioutils-", "").toFile(); + File dest = TempFile.createTempFile("poi-ioutils-", ""); try { try (InputStream is = new FileInputStream(TMP)) { assertEquals(LENGTH, IOUtils.copy(is, dest));