test/tools/javac/annotations/repeatingAnnotations/MissingValueMethod.java

Sat, 07 Nov 2020 10:30:02 +0800

author
aoqi
date
Sat, 07 Nov 2020 10:30:02 +0800
changeset 3938
93012e2a5d1d
parent 2525
2eb010b6cb22
permissions
-rw-r--r--

Added tag mips-jdk8u275-b01 for changeset eb6ee6a5f2fe

aoqi@0 1 /**
aoqi@0 2 * @test /nodynamiccopyright/
aoqi@0 3 * @bug 7169362
aoqi@0 4 * @author sogoel
aoqi@0 5 * @summary Missing value() method in ContainerAnnotation
aoqi@0 6 * @compile/fail/ref=MissingValueMethod.out -XDrawDiagnostics MissingValueMethod.java
aoqi@0 7 */
aoqi@0 8
aoqi@0 9 import java.lang.annotation.Repeatable;
aoqi@0 10
aoqi@0 11 @Repeatable(FooContainer.class)
aoqi@0 12 @interface Foo {}
aoqi@0 13
aoqi@0 14 @interface FooContainer{
aoqi@0 15 Foo[] values(); // wrong method name
aoqi@0 16 }
aoqi@0 17
aoqi@0 18 @Foo @Foo
aoqi@0 19 public class MissingValueMethod {}
aoqi@0 20

mercurial