Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[aspectj-users] "can't determine precedence between two or more pieces of advice that apply to the same join point"

 
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Hi.

I am getting a compile error, I cannot quite explain: I always
thought there would be some well-defined behaviour with respect to
advice precedence in any case for one single aspect unit. However,
when I try to compile and weave the following aspect I get the error
stated above.

- ------------

public aspect TestAspect {

    before(): call(* Test.baz()) {
        System.out.println("before 1");
    }
    
    after(): call(* Test.baz()) {
        System.out.println("after 1");
    }
    
    before(): call(* Test.baz()) {
        System.out.println("before 2");
    }

}

- ------------

Interestingly, when I comment out one of the last two pieces of
advice, this gives me no error. So why am I getting this error? Why
does the rule "advice executed in lexical order" not apply? Is this
intended behavior? And most importantly: What could be an easy
workaround?

Eric

- --
Eric Bodden
RWTH Aachen University
ICQ UIN: 12656220, Skype: ericbodden, PGP: BB465582
Website: http://www.bodden.de

-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3

iQA/AwUBQnx+RMwiFCm7RlWCEQLt6gCg1YbeFJKzRiyWl87O3LvuJTetg6EAoN2F
Oh6DzwXwDn3NPn8izGra/2Dd
=rI2R
-----END PGP SIGNATURE-----




Back to the top