[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Previously running program broke with 3.0M8/AJDT 1.1.8
|
Thanks for pointing this out.
I believe this is a bug fix (i.e., the semantics didn't
change, but our implementation is more correct :)
https://bugs.eclipse.org/bugs/show_bug.cgi?id=49295
The bug is mentioned in the porting guide, but not the
issue of losing these join points.
Your code should work if you change it
from: execution(Marker.new(..))
to: execution(Marker+.new(..))
I'll add this to the porting guide.
Wes
mmonteiro@xxxxxxxxxxxxxxxxx wrote:
Today I found out that a program that runned without any problems with
eclipse 2.1/AJDT 1.1.4 broke with eclipse 3.0M8/AJDT 1.1.8.
The cause were pointcuts that targeted constructor executions based on a
marker interface. They worked fine with in the older environment, but
the pointcuts no longer captured the *.new() joinpoints in the new version.
Next follows a simplified example that captures the situation. It runs
fine with eclipse 2.1/AJDT 1.1.4 but throws a RuntimeException with
3.0M8/AJDT 1.1.8.
------------------------------------------------------------------
public class Capsule {
}
------------------------------------------------------------------
import java.util.ArrayList;
public aspect Generic {
private interface Marker {}
private ArrayList Marker._list;
pointcut markerCreation(Marker marker):
execution(Marker.new(..)) && this(marker);
after(Marker marker) returning : markerCreation(marker) {
marker._list = new ArrayList();
}
public int Marker.getSize() {
return this._list.size();
}
declare parents: Capsule implements Marker;
}
------------------------------------------------------------------
public class Run {
public static void main(String[] args) {
Capsule capsule = new Capsule();
System.out.println("Size on creation: " + capsule.getSize());
}
}
------------------------------------------------------------------
Was there any change in the semantics of AspectJ from 1.1 to 1.2?
Miguel J. T. Pessoa Monteiro
Ph.D. student Minho University,Portugal
eMail: mmonteiro@xxxxxxxxxxxx
URL:http://gec.di.uminho.pt/mpm/
_______________________________________________
aspectj-users mailing list
aspectj-users@xxxxxxxxxxx
http://dev.eclipse.org/mailman/listinfo/aspectj-users