langtools/test/tools/javac/T8181464/LambdaInAnnotationsCausesNPETest3.java
author vromero
Tue, 13 Jun 2017 11:21:09 -0700
changeset 45500 365640343c55
permissions -rw-r--r--
8181464: Invalid lambda in annotation causes NPE in Lint.augment Reviewed-by: mcimadamore
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
45500
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     1
/* @test /nodynamiccopyright/
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     2
 * @bug 8181464
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     3
 * @summary Invalid lambda in annotation causes NPE in Lint.augment
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     4
 * @modules java.compiler
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     5
 *          jdk.compiler
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     6
 * @compile Anno2.java AnnoProcessor.java
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     7
 * @compile/fail/ref=LambdaInAnnotationsCausesNPETest3.out -XDrawDiagnostics -processor AnnoProcessor -proc:only LambdaInAnnotationsCausesNPETest3.java
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     8
 */
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
     9
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
    10
@Anno2(value = LambdaInAnnotationsCausesNPETest3.m(x -> x))
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
    11
class LambdaInAnnotationsCausesNPETest3 {
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
    12
    static String m(Class<?> target) {
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
    13
        return null;
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
    14
    }
365640343c55 8181464: Invalid lambda in annotation causes NPE in Lint.augment
vromero
parents:
diff changeset
    15
}