vuln-fix: Temporary File Information Disclosure
@@ -24,12 +24,13 @@ import java.io.BufferedWriter;
import java.io.File;
import java.io.FileWriter;
import java.io.IOException;
+import java.nio.file.Files;
import java.util.concurrent.ExecutionException;
public class RunListTest extends BaseFeatureExtractorTest<Integer>{
@Test
public void testSingleDoc() throws IOException, ExecutionException, InterruptedException {
- File tempFile = File.createTempFile("tempFile", ".txt");
+ File tempFile = Files.createTempFile("tempFile", ".txt").toFile();
tempFile.deleteOnExit();
BufferedWriter writer = new BufferedWriter(new FileWriter("tempFile.txt"));
writer.write("1\tQ0\tdoc0\t1\t3.0\tanserini\n");
