< prev index next >

test/langtools/tools/javac/processing/T6439826.java

Print this page
rev 60625 : 8237041: AssertionError in parsing
Summary: Avoid parser crash for deeply nested classes without closing braces, improve error recovery for classes without an opening brace.
Reviewed-by: TBD

@@ -58,13 +58,12 @@
             task.call();
             String s = out.toString();
             System.err.print(s);
             // Expect the following 2 diagnostics, and no output to log
             //   Foo.java:1: illegal character: \35
-            //   Foo.java:1: reached end of file while parsing
             System.err.println(dl.count + " diagnostics; " + s.length() + " characters");
-            if (dl.count != 2 || s.length() != 0)
+            if (dl.count != 1 || s.length() != 0)
                 throw new AssertionError("unexpected output from compiler");
         }
     }
 
     public boolean process(Set<? extends TypeElement> annotations,
< prev index next >