langtools/test/tools/javac/TryWithResources/T7022711.java
author sogoel
Thu, 05 Jun 2014 10:57:10 -0700
changeset 24797 850ebd4d80a7
parent 8620 0b04e5235f25
child 34565 627464b87753
permissions -rw-r--r--
8044072: Group 2: create .out files for OverrideChecks tests in tools/javac dir Reviewed-by: jjg

/*
 * @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) {
        }
    }
}