Some Eclipse Foundation services are deprecated, or will be soon. Please ensure you've read this important communication.
Bug 343051 - IllegalAccessError to double nested class
Summary: IllegalAccessError to double nested class
Status: RESOLVED FIXED
Alias: None
Product: AspectJ
Classification: Tools
Component: Runtime (show other bugs)
Version: 1.6.11   Edit
Hardware: Macintosh Mac OS X - Carbon (unsup.)
: P3 normal (vote)
Target Milestone: 1.6.12   Edit
Assignee: aspectj inbox CLA
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-04-16 17:04 EDT by Rob CLA
Modified: 2011-04-26 12:32 EDT (History)
1 user (show)

See Also:


Attachments
Eclipse project (1.39 MB, application/zip)
2011-04-16 17:04 EDT, Rob CLA
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
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!