Skip to main content

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
Re: [Fwd: Re: [aspectj-users] (no subject)]

raised as bug https://bugs.eclipse.org/bugs/show_bug.cgi?id=209019

On 07/11/2007, Andy Clement <andrew.clement@xxxxxxxxx> wrote:
> yes, within is allowed in the expression. it is a bug
>
> On 07/11/2007, Jean-Louis PASTUREL <jean-louis.pasturel@xxxxxxxxx> wrote:
> > with this expression in concrete-aspect :
> >
> > expression="within (jlp.exemple1.*) AND call (public * jlp..*(..))" />
> >
> > I get the same error.
> >
> > Is the within clause alowed in expression attribute of concrete-aspect tag ?
> > Or only in the weaver element ?
> >
> >
> >
> >
> >
> > > Message du 07/11/07 12:18
> > > De : "JLP"
> > > A : "JLP"
> > > Copie à :
> > > Objet : Re: [Fwd: Re: [aspectj-users] (no subject)]
> > >
> > > Andy Clement a écrit :
> > >
> > > >we actually use AND in the case of writing composite expressions in
> > > >XML, rather than && - see the documentation:
> > >
> > >http://www.eclipse.org/aspectj/doc/released/devguide/ltw-configuration.html
> > > >
> > > >I still don't think it should fail in a horrible way like that,
> > > >whatever you specified.
> > > >
> > > >Andy.
> > > >
> > > >On 07/11/2007, Jean-Louis PASTUREL wrote:
> > > >
> > > >
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>>Objet : [Fwd: Re: [aspectj-users] (no subject)]
> > > >>>
> > > >>>Looks like a bug to me, if you raise it in bugzilla I will look into
> > it.
> > > >>>
> > > >>>Andy
> > > >>>
> > > >>>On 06/11/2007, Jean-Louis PASTUREL wrote:
> > > >>>
> > > >>>
> > > >>>>Hi,
> > > >>>>Sorry for the lengh of this post !
> > > >>>>I create an abstract Aspect like this :
> > > >>>>
> > > >>>>package iep.perf;
> > > >>>>
> > > >>>>import java.util.Calendar;
> > > >>>>import java.io.File;
> > > >>>>
> > > >>>>public abstract aspect AbstractDurationMethod {
> > > >>>>private static String rootTrace = "";
> > > >>>>
> > > >>>>private static Trace outDurationMethods;
> > > >>>>static {
> > > >>>>rootTrace = System.getProperty("rootTrace");
> > > >>>>
> > > >>>>outDurationMethods = new Trace(rootTrace + File.separator
> > > >>>>+ "outDurationMethods.log");
> > > >>>>}
> > > >>>>
> > > >>>>public abstract pointcut methods();
> > > >>>>
> > > >>>>Object around(): methods() {
> > > >>>>long deb = Calendar.getInstance().getTimeInMillis();
> > > >>>>
> > > >>>>Object retour= proceed();
> > > >>>>long fin = Calendar.getInstance().getTimeInMillis();
> > > >>>>outDurationMethods.append(outDurationMethods.getSdf().format(
> > > >>>>Calendar.getInstance().getTime())
> > > >>>>+ ";JointPoint ="
> > > >>>>+ thisJoinPoint.getSignature().getDeclaringTypeName()
> > > >>>>+ "."
> > > >>>>+ thisJoinPoint.getSignature().getName()
> > > >>>>+ ";duration="
> > > >>>>+ (fin - deb) + " ms\n");
> > > >>>>outDurationMethods.flush();
> > > >>>>return retour;
> > > >>>>}
> > > >>>>
> > > >>>>}
> > > >>>>
> > > >>>>I use classes Square and Circle found in eclipse documentation to test
> > > >>>>
> > > >>>>
> > > >>my
> > > >>
> > > >>
> > > >>>>aspects
> > > >>>>
> > > >>>>When i try this aspect with concrete-aspect tag in aop.xml :
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>>>extends="iep.perf.AbstractDurationMethod">
> > > >>>>>>expression="within(jlp.exemple1.*) && call (public *
> > > >>>>>>
> > > >>>>>>
> > > >>>>jlp..*(..))" />
> > > >>>>
> > > >>>>
> > > >>>>I get this error :
> > > >>>>Exception in thread "main" java.lang.IllegalAccessError: tried to
> > access
> > > >>>>method
> > > >>>>
> > > >>>>
> > > >>>>
> > >
> > >>iep.perf.AbstractDurationMethod.ajc$around$iep_perf_AbstractDurationMethod$1$cd1
> > > >>
> > > >>
> > >
> > >>02c33proceed(Lorg/aspectj/runtime/internal/AroundClosure;)Ljava/lang/Object;
> > > >>
> > > >>
> > > >>>>fro
> > > >>>>m class jlp.exemple1.Main
> > > >>>>at
> > > >>>>
> > > >>>>
> > > >>>>
> > >
> > >>jlp.exemple1.Main.perimeter_aroundBody1$advice(Main.java:124)
> > > >>
> > > >>
> > > >>>>at
> > > >>>>jlp.exemple1.Main.perimeter_aroundBody2(Main.java:1)
> > > >>>>at jlp.exemple1.Main$AjcClosure3.run(Main.java:1)
> > > >>>>at
> > > >>>>
> > > >>>>
> > > >>>>
> > >
> > >>iep.perf.AbstractDurationMethod.ajc$around$iep_perf_AbstractDurationMethod$1$cd102c33proceed(AbstractDurationMethod.aj:1)
> > > >>
> > > >>
> > > >>>>at
> > > >>>>
> > > >>>>
> > > >>>>
> > >
> > >>iep.perf.AbstractDurationMethod.ajc$around$iep_perf_AbstractDurationMethod$1$cd102c33(AbstractDurationMethod.aj:24)
> > > >>
> > > >>
> > > >>>>at jlp.exemple1.Main.main(Main.java:8)
> > > >>>>
> > > >>>>When I extend my Abstract Aspect like this :
> > > >>>>package iep.perf;
> > > >>>>
> > > >>>>public aspect ConcreteDurationMethod extends AbstractDurationMethod {
> > > >>>>
> > > >>>>public pointcut methods():within(jlp.exemple1.*) && call (public *
> > > >>>>jlp..*(..));
> > > >>>>
> > > >>>>}
> > > >>>>
> > > >>>>and modify my aop.xml like below :
> > > >>>>
> > > >>>>it runs fine !
> > > >>>>But that i want is to use concrete-aspect tag.
> > > >>>>I use AspectJ 1.5.4 embedded in Eclipse Europa 3.3.1 Build id:
> > > >>>>M20070921-1145
> > > >>>>
> > > >>>>Do you think that is a bug, or otherwise what did i miss ?
> > > >>>>Thanks
> > > >>>>JLP
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>_______________________________________________
> > > >>>>aspectj-users mailing list
> > > >>>>aspectj-users@xxxxxxxxxxx
> > >
> > >>>>https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > >>>>
> > > >>>>
> > > >>>>
> > > >>>>
> > >
> > >>---------------------------------------------------------------------------------------
> > > >>
> > > >>
> > > >>>Orange vous informe que cet e-mail a ete controle par l'anti-virus
> > mail.
> > > >>>Aucun virus connu a ce jour par nos services n'a ete detecte.
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >>>
> > > >> Using concrete-aspect tag with the schema below it works !
> > > >>
> > > >>
> > > >>
> > > >> > >> extends="iep.perf.AbstractDurationMethod">
> > > >> > >> expression="call (public * jlp..*(..))" />
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>
> > > >>It seems that the expession attribute of concrete-aspect tag doesn't
> > support
> > > >>a composite expession like "within(jlp.exemple1.*) && call (public *
> > > >>jlp..*(..))"
> > > >>Putting the include element inside weaver tag solves the problem.
> > > >>Is-it a limitation or an AspectJ bug ?
> > > >>If it is, i will write a bug...
> > > >>Best Regards
> > > >>
> > > >>
> > > >>_______________________________________________
> > > >>aspectj-users mailing list
> > > >>aspectj-users@xxxxxxxxxxx
> > > >>https://dev.eclipse.org/mailman/listinfo/aspectj-users
> > > >>
> > > >>
> > > >>
> > > >>
> > >
> > >---------------------------------------------------------------------------------------
> > > >Orange vous informe que cet e-mail a ete controle par l'anti-virus mail.
> > > >Aucun virus connu a ce jour par nos services n'a ete detecte.
> > > >
> > > >
> > > >
> > > >
> > > >
> > >
> > >
> > ---------------------------------------------------------------------------------------
> > > Orange vous informe que cet e-mail a ete controle par l'anti-virus mail.
> > > Aucun virus connu a ce jour par nos services n'a ete detecte.
> > >
> > >
> > >
>


Back to the top