http://abc.comlab.ox.ac.uk/cgi-bin/bugzilla/show_bug.cgi?id=63
Summary: thisJoinPoint should be unique among multiple pieces of
advice
Product: abc
Version: unspecified
Platform: PC
OS/Version: Linux
Status: NEW
Severity: normal
Priority: P2
Component: AspectJ compiler
AssignedTo: abc-bugs@comlab.ox.ac.uk
ReportedBy: Oege.de.Moor@comlab.ox.ac.uk
when multiple pieces of advice refer to thisJoinPoint, and they apply to the
same joinpoint, only one joinpoint instance should be created. Instead abc
creates a new instance for every piece of advice separately. When compiled with
ajc, this piece of code prints no output; with abc, it prints "argh".
This blocks the use of thisJoinPoint in tracematches, which would allow an
interesting way of expressing "matching bracket" conditions.
import org.aspectj.lang.*;
aspect Aspect {
JoinPoint jp;
before() : call(* foo(..)) {
jp = thisJoinPoint;
}
after() : call(* foo(..)) {
if (jp != thisJoinPoint)
System.out.println("argh");
}
}
public class JP {
static void foo() {}
public static void main(String[] args) {
foo();
}
}
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.
Received on Tue Dec 13 15:00:22 2005
This archive was generated by hypermail 2.1.8 : Tue Dec 13 2005 - 21:00:08 GMT