Summary: | Internal compiler error when defining a sub-aspect with generics | ||
---|---|---|---|
Product: | [Tools] AspectJ | Reporter: | Eric Tanter <etanter> |
Component: | Compiler | Assignee: | aspectj inbox <aspectj-inbox> |
Status: | RESOLVED FIXED | QA Contact: | |
Severity: | critical | ||
Priority: | P3 | CC: | aclement |
Version: | 1.6.11 | ||
Target Milestone: | 1.6.12 | ||
Hardware: | Macintosh | ||
OS: | Mac OS X - Carbon (unsup.) | ||
Whiteboard: |
Description
Eric Tanter
2011-07-08 11:29:17 EDT
I don't know how to obtain the AspectJ version number, but here is the AJDT version I'm using: AspectJ Development Tools 2.1.2.e36x-20110307-1000 org.eclipse.ajdt.feature.group Ok, I found it: This is AspectJ 1.6.11.RC1 not related to generics, reducing the aspect to this will also fail: public aspect Caching { private Map<Integer,Integer> cache = new HashMap<Integer,Integer>(); Integer around(Integer a): execution(* Fib.calc*(*)) && args(a) { if(cache.containsKey(a)){ System.out.println("Using cached value for: " + a); return cache.get(a); } else { Integer result = proceed(a); cache.put(a, result); return result; } } } It is due to the around advice and the proceed call expecting an Integer but the method returning an int - the boxing conversion isn't setup correctly. I've fixed it. |