[
Date Prev][
Date Next][
Thread Prev][
Thread Next][
Date Index][
Thread Index]
[
List Home]
[aspectj-dev] set-pointcut: exposing previous value
|
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hi.
I have recently come across a strange behaviour (at least I fin dit
strange) of set-pointcuts. When I have a call, that changes a field
value from let's say 0 to 1, the following code will return 1, not 0
as I had expected:
before (int a): set(* *.*) && args(a) {
System.out.println(a);
}
So why is that? I thought the semantics of a "before" advice were
that it matches *before* the execution. Apparently it even does,
cause when I employ reflection, the field value has not yet changed
(still 0). However wouldn't it be more consistent to expose the "old"
value to pieces of before/around advice?
Cheers,
Eric
- --
Eric Bodden
Chair I2 for Programming Languages and Program Analysis
RWTH Aachen University
-----BEGIN PGP SIGNATURE-----
Version: PGP 8.0.3
iQA/AwUBQWTimcwiFCm7RlWCEQJJyQCg3VXx8HauulPxFFi792QBcdf+Ct0AnRfY
k0WQShijZ55ZdexG2N8ZWCPB
=ZP8Q
-----END PGP SIGNATURE-----