jdk-24/test/langtools/tools/javac/annotations/neg/AnnComma.java

23 lines
469 B
Java
Raw Normal View History

2007-12-01 00:00:00 +00:00
/*
* @test /nodynamiccopyright/
2007-12-01 00:00:00 +00:00
* @bug 4973531
* @summary annotation syntax allows extra ',' in parameter list.
* @author gafter
*
* @compile/fail/ref=AnnComma.out -XDrawDiagnostics AnnComma.java
2007-12-01 00:00:00 +00:00
*/
package annComma;
@ann1(isStatic=false,type="class" ,)
class TestM4 {
@ann1(type="class",isStatic=false,) public void myMethod() {
System.out.println(" In side the myMethod");
}
}
@interface ann1 {
String type();
boolean isStatic();
}