Summary: | IllegalAccessError | ||||||
---|---|---|---|---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | vipin aravind <vipinarav> | ||||
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> | ||||
Status: | NEW --- | QA Contact: | |||||
Severity: | normal | ||||||
Priority: | P3 | CC: | aclement | ||||
Version: | 1.7.3 | ||||||
Target Milestone: | --- | ||||||
Hardware: | PC | ||||||
OS: | Windows XP | ||||||
Whiteboard: | |||||||
Attachments: |
|
Description
vipin aravind
2014-03-12 23:55:42 EDT
Created attachment 240836 [details]
Test AJ Project
The attached AJ project generates the woven jar.
When I made this synthetic method "public" by decompiling and recompiling the jar, I was able to avoid the IllegalAccessError. I think the quick and safer fix in aspectj would be to make all the synthetic methods "public" # direct methods .method static synthetic $SWITCH_TABLE$com$test2$PolicyProviderConstants$OpenInPolicyValues()[I The simple workaround here is to move the switch statement from the advice into a helper method: Object around()... switch (foo) { ... } } to Object around()... compute() } public void compute() { switch (foo) { ... } } (but it is only a workaround). JDT is building some of the synthetics here, it isn't just AspectJ. Normally an accessor would be generated for a method that needs raised visibility and that doesn't seem to be happening here. Making all synthetics public is probably a step too far. Suggested workaround of moving the body into a seperate helper method works. |