Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
AW: [aspectj-users] What does "no suitable guard" mean?

Hallo

Thanks for the explanation. I will read into it further.
On my ajdt installation the compiler flag for the guard was warning per
default. Eclipse 3.2M6 with the appropriate ajdt.

Btw... Why isn't the ajdt able to import necessary classes when they are
declared in a aspectj5 annotation style? Or manage them via "organize
imports".

Regards
Moritz Post

> -----Ursprüngliche Nachricht-----
> Von: aspectj-users-bounces@xxxxxxxxxxx [mailto:aspectj-users-
> bounces@xxxxxxxxxxx] Im Auftrag von Andy Clement
> Gesendet: Sonntag, 23. April 2006 13:18
> An: aspectj-users@xxxxxxxxxxx
> Betreff: Re: [aspectj-users] What does "no suitable guard" mean?
> 
> It means AspectJ is unable to make the 'lazy tjp' optimization because
> you haven't put a guard on the advice that makes it possible (with a
> suitable 'guard' - something like an if() pcd in your pointcut, we can
> build the thisJoinPoint object conditionally on the advice executing -
> if you have no guard then we always build the thisJoinPoint object).
> The default setting for the options relating to this optimization are
> 'ignore' so I assume you are turning on the lint warnings for your
> projects? (or do we have a bug where this isnt off by default?)
> 
> If you don't care, turn off the lint options for:
> 
> canNotImplementLazyTjp = ignore
> multipleAdviceStoppingLazyTjp=ignore
> noGuardForLazyTjp=ignore
> 
> If you do guard the advice correctly (if it makes sense for your
> advice), your code may well run faster because we don't always spend
> time constructing thisJoinPoint.
> 
> Andy.
> 
> On 23/04/06, Moritz Post <moritzpost@xxxxxx> wrote:
> > Hello
> >
> > I can't answer that question. But I do have the same problem/warning on
> my
> > aspects advice:
> >
> > "can not build thisJoinPoint lazily for this advice since it has no
> suitable
> > guard."
> >
> > This happens when I insert the JoinPoint object into a method on my
> aspectj5
> > method.
> >
> > Greets
> > Moritz Post
> >
> > > I get a lot of warnings about "no suitable guard for lazy
> instantiation".
> > >
> > > What exactly does this mean?  Is there anything I should do
> > > (including, turning off the warning)?
> >
> > _______________________________________________
> > aspectj-users mailing list
> > aspectj-users@xxxxxxxxxxx
> > https://dev.eclipse.org/mailman/listinfo/aspectj-users
> >
> _______________________________________________
> aspectj-users mailing list
> aspectj-users@xxxxxxxxxxx
> https://dev.eclipse.org/mailman/listinfo/aspectj-users



Back to the top