langtools/test/tools/javac/6304921/T6304921.java
author ksrini
Thu, 20 Mar 2008 08:44:18 -0700
changeset 323 ba0845d0b4dc
parent 10 06bc494ca11e
child 2984 e15ff3a34054
permissions -rw-r--r--
6618930: (javac) fix test after whitespace normalization Summary: whitespace normalization left the test unusable, back to service Reviewed-by: jjg

/*
 * @test (important: no SCCS keywords to affect offsets in golden file.)  /nodynamiccopyright/
 * @bug 6304921
 * @compile/fail/ref=T6304921.out -XDstdout -XDcompilePolicy=bytodo -XDdiags=%b:%s/%o/%e:%_%t%m|%p%m -Xjcov -Xlint:all,-path -Werror T6304921.java
 */

import java.util.ArrayList;
import java.util.List;

class T6304921 {
    void m1(int i) {
        switch (i) {
        case 1:
            i++;
            // fallthrough
        default:
        }

        try {
            i++;
        }
        finally {
            throw new Error();
            // finally does not complete normally
        }
    }

    void m2() {
        List<Integer> list = new ArrayList();
    }
}

class X {
    void m1() {
        System.orr.println("abc"); // name not found
    }
    boolean m2() {
        return 123 + true; // bad binary expression
    }
}