author | akulyakh |
Thu, 21 May 2015 11:41:04 -0700 | |
changeset 30730 | d3ce7619db2c |
parent 21015 | f3bec12a63e7 |
child 36526 | 3b41f1c69604 |
permissions | -rw-r--r-- |
21015
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
1 |
/* |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
2 |
* @test /nodynamiccopyright/ |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
3 |
* @bug 6278240 |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
4 |
* @summary Ensure AnnotationTypeMismatchException is thrown when appropriate |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
5 |
* with reasonable foundType filled. |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
6 |
* @library /tools/javac/lib |
30730
d3ce7619db2c
8076543: Add @modules as needed to the langtools tests
akulyakh
parents:
21015
diff
changeset
|
7 |
* @modules jdk.compiler/com.sun.tools.javac.util |
21015
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
8 |
* @build JavacTestingAbstractProcessor Processor |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
9 |
* @compile/fail/ref=Source.out -XDrawDiagnostics -processor Processor Source.java |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
10 |
*/ |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
11 |
|
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
12 |
@Gen(fileName="Generated", |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
13 |
content= |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
14 |
"class Generated {\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
15 |
" @Check(classValue=String.class,\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
16 |
" intConstValue=false,\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
17 |
" enumValue=\"a\",\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
18 |
" incorrectAnnotationValue=@Deprecated,\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
19 |
" incorrectArrayValue={1, \"a\"},\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
20 |
" incorrectClassValue=get())\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
21 |
" public static Class<?> get() {\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
22 |
" return null;\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
23 |
" }\n" + |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
24 |
"}\n") |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
25 |
class Source { |
f3bec12a63e7
6278240: Exception from AnnotationValue.getValue() should list the found type not the required type
jlahoda
parents:
diff
changeset
|
26 |
} |