8159803: Jittester: FileAlreadyExists exception during tests generation
authordpochepk
Thu, 23 Jun 2016 17:39:49 +0300
changeset 39446 690677aa4a48
parent 39445 0ff6e5517504
child 39447 6de9e469842e
8159803: Jittester: FileAlreadyExists exception during tests generation Reviewed-by: iignatyev
hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java
--- a/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java	Thu Jun 23 17:39:06 2016 +0300
+++ b/hotspot/test/testlibrary/jittester/src/jdk/test/lib/jittester/ByteCodeGenerator.java	Thu Jun 23 17:39:49 2016 +0300
@@ -78,7 +78,7 @@
         } 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();