[bug-65849] use Files.createTempFile

git-svn-id: https://svn.apache.org/repos/asf/poi/trunk@1897523 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
PJ Fanning 2022-01-27 00:16:31 +00:00
parent 0c6bc4bd0b
commit 6fac15c3bd
1 changed files with 1 additions and 2 deletions

View File

@ -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));