Community
Participate
Working Groups
Created attachment 193424 [details] Eclipse project I receive an IllegalAccessError during runtime. The aspect adds a method, which contains an inner-class declaration, to an inner-class. The aspect is made privileged. The error occurs when running class junit.tests.AllTests in JUnit: ......................................... ....E..................................... ........................... Time: 1.015 There was 1 error: 1) testSuccessfulRun(junit.tests.framework.TestImplementorTest)java.lang.IllegalAccessError: tried to access class junit.tests.framework.TestImplementorTest$DoubleTestCase$1 from class junit.kiczales.patternlibrary.TestComposite at junit.kiczales.patternlibrary.TestComposite.ajc$interMethod$junit_kiczales_patternlibrary_TestComposite$junit_tests_framework_TestImplementorTest$DoubleTestCase$run(TestComposite.java:60) at junit.tests.framework.TestImplementorTest$DoubleTestCase.run(TestImplementorTest.java:1) at junit.kiczales.patternlibrary.TestComposite.ajc$interMethodDispatch1$junit_kiczales_patternlibrary_TestComposite$junit_tests_framework_TestImplementorTest$DoubleTestCase$run(TestComposite.java) at junit.tests.framework.TestImplementorTest.testSuccessfulRun(TestImplementorTest.java:50) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at junit.kiczales.patternlibrary.TestComposite.ajc$interMethod$junit_kiczales_patternlibrary_TestComposite$junit_framework_TestCase$run(TestComposite.java:54) at junit.kiczales.patternlibrary.TestComposite.ajc$interMethod$junit_kiczales_patternlibrary_TestComposite$junit_framework_TestSuite$run(TestComposite.java:36) at junit.kiczales.patternlibrary.TestComposite.ajc$interMethod$junit_kiczales_patternlibrary_TestComposite$junit_framework_TestSuite$run(TestComposite.java:36) at junit.kiczales.patternlibrary.TestComposite.ajc$interMethod$junit_kiczales_patternlibrary_TestComposite$junit_framework_TestSuite$run(TestComposite.java:36) at junit.tests.AllTests.main(AllTests.java:13) FAILURES!!! Tests run: 109, Failures: 0, Errors: 1
fixed, thanks for the testcase!