author | shade |
Tue, 02 Feb 2016 18:15:15 +0300 | |
changeset 35639 | f34e7e8b4eac |
parent 27851 | 5f28577d20f6 |
permissions | -rw-r--r-- |
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 |
} |