Loading... (original) (raw)
Consider the following case:
class T1 { public void m() {} }
class T2 { public abstract void m(); }
class T3 { public void m() {} }
Call site: T3 { invokevirtual T2.m()V T3 }
NB: class T2 isn't marked as abstract.
VM: AbstractMethodError: p1.T2.m()V
JVMS: T3.m() should be invoked
The following check during method resolution is removed in JVMS-8 [1]:
JVMS-5.4.3.3. Method Resolution
"If method lookup succeeds and the method is abstract, but C is not abstract, method resolution throws an AbstractMethodError."
ILW = HLM = P3
I = H = JVMS-8 violation; severely affects testing of default methods
L = L = javac doesn't generate such bytecode
W = M = add ACC_ABSTRACT to class' attributes