8160215: jdk/test/java/io/Reader/ReaderBulkReadContract.java should clean up better
Create temporary files in the test scratch directory instead of in the default temporary file directory. Reviewed-by: lancea, alanb
This commit is contained in:
parent
a7e2ba6615
commit
fadef405a9
@ -148,7 +148,8 @@ public class ReaderBulkReadContract {
|
||||
|
||||
private static File createTempFileWithContents(String contents) {
|
||||
try {
|
||||
File file = File.createTempFile("ReaderContract", "");
|
||||
File testDir = new File(System.getProperty("test.dir", "."));
|
||||
File file = File.createTempFile("ReaderContract", "", testDir);
|
||||
try (FileWriter w = new FileWriter(file)) {
|
||||
w.write(contents);
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user