author | jlahoda |
Fri, 27 Sep 2013 17:28:31 +0200 | |
changeset 20599 | 5201f7144a3c |
child 30730 | d3ce7619db2c |
permissions | -rw-r--r-- |
20599
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
1 |
/** |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
3 |
* @bug 8022765 |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
4 |
* @summary javac should not crash for incorrect attribute values |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
5 |
* @build VerifyAnnotationsAttributed |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
6 |
* @run main VerifyAnnotationsAttributed T8022765.java |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
7 |
* @compile/fail/ref=T8022765.out -XDrawDiagnostics T8022765.java |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
8 |
*/ |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
9 |
@Ann(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
10 |
@Primitive(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
11 |
@Str(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
12 |
@En(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
13 |
@ArrAnn(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
14 |
@ArrPrimitive(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
15 |
@ArrStr(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
16 |
@ArrEn(@Override) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
17 |
class AnnC { } |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
18 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
19 |
class PrimitiveC { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
20 |
private static final int C = 1; |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
21 |
@Ann(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
22 |
@Primitive(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
23 |
@Str(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
24 |
@En(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
25 |
@ArrAnn(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
26 |
@ArrPrimitive(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
27 |
@ArrStr(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
28 |
@ArrEn(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
29 |
class I { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
30 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
31 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
32 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
33 |
class StringC { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
34 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
35 |
private static final String C = ""; |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
36 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
37 |
@Ann(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
38 |
@Primitive(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
39 |
@Str(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
40 |
@En(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
41 |
@ArrAnn(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
42 |
@ArrPrimitive(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
43 |
@ArrStr(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
44 |
@ArrEn(C) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
45 |
class I { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
46 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
47 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
48 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
49 |
@Ann(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
50 |
@Primitive(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
51 |
@Str(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
52 |
@En(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
53 |
@ArrAnn(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
54 |
@ArrPrimitive(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
55 |
@ArrStr(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
56 |
@ArrEn(E.A) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
57 |
class EnC { } |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
58 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
59 |
@Ann({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
60 |
@Primitive({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
61 |
@Str({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
62 |
@En({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
63 |
@ArrAnn({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
64 |
@ArrPrimitive({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
65 |
@ArrStr({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
66 |
@ArrEn({@Override}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
67 |
class ArrAnnC { } |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
68 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
69 |
class ArrPrimitiveC { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
70 |
private static final int C = 1; |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
71 |
@Ann({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
72 |
@Primitive({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
73 |
@Str({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
74 |
@En({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
75 |
@ArrAnn({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
76 |
@ArrPrimitive({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
77 |
@ArrStr({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
78 |
@ArrEn({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
79 |
class I { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
80 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
81 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
82 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
83 |
class ArrStringC { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
84 |
private static final String C = ""; |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
85 |
@Ann({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
86 |
@Primitive({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
87 |
@Str({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
88 |
@En({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
89 |
@ArrAnn({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
90 |
@ArrPrimitive({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
91 |
@ArrStr({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
92 |
@ArrEn({C}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
93 |
class I { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
94 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
95 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
96 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
97 |
@Ann({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
98 |
@Primitive({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
99 |
@Str({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
100 |
@En({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
101 |
@ArrAnn({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
102 |
@ArrPrimitive({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
103 |
@ArrStr({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
104 |
@ArrEn({E.A}) |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
105 |
class ArrEnC { } |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
106 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
107 |
@interface Ann { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
108 |
Override value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
109 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
110 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
111 |
@interface Primitive { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
112 |
int value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
113 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
114 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
115 |
@interface Str { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
116 |
String value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
117 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
118 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
119 |
@interface En { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
120 |
E value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
121 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
122 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
123 |
@interface ArrAnn { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
124 |
Override[] value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
125 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
126 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
127 |
@interface ArrPrimitive { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
128 |
int[] value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
129 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
130 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
131 |
@interface ArrStr { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
132 |
String[] value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
133 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
134 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
135 |
@interface ArrEn { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
136 |
E[] value(); |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
137 |
} |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
138 |
|
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
139 |
enum E { |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
140 |
A; |
5201f7144a3c
8022765: Compiler crashes with exception on wrong usage of an annotation.
jlahoda
parents:
diff
changeset
|
141 |
} |