Fri, 10 Jan 2014 12:47:15 +0100
8028389: NullPointerException compiling annotation values that have bodies
Summary: Made sure anonymous class declarations inside class- and package-level annotations are properly entered.
Reviewed-by: jfranck
1 /*
2 * @test /nodynamiccopyright/
3 * @bug 8028389
4 * @summary javac should output a proper error message when given something
5 * like new Object(){} as annotation argument.
6 *
7 * @compile AnonSubclassOnPkg.java
8 * @compile/fail/ref=package-info.out -XDrawDiagnostics package-info.java
9 */
11 @AnonSubclassOnPkg(new Object(){})
12 package pkg;