jdk-24/langtools/test/tools/javac/serial/SerialWarnAnon.java
Andreas Lundblad 9691505077 7152104: javac should not warn about missing serialVersionUID for anonymous inner classes
Javac no longer issues warnings for missing serialVersionUID in anonymous classes.

Reviewed-by: jlahoda
2016-04-18 22:25:50 +02:00

16 lines
426 B
Java

/*
* @test /nodynamiccopyright/
* @bug 7152104
* @summary Make sure no warning is emitted for anonymous classes
* without serialVersionUID
* @compile SerialWarn.java
* @compile -Werror -XDrawDiagnostics -Xlint:serial SerialWarnAnon.java
*/
class SerialWarnAnon {
interface SerialWarnAnonInterface extends java.io.Serializable { }
Object m() {
return new SerialWarnAnonInterface() { };
}
}