[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
Re: [aspectj-users] Aspect instance on JDK 1.5 annotation
|
Hi,
Well, having just done some testing, I think this
even simpler case shows
within() is not behaving correctly for annotations:
@Entity
public class myClass1 {...}
public class myClass2 {...}
public aspect myAspect {
before():call(* *(..)) && within(@Entity
*) {
}
}
The pointcut matches all the method calls in myClass1
and myClass2
(effectively it is parsing but then ignoring the annotation
specified
in the within()).
So, what you want to do is valid but AspectJ is misbehaving
- you get a
stack overflow because the perthis() clause is also
matching on your aspect
type when obviously that doesnt have the annotation
and shouldnt be matched.
I've raised bug 81863 to track this.
Andy.
---
Andy Clement
AspectJ Development
Rifflard Mickaël <Mickael.Rifflard@xxxxxxxxxxxxxx>
Sent by: aspectj-users-admin@xxxxxxxxxxx
22/12/2004 16:56
Please respond to
aspectj-users@xxxxxxxxxxx |
|
To
| <aspectj-users@xxxxxxxxxxx>
|
cc
|
|
Subject
| [aspectj-users] Aspect instance on JDK
1.5 annotation |
|
Hi all,
I'm currently trying to get an aspect instance
for an object instance with specific JDK 1.5 annotation.
Exemple :
Create
an aspect instance for all object like that :
@Entity
public class
myClass { ... }
I try
public
aspect myAspect perthis(within(@Entity *)) {...}
but this aspect execution lead to a
java.lang.StackOverflowError
exception.
Is it possible ?
Thanks.
Mickaël
_______________________________________________ aspectj-users
mailing list aspectj-users@xxxxxxxxxxx http://dev.eclipse.org/mailman/listinfo/aspectj-users