diff -r bf9f162c7104 -r 67d6b2df47ba test/tools/javac/TryWithResources/T7022711.java --- /dev/null Thu Jan 01 00:00:00 1970 +0000 +++ b/test/tools/javac/TryWithResources/T7022711.java Mon Feb 28 13:42:24 2011 -0800 @@ -0,0 +1,20 @@ +/* + * @test /nodynamiccopyright/ + * @bug 7022711 + * @summary compiler crash in try-with-resources + * @compile/fail/ref=T7022711.out -XDrawDiagnostics T7022711.java + */ + +import java.io.*; + +class T7022711 { + public static void main (String args[]) throws Exception { + try (DataInputStream is = new DataInputStream(new FileInputStream("x"))) { + while (true) { + is.getChar(); // method not found + } + } catch (EOFException e) { + } + } +} +