diff --git a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java index fdb3ea5767c..47955692015 100644 --- a/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java +++ b/org.eclipse.jdt.core.tests.compiler/src/org/eclipse/jdt/core/tests/compiler/regression/ResourceLeakTests.java @@ -7280,6 +7280,7 @@ public void testGH2642() { """ import java.io.FileWriter; public class DemoNonCloseableWarning { + Zork err; public static void main(String[] args) throws Exception { try (FileWriter writer = new FileWriter("/dev/null")) { writer.append("\\n"); @@ -7288,7 +7289,14 @@ public static void main(String[] args) throws Exception { } """ }, - "", + """ + ---------- + 1. ERROR in DemoNonCloseableWarning.java (at line 3) + Zork err; + ^^^^ + Zork cannot be resolved to a type + ---------- + """, options); } }