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

26 lines
815 B
Java

/**
* @test /nodynamiccopyright/
* @bug 8021112
* @summary Verify that \\@SuppressWarnings("unchecked") works correctly for lazy attrib values
* @modules jdk.compiler/com.sun.tools.javac.api
* jdk.compiler/com.sun.tools.javac.code
* jdk.compiler/com.sun.tools.javac.file
* jdk.compiler/com.sun.tools.javac.tree
* @build VerifySuppressWarnings
* @compile/ref=T8021112b.out -XDrawDiagnostics -Xlint:unchecked,deprecation,cast T8021112b.java
* @run main VerifySuppressWarnings T8021112b.java
*/
public class T8021112b {
public static final String D1 = Dep.D;
public static final String D2 = "";
public static final Object[] o = {
new Object() {
Dep d;
}
};
}
@Deprecated class Dep {
public static final String D = T8021112b.D2;
}