mirror of https://github.com/apache/poi.git
[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:
parent
0c6bc4bd0b
commit
6fac15c3bd
|
@ -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));
|
||||
|
|
Loading…
Reference in New Issue