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

40 lines
826 B
Java

/*
* @test (important: no SCCS keywords to affect offsets in golden file.) /nodynamiccopyright/
* @bug 6304921
* @compile/fail/ref=T6304921.out -XDcompilePolicy=bytodo -XDrawDiagnostics -Xjcov -Xlint:all -Werror T6304921.java
*/
import java.util.ArrayList;
import java.util.List;
class T6304921 {
void m1(int i) {
switch (i) {
case 1:
i++;
// fallthrough
default:
}
try {
i++;
}
finally {
throw new Error();
// finally does not complete normally
}
}
void m2() {
List<Integer> list = new ArrayList();
}
}
class X {
void m1() {
System.orr.println("abc"); // name not found
}
boolean m2() {
return 123 + true; // bad binary expression
}
}