8194968: problem list actions for tools/javac/jvm/VerboseOutTest

Reviewed-by: vromero
This commit is contained in:
Jonathan Gibbons 2018-05-03 12:56:53 -07:00
parent 986a178214
commit cf20cdd06c
3 changed files with 6 additions and 6 deletions
src/jdk.compiler/share/classes/com/sun/tools/javac
test/langtools/tools/javac/jvm

@ -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 @@ public class JNIWriter {
try {
write(out, c);
if (verbose)
log.printVerbose("wrote.file", outFile);
log.printVerbose("wrote.file", outFile.getName());
out.close();
out = null;
} finally {

@ -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 @@ public class JavaCompiler {
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;
}

@ -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 @@ public class VerboseOutTest {
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);
}