# HG changeset patch # User bpb # Date 1468282739 25200 # Node ID f774415f91ad1e8415dc9a8288808bacf12439ee # Parent ce8a7a71f56b5d2284e69c4dcdc09e1f929d8c1c 8160215: jdk/test/java/io/Reader/ReaderBulkReadContract.java should clean up better Summary: Create temporary files in the test scratch directory instead of in the default temporary file directory. Reviewed-by: lancea, alanb diff -r ce8a7a71f56b -r f774415f91ad jdk/test/java/io/Reader/ReaderBulkReadContract.java --- a/jdk/test/java/io/Reader/ReaderBulkReadContract.java Mon Jul 11 14:46:21 2016 -0700 +++ b/jdk/test/java/io/Reader/ReaderBulkReadContract.java Mon Jul 11 17:18:59 2016 -0700 @@ -148,7 +148,8 @@ 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); }