test/tools/javac/7079713/TestCircularClassfile.java

changeset 1075
a45d78d26450
parent 1072
d0257833498e
child 2525
2eb010b6cb22
equal deleted inserted replaced
1074:04f983e3e825 1075:a45d78d26450
147 ct.generate(); 147 ct.generate();
148 148
149 //step 3: move a classfile from the temp folder to the test subfolder 149 //step 3: move a classfile from the temp folder to the test subfolder
150 File fileToMove = new File(tmpDir, tk.targetClass); 150 File fileToMove = new File(tmpDir, tk.targetClass);
151 File target = new File(destDir, tk.targetClass); 151 File target = new File(destDir, tk.targetClass);
152 target.delete();
152 boolean success = fileToMove.renameTo(target); 153 boolean success = fileToMove.renameTo(target);
153 154
154 if (!success) { 155 if (!success) {
155 throw new AssertionError("error when moving file " + tk.targetClass); 156 throw new AssertionError("error when moving file " + tk.targetClass);
156 } 157 }

mercurial