java-topology/test/langtools/tools/javac/T8320144.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

19 lines
640 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8320144
* @summary Compilation crashes when a custom annotation with invalid default value is used
* @compile/fail/ref=T8320144.out -XDrawDiagnostics T8320144.java
*/
import java.lang.annotation.ElementType;
import java.lang.annotation.Retention;
import java.lang.annotation.RetentionPolicy;
import java.lang.annotation.Target;
public class T8320144 {
@Retention(RetentionPolicy.RUNTIME)
@Target({ElementType.TYPE})
public @interface TestAnnotation {
public String[] excludeModules() default new String[0];
public String[] value() default new String[] { 3 };
}
}