Summary: | IllegalAccessError when compiling with ajc | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Clément Denis <clement.denis> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | blocker | ||
Priority: | P2 | CC: | aclement |
Version: | 1.6.6 | ||
Target Milestone: | 1.6.7 | ||
Hardware: | PC | ||
OS: | Windows 7 | ||
Whiteboard: |
Description
Clément Denis
2009-11-24 13:17:46 EST
Wonder if this is JDT compiler bug - if it is, yuck I tried the same thing in Eclipse 3.3 - upon which AspectJ is currently based and it worked. So I then debugged through the code in both eclipses to see where we were patching to break it. The problem is the extra code here in ParameterizedMethodBinding. The four lines indicated below do not exist in the eclipse 3.3 compiler - but is just something we do for AspectJ. public MethodBinding getExactMethod(char[] selector, TypeBinding[] argumentTypes, CompilationUnitScope refScope) { MethodBinding mb = null; mb = getExactMethodBase(selector, argumentTypes, refScope); // rogue four lines if (mb==null) { mb = type.getExactMethod(selector,argumentTypes,refScope); if (mb != null) return new ParameterizedMethodBinding(this,mb); } return mb; } If those 4 are commented out, this error class compiles fine and runs. I believe those 4 lines were a temporary change made when we were first getting to grips with generics to get a particular generics related test to pass. Since then we are doing things more correctly and do not require that change any more, but it has been harmless up to now. Removed it and all 4127 tests pass just fine. testcase and fix committed. |