Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.

Bug 343051

Summary: IllegalAccessError to double nested class
Product: [Tools] AspectJ Reporter: Rob <rob>
Component: RuntimeAssignee: aspectj inbox <aspectj-inbox>
Status: RESOLVED FIXED QA Contact:
Severity: normal    
Priority: P3 CC: aclement
Version: 1.6.11   
Target Milestone: 1.6.12   
Hardware: Macintosh   
OS: Mac OS X - Carbon (unsup.)   
Whiteboard:
Attachments:
Description Flags
Eclipse project none

Description Rob CLA 2011-04-16 17:04:20 EDT
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
Comment 1 Andrew Clement CLA 2011-04-26 12:32:11 EDT
fixed, thanks for the testcase!