Project: AspectJ
Bug 29662 VerifyError on accessing objects not accessible to the weaver: Incompatible object argument for invokespecial
Reported: 2003-01-16 15:12:47 | Status: resolved fixed

I use aspectj1.1b4 (the version list box did not let me choose, it offered only "unspecified"). Compiling the program below yields a warning that a affected type is not exposed to the weaver. Running it crashes the program with this message: "java.lang.VerifyError: (class: VerifyError, method: finalize signature: ()V) Incompatible object argument for invokespecial" public class VerifyError { public static void main(String args[]) { VerifyError ve = new VerifyError(); } protected void finalize() {} } aspect FinalizeContract { pointcut finalizeCall(Object o): this(Object+) && this(o) && execution(void finalize()); void around(Object o) throws Throwable: finalizeCall(o) { super.finalize(); proceed(o); } }

Files changed in fix:
tests/bugs/AroundAccess.java