changeset 50511:2882764cc79c

8194968: problem list actions for tools/javac/jvm/VerboseOutTest Reviewed-by: vromero
author jjg
date Thu, 03 May 2018 12:56:53 -0700
parents b7be5758a838
children 19829b375d08
files src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java test/langtools/tools/javac/jvm/VerboseOutTest.java
diffstat 3 files changed, 6 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java	Thu May 03 12:13:43 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/JNIWriter.java	Thu May 03 12:56:53 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2016, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -190,7 +190,7 @@
         try {
             write(out, c);
             if (verbose)
-                log.printVerbose("wrote.file", outFile);
+                log.printVerbose("wrote.file", outFile.getName());
             out.close();
             out = null;
         } finally {
--- a/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu May 03 12:13:43 2018 -0700
+++ b/src/jdk.compiler/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu May 03 12:56:53 2018 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2017, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 2018, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -784,7 +784,7 @@
             try (BufferedWriter out = new BufferedWriter(outFile.openWriter())) {
                 new Pretty(out, true).printUnit(env.toplevel, cdef);
                 if (verbose)
-                    log.printVerbose("wrote.file", outFile);
+                    log.printVerbose("wrote.file", outFile.getName());
             }
             return outFile;
         }
--- a/test/langtools/tools/javac/jvm/VerboseOutTest.java	Thu May 03 12:13:43 2018 -0700
+++ b/test/langtools/tools/javac/jvm/VerboseOutTest.java	Thu May 03 12:56:53 2018 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8194893
+ * @bug 8194893 8194968
  * @summary javac -verbose prints wrong paths for output files
  * @modules jdk.compiler
  * @run main VerboseOutTest
@@ -56,7 +56,7 @@
         if (rc != 0) {
             throw new Exception("compilation failed: rc=" + rc);
         }
-        String expected = "[wrote ./" + className + ".class]";
+        String expected = "[wrote " + Paths.get(".").resolve(className + ".class") + "]";
         if (!log.contains(expected)) {
             throw new Exception("expected output not found: " + expected);
         }