8159803: Jittester: FileAlreadyExists exception during tests generation

Reviewed-by: iignatyev
This commit is contained in:
Dmitrij Pochepko 2016-06-23 17:39:49 +03:00
parent 7aca8d6fe4
commit 3ad2ec4ed4

View File

@ -78,7 +78,7 @@ class ByteCodeGenerator extends TestsGenerator {
} catch (Throwable t) {
Path errFile = generatorDir.resolve(mainClassName + ".err");
try (PrintWriter pw = new PrintWriter(Files.newOutputStream(errFile,
StandardOpenOption.CREATE_NEW))) {
StandardOpenOption.CREATE, StandardOpenOption.WRITE))) {
t.printStackTrace(pw);
} catch (IOException e) {
t.printStackTrace();