set() pointuct and after() returning(Object o)

View: New views
3 Messages — Rating Filter:   Alert me  

set() pointuct and after() returning(Object o)

by Simone Gianni-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi all,
I don't know if this is a bug, or if it's a known or wanted behavior,
but using after() returning(Object o) on a set() pointcut does not weave
it.

Since documentation states that using Object in the returning clause
will match also methods returning void, which it does, I would expect it
to weave correctly also set() pointcuts, which obviously return "void".

A normal after() advice (without the returning clause) will match and
weave correctly, but makes it necessary to write the advice twice if I'm
willing to trace all execution, get() and set() to trace an execution.

This is happening under 1.6.5, both LTW and CTW, both from inside AJDT
and from command line.

Simone

--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/

_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: set() pointuct and after() returning(Object o)

by Andy Clement :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Does seem a little inconsistent.  Raise a bugzilla to track clarifying
why it is the right behaviour or fixing it.

Andy

2009/8/27 Simone Gianni <simoneg@...>:

> Hi all,
> I don't know if this is a bug, or if it's a known or wanted behavior, but
> using after() returning(Object o) on a set() pointcut does not weave it.
>
> Since documentation states that using Object in the returning clause will
> match also methods returning void, which it does, I would expect it to weave
> correctly also set() pointcuts, which obviously return "void".
>
> A normal after() advice (without the returning clause) will match and weave
> correctly, but makes it necessary to write the advice twice if I'm willing
> to trace all execution, get() and set() to trace an execution.
>
> This is happening under 1.6.5, both LTW and CTW, both from inside AJDT and
> from command line.
>
> Simone
>
> --
> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
> http://www.simonegianni.it/
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@...
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Re: set() pointuct and after() returning(Object o)

by Simone Gianni-2 :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hi Andy,
raised https://bugs.eclipse.org/bugs/show_bug.cgi?id=288577 . Sorry for
not writing the bug earlier, but I found no mention on documentation nor
any example of an after() returning(Object o) : set(), so I didn't know
if it was a bug or something else.

Simone

Andy Clement wrote:

> Does seem a little inconsistent.  Raise a bugzilla to track clarifying
> why it is the right behaviour or fixing it.
>
> Andy
>
> 2009/8/27 Simone Gianni <simoneg@...>:
>  
>> Hi all,
>> I don't know if this is a bug, or if it's a known or wanted behavior, but
>> using after() returning(Object o) on a set() pointcut does not weave it.
>>
>> Since documentation states that using Object in the returning clause will
>> match also methods returning void, which it does, I would expect it to weave
>> correctly also set() pointcuts, which obviously return "void".
>>
>> A normal after() advice (without the returning clause) will match and weave
>> correctly, but makes it necessary to write the advice twice if I'm willing
>> to trace all execution, get() and set() to trace an execution.
>>
>> This is happening under 1.6.5, both LTW and CTW, both from inside AJDT and
>> from command line.
>>
>> Simone
>>
>> --
>> Simone Gianni            CEO Semeru s.r.l.           Apache Committer
>> http://www.simonegianni.it/
>>
>> _______________________________________________
>> aspectj-users mailing list
>> aspectj-users@...
>> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>>
>>    
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@...
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>  


--
Simone Gianni            CEO Semeru s.r.l.           Apache Committer
http://www.simonegianni.it/

_______________________________________________
aspectj-users mailing list
aspectj-users@...
https://dev.eclipse.org/mailman/listinfo/aspectj-users