SerialWarnAnon.java revision 3347:8214105024db
1/* 2 * @test /nodynamiccopyright/ 3 * @bug 7152104 4 * @summary Make sure no warning is emitted for anonymous classes 5 * without serialVersionUID 6 * @compile SerialWarn.java 7 * @compile -Werror -XDrawDiagnostics -Xlint:serial SerialWarnAnon.java 8 */ 9 10class SerialWarnAnon { 11 interface SerialWarnAnonInterface extends java.io.Serializable { } 12 Object m() { 13 return new SerialWarnAnonInterface() { }; 14 } 15} 16