Thanks for the reply.

I'm actually running my UftTest class of guava with my aspects. As you said
only this particular class is not ending the execution at all. Other test
classes of guava works fine.

I'm yet to attach a debugger and find a root cause for it.
On 4 Dec 2015 01:42, "Andy Clement" <andrew.clem...@gmail.com> wrote:

> I work better with complete failing samples rather than just the aspects.
> I’m not sure what the actual code looks like that you are running it
> against - I can guess but that doesn’t mean there isn’t a quirk in your
> code that is causing an infinite loop. I created something that your aspect
> would apply to and it worked just fine for me. I will say that if your
> advice is not calling back into your code that matches the pointcuts, I’m
> not sure you need the cflow() wrappers. Just using !within(GuavaAspect)
> would work, but if your GuavaAspect is not in com.google then you wouldn’t
> need that anyway because of your within(com.google..*) clauses.
>
> cheers,
> Andy
>
>
> On Nov 28, 2015, at 9:09 AM, ants <anto.aravinth....@gmail.com> wrote:
>
> Any solutions for this issue?
> On 26 Nov 2015 15:44, "ants [via AspectJ]" <[hidden email]> wrote:
>
>> Sorry this the right code:
>>
>> aspect GuavaAspect{
>>
>>         public boolean trackState;
>>         declare precedence : GuavaAspect, *;
>>         protected pointcut traceMethods() :(execution(*
>> junit.framework.TestCase+.*(..))&& within(com.google..*) &&
>> !cflow(within(GuavaAspect)));
>>         protected pointcut traceMethods2() :(execution(* *(..)) &&
>> within(com.google..*) && !cflow(within(GuavaAspect)));
>>
>>         before() : traceMethods2() {
>>                         if(trackState){
>>                                 //do something here
>>                         }
>>                 }
>>         before() : traceMethods() {
>>                 Signature sig = thisJoinPointStaticPart.getSignature();
>>                 String testCaseName=sig.getName();
>>                 if(testCaseName.length()>=4){
>>                         String test=testCaseName.substring(0, 4);
>>                         if(test.equals("test")){
>>                                 trackState=true;
>>                         }
>>                 }
>>         }
>>         after()  : traceMethods(){
>>                 trackState=false;
>>                 Signature sig = thisJoinPointStaticPart.getSignature();
>>                 String testCaseName=sig.getName();
>>                 if(testCaseName.length()>=4){
>>                         String test=testCaseName.substring(0, 4);
>>                         if(test.equals("test")){
>>                                 try{
>>                                         //write to file
>>                                 }
>>                                 catch(Exception e){
>>                                         e.printStackTrace();
>>                                 }
>>                         }
>>                 }
>>         }
>>         }
>>
>> forgot to add the pointcut on com.google source package. The idea is to
>> track the list of methods happening inside a test case and write to a file.
>>
>> ------------------------------
>> If you reply to this email, your message will be added to the discussion
>> below:
>>
>> http://aspectj.2085585.n4.nabble.com/Is-It-Possible-For-Two-PointCut-To-Go-Infinite-Loop-tp4651983p4651987.html
>> To unsubscribe from Is It Possible For Two PointCut To Go Infinite Loop?, 
>> click
>> here.
>> NAML
>> <http://aspectj.2085585.n4.nabble.com/template/NamlServlet.jtp?macro=macro_viewer&id=instant_html%21nabble%3Aemail.naml&base=nabble.naml.namespaces.BasicNamespace-nabble.view.web.template.NabbleNamespace-nabble.view.web.template.NodeNamespace&breadcrumbs=notify_subscribers%21nabble%3Aemail.naml-instant_emails%21nabble%3Aemail.naml-send_instant_email%21nabble%3Aemail.naml>
>>
>
> ------------------------------
> View this message in context: Re: Is It Possible For Two PointCut To Go
> Infinite Loop?
> <http://aspectj.2085585.n4.nabble.com/Is-It-Possible-For-Two-PointCut-To-Go-Infinite-Loop-tp4651983p4651992.html>
> Sent from the AspectJ - users mailing list archive
> <http://aspectj.2085585.n4.nabble.com/AspectJ-users-f2077686.html> at
> Nabble.com <http://nabble.com>.
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
>
>
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@eclipse.org
> To change your delivery options, retrieve your password, or unsubscribe
> from this list, visit
> https://dev.eclipse.org/mailman/listinfo/aspectj-users
>
_______________________________________________
aspectj-users mailing list
aspectj-users@eclipse.org
To change your delivery options, retrieve your password, or unsubscribe from 
this list, visit
https://dev.eclipse.org/mailman/listinfo/aspectj-users

Reply via email to