langtools/test/tools/javac/8062359/UnresolvableClassNPEInAttrTest.java
author shade
Tue, 02 Feb 2016 18:15:15 +0300
changeset 35639 f34e7e8b4eac
parent 27851 5f28577d20f6
permissions -rw-r--r--
8148787: StringConcatFactory exactness check produces bad bytecode when a non-arg concat is requested Reviewed-by: vlivanov, psandoz
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
27851
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     1
/*
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     2
 * @test /nodynamiccopyright/
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     3
 * @bug 8062359
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     4
 * @summary NullPointerException in Attr when type-annotating an anonymous
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     5
 *          inner class in an unresolvable class
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     6
 * @compile/fail/ref=UnresolvableClassNPEInAttrTest.out -XDrawDiagnostics UnresolvableClassNPEInAttrTest.java
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     7
 */
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     8
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
     9
public class UnresolvableClassNPEInAttrTest {
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    10
    public static void main(String[] args) {
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    11
        new Undefined() {
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    12
            void test() {
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    13
                new Object() {};
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    14
            }
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    15
        };
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    16
    }
5f28577d20f6 8062359: javac Attr crashes with NPE in TypeAnnotationsValidator visitNewClass
jfranck
parents:
diff changeset
    17
}