Skip to content

Commit

Permalink
Better tmp file creation
Browse files Browse the repository at this point in the history
  • Loading branch information
jpsacha committed May 13, 2023
1 parent f8388a0 commit f6b1f5d
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions src/test/java/ij_plugins/imageio/IJImageIOTest.java
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
/*
* IJ-Plugins ImageIO
* Copyright (C) 2002-2021 Jarek Sacha
* Author's email: jpsacha at gmail dot com
* IJ Plugins
* Copyright (C) 2002-2023 Jarek Sacha
* Author's email: jpsacha at gmail.com
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
Expand All @@ -17,7 +17,7 @@
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
*
* Latest release available at https://github.com/ij-plugins/ijp-imageio/
* Latest release available at https://github.com/ij-plugins/ijp-imageio
*/
package ij_plugins.imageio;

Expand All @@ -36,6 +36,7 @@
import javax.imageio.metadata.IIOMetadata;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
import java.util.Arrays;
import java.util.Iterator;
import java.util.List;
Expand Down Expand Up @@ -200,7 +201,7 @@ public void testBug1434311() throws Exception {
writerParam.setCompressionType(compression);
}

final File outFile = File.createTempFile("testBug1434311_", ".tif");
final File outFile = Files.createTempFile("testBug1434311_", ".tif").toFile();
outFile.deleteOnExit();

IJImageIO.write(imp, outFile, writer, metadata, writerParam, true);
Expand Down

0 comments on commit f6b1f5d

Please sign in to comment.