Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [aspectj-users] Re: [Bug 30439] spurious "circular dependency" error

> Yes, but, the pointcuts do not overlap!

Both pointcuts possibly match the static method-execution join point A.f().  
It is not until runtime that it is determined whether the join point 
is in the control flow of f2() and/or f1(), so the compiler needs to 
order the advice.  (I believe that to implement a join point, the compiler 
must determine a partial order of all possible advice at the join point.)

In your test case, it seems determinable by inspection that the pointcuts
do not pick out the same runtime join point, but it's not determined at
compile-time in the general case.  If it's not determinable in the general
case, it seems wise to always provide the error message.  But even if it
could always be determined at compile-time, I can imagine the control flow 
changing with load-time aspects, so the error would still be warranted.

(Jim? Erik?)

Wes

P.S. -
> [I'm mailing this to aspectj-users because the bugzilla return address
> bounced.  See http://dev.eclipse.org/bugs/show_bug.cgi?id=30439 for
> context.]

I don't think Bugzilla handles email entries; you'll always use the
web interface.

Doug Orleans wrote:
> 
> [I'm mailing this to aspectj-users because the bugzilla return address
> bounced.  See http://dev.eclipse.org/bugs/show_bug.cgi?id=30439 for
> context.]
> 
> Jim Hugunin writes:
>  > The error message needs much work.  It should say something closer to:
>  >   can't determine precedence between two pieces of advice that apply to the
>  > same join point (method-execution(void A.f()))
> 
> Yes, but, the pointcuts do not overlap!
> 
>   pointcut p1(): execution(void f()) && cflow(execution(void f1()));
>   pointcut p2(): execution(void f()) && cflow(execution(void f2()));
> 
> The first only applies to f in the cflow of f1, while the second only
> applies to f in the cflow of f2.  No execution of f is in both cflows:
> 
>   void f1() { f(); }
>   void f2() { f(); }
>   void f() { }
> 
> Or am I missing something?
> 
> --Doug
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> http://dev.eclipse.org/mailman/listinfo/aspectj-users


Back to the top