7086071: tools/javac/7079713/TestCircularClassfile.java fails on windows
Summary: delete file before renaming another file to it
Reviewed-by: jjg
--- a/langtools/test/tools/javac/7079713/TestCircularClassfile.java Thu Sep 01 09:14:25 2011 -0700
+++ b/langtools/test/tools/javac/7079713/TestCircularClassfile.java Thu Sep 01 14:35:59 2011 -0700
@@ -149,6 +149,7 @@
//step 3: move a classfile from the temp folder to the test subfolder
File fileToMove = new File(tmpDir, tk.targetClass);
File target = new File(destDir, tk.targetClass);
+ target.delete();
boolean success = fileToMove.renameTo(target);
if (!success) {