java-topology/test/langtools/tools/javac/annotations/neg/AnnComma.java
russell@unturf.com 0a580b313d undefect. CWE-407 — 63 sites patched across 27 ecosystems
Authors: russell@unturf.com · brackishbert@gmail.com · foxhop.net · TimeHexOn.com

Patches, unit tests, benchmarks, whitepaper, and outreach briefs.
Public domain — no copyright claimed. Use freely.
2026-03-26 17:11:57 -04:00

22 lines
469 B
Java

/*
* @test /nodynamiccopyright/
* @bug 4973531
* @summary annotation syntax allows extra ',' in parameter list.
* @author gafter
*
* @compile/fail/ref=AnnComma.out -XDrawDiagnostics AnnComma.java
*/
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();
}