Project: AspectJ
Bug 122742 [@AspectJ] VerifyError with @AfterThrowing/@AfterReturning and extra JoinPoint argument
Reported: 2006-01-05 06:31:44 | Status: resolved fixed

If an @AspectJ aspect advises itself using after throwing advice that itself throws an exception running the resulting program causes a VerifyError: java.lang.VerifyError: (class: A, method: stop signature: ()V) catch_type not a subclass of Throwable at java.lang.Class.getDeclaredMethods0(Native Method) at java.lang.Class.privateGetDeclaredMethods(Class.java:2365) at java.lang.Class.getMethod0(Class.java:2611) at java.lang.Class.getMethod(Class.java:1579) at org.aspectj.tools.ajc.AjcTestCase.run(AjcTestCase.java:608) at org.aspectj.testing.RunSpec.execute(RunSpec.java:56) at org.aspectj.testing.AjcTest.runTest(AjcTest.java:68) at org.aspectj.testing.XMLBasedAjcTestCase.runTest(XMLBasedAjcTestCase.java:111) at org.aspectj.systemtest.ajc150.Ajc150Tests.testError(Ajc150Tests.java:877) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:585) at junit.framework.TestCase.runTest(TestCase.java:154) at junit.framework.TestCase.runBare(TestCase.java:127) at junit.framework.TestResult$1.protect(TestResult.java:106) at junit.framework.TestResult.runProtected(TestResult.java:124) at junit.framework.TestResult.run(TestResult.java:109) at junit.framework.TestCase.run(TestCase.java:118) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.runTests(RemoteTestRunner.java:478) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.run(RemoteTestRunner.java:344) at org.eclipse.jdt.internal.junit.runner.RemoteTestRunner.main(RemoteTestRunner.java:196)

Files changed in fix:
tests/bugs151/pr122742/AfterReturningTest.java tests/bugs151/pr122742/AfterThrowingTest.java tests/src/org/aspectj/systemtest/ajc151/Ajc151Tests.java weaver/src/org/aspectj/weaver/Advice.java