[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-users] AJDT not highlighting pointcuts when working with generic arrays or var-args
|
Hi,
For some reason when I'm editing Java in Eclipse using AJDT some pointcuts involving both generics and arrays or var-args are not being highlighted (either with a little arrow or in the cross-reference view). The advice seems to be woven in correctly however.
The following example illustrates my problem:
public aspect Failing {
pointcut failingPointcut() : execution(* foo*(..));
after() returning() : failingPointcut()
{
System.out.println("hit");
}
}
class X <T extends Object> {
// Pointcut match highlighted
void foo() {}
// Pointcut match highlighted
void foo1(T x) {}
// Pointcut not highlighted
void foo2(T[] x) {}
// Pointcut not highlighted
void foo3(T... x) {}
// Pointcut highlighted
T foo3() { return null; }
// Pointcut highlighted
T[] foo4() { return null; }
public static void main(String[] args) {
X<Object> x = new X<Object>();
x.foo2(null);
}
}
Running this class produces the output:
hit
Am I missing something, or is this a bug?
Eclispe reports my AspectJ envrionment as:
Eclipse AspectJ Development Tools
Version: 2.0.0.e35x-20090624-1600
AspectJ version: 1.6.5.20090618034232
This caught me out for quite a while trying to figure out why my pointcut wasn't being matched...
- Jacob