8349475: Test tools/javac/api/TestJavacTaskWithWarning.java writes files in src dir

Reviewed-by: jlahoda, liach, jpai
This commit is contained in:
Joe Darcy 2025-02-10 18:27:05 +00:00
parent b737f7fb30
commit f11a737707

View File

@ -23,7 +23,7 @@
/*
* @test
* @bug 8348212
* @bug 8348212 8349475
* @summary Ensure the warn() phase executes when the compiler is invoked via the API
* @modules jdk.compiler/com.sun.tools.javac.api
*/
@ -50,7 +50,7 @@ public class TestJavacTaskWithWarning {
public static void warningTest() throws Exception {
// Create a source file that will generate a warning
String srcdir = System.getProperty("test.src");
String srcdir = ".";
File file = new File(srcdir, "GeneratesWarning.java");
try (PrintStream out = new PrintStream(new FileOutputStream(file))) {
out.print(