8028389: NullPointerException compiling annotation values that have bodies

Made sure anonymous class declarations inside class- and package-level annotations are properly entered.

Reviewed-by: jfranck
This commit is contained in:
Andreas Lundblad 2014-01-10 12:47:15 +01:00
parent e32b40185e
commit a76d1ab5a2
8 changed files with 85 additions and 6 deletions

View file

@ -0,0 +1,13 @@
/*
* @test /nodynamiccopyright/
* @bug 8028389
* @summary javac should output a proper error message when given something
* like new Object(){} as annotation argument.
*
* @compile/fail/ref=AnonSubclass.out -XDrawDiagnostics AnonSubclass.java
*/
@AnonSubclass(new Object(){})
@interface AnonSubclass {
String value();
}