-
Bug
-
Resolution: Fixed
-
P3
-
5.0-pool
-
b117
Issue | Fix Version | Assignee | Priority | Status | Resolution | Resolved In Build |
---|---|---|---|---|---|---|
JDK-8034697 | 7u65 | Mandy Chung | P3 | Resolved | Fixed | b01 |
JDK-8030149 | 7u60 | Mandy Chung | P3 | Closed | Fixed | b03 |
JDK-8028890 | port-stage-ppc-aix | Mandy Chung | P3 | Resolved | Fixed | master |
class A {
public static void main(String[] args) {
A obj = new B();
obj.finalize();
obj = null;
System.gc();
System.runFinalization();
}
protected void finalize() {
System.out.println("A.finalize");
}
}
class B extends A {
private void fin_lize() {
System.out.println("B.finalize");
}
}
Compile this and patch B.class to replace fin_lize with finalize.
A suggestion from Jeroen Frijters [1] to replace the native finalization implementation with shared secrets in one way for performance improvement that will avoid the expense of native code and will fix this issue since the bytecode behavior is to dispatch to the non-private instance method (i.e. A.finalize).
[1] http://weblog.ikvm.net/PermaLink.aspx?guid=0f35cb7d-e3b3-400b-b829-6c975fa97646
- backported by
-
JDK-8028890 (ref) Private finalize method invoked in preference to protected superclass method
- Resolved
-
JDK-8034697 (ref) Private finalize method invoked in preference to protected superclass method
- Resolved
-
JDK-8030149 (ref) Private finalize method invoked in preference to protected superclass method
- Closed
- relates to
-
JDK-8028069 (ref) Finalizer.c not deleted in the changeset for JDK-8027351
- Closed
-
JDK-8028520 JVM should not throw VerifyError when a private method overrides a final method
- Closed
-
JDK-8028549 Ensure consistent treatment of private/static methods during verification
- Closed
-
JDK-8027270 JNI_GetMethodID fails to find an instance method from the superclass
- Resolved