2007-12-01 00:00:00 +00:00
|
|
|
/*
|
2014-07-07 19:44:20 +00:00
|
|
|
* @test /nodynamiccopyright/
|
2007-12-01 00:00:00 +00:00
|
|
|
* @bug 5097250 5087624
|
|
|
|
* @summary Finalize methods on enums must be compile time error
|
|
|
|
* @author Peter von der Ah\u00e9
|
2014-07-07 19:44:20 +00:00
|
|
|
* @compile/fail/ref=NoFinal.out -XDrawDiagnostics NoFinal.java
|
2007-12-01 00:00:00 +00:00
|
|
|
*/
|
|
|
|
|
|
|
|
enum NoFinal {
|
|
|
|
A {
|
|
|
|
protected void finalize() {
|
|
|
|
System.err.println("FISK");
|
|
|
|
}
|
|
|
|
};
|
|
|
|
}
|