[PRL] AspectJ "feature"

Pengcheng Wu wupc at ccs.neu.edu
Wed Apr 6 15:07:43 EDT 2005


I knew. I pointed it out just becasue I thought there probably was
something wrong with John's AspectJ compiler settings.

On Wed, 6 Apr 2005, Karl Lieberherr wrote:

> Hi Pengcheng:
>
> Thanks for verifying that. Theo and I were both surprised that ajc would
> not catch that.
>
> The essence of John's argument is that the compiler should tell us about
> unsatisfiable pointcuts and currently it does not.
>
> -- Karl
>
> -----Original Message-----
> From: prl-bounces at lists.ccs.neu.edu
> [mailto:prl-bounces at lists.ccs.neu.edu] On Behalf Of Pengcheng Wu
> Sent: Tuesday, April 05, 2005 4:00 PM
> To: John Clements
> Cc: PRL Mailing List
> Subject: Re: [PRL] AspectJ "feature"
>
>
> On Tue, 5 Apr 2005, John Clements wrote:
>
> > QUIZ QUESTION: what happens if you make a mistake in the name of the
> > method called inside the advice?  E.G:
> >
> > ...
> > 		if (! c.legalwhoopsbadnameDx(dx)) {
> > ...
> >
> >
> > What happens is...
> >
> >
> > nothing.  No compile error, runs fine.  The advice is _not_ applied,
> no
> > output to stdout.  I can only guess that type information from the
> body
> > (in this case, the existence of a 'legalwhoopsbadnameDx' method) is
> > implicitly added to the pointcut,
>
> I don't know why you got nothing. When I compiled your program with ajc
> 1.1.1, I got:
>
> ajc *.java
> C:\temp\CheckDX.java:4 The method
> legalwhoopsbadnameDx(int) is undefined for the type Counter
> if (! c.legalwhoopsbadnameDx(dx)) {
>         ^^^^^^^^^^^^^^^^^^^^
>
> 1 error
>
>
> I am pretty sure the compiler does check this kind of errors.
>
> --Pengcheng
>
>
>
> _______________________________________________
> PRL mailing list
> PRL at lists.ccs.neu.edu
> https://lists.ccs.neu.edu/bin/listinfo/prl
>
>



More information about the PRL mailing list