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

33 lines
898 B
Java

/*
* @test /nodynamiccopyright/
* @bug 8202056
* @compile/ref=DeepNestingSuppression.out -XDrawDiagnostics -Xlint:serial DeepNestingSuppression.java
*/
import java.io.Serializable;
/*
* Verify suppressing serial warnings works through several levels of
* nested types.
*/
class DeepNestingSuppression {
@SuppressWarnings("serial")
static class SuppressedOuter {
static class Intermediate {
static class Inner implements Serializable {
// warning for int rather than long svuid
private static final int serialVersionUID = 42;
}
}
}
static class Outer {
static class Intermediate {
static class Inner implements Serializable {
// warning for int rather than long svuid
private static final int serialVersionUID = 42;
}
}
}
}