Re: [abc-users] InterprocConstantPropagator throws IndexOutOfBoundsException when Advice does not apply

From: Thomas Pawlitzki <>
Date: Wed, 30 Apr 2008 08:13:38 +0200

Hello Pavel,

> > The Problem is that when an advice which is modified by my compiler
> > extension is passed to the findUsedArguments method it contains only
> > one parameterType
> > [java.lang.String]
> > but 2 IdentityStmt
> > [test := @parameter0: java.lang.String, thisJoinPoint := @parameter1:
> > org.aspectj.lang.JoinPoint, return]
> >
> > So the result[boolean] has only length 1 but accessed is result[0] and
> > result[1].

> Could you give us some more details regarding where the method in question
> comes from? Is it one that abc generates, or is it added by your extension?

The method which provokes the Exception is
<aspects.PrinterAspect: void proceed$0(java.lang.String)>

and is generated from my advice

       void around(Printing p) {
               System.out.println("\t*** before Printing *** "+thisJoinPoint);
               System.out.println("\tClass of Joinpoint : "+p.getClass());
               System.out.println("\tSignature :


               System.out.println("\t*** after Printing *** "+thisJoinPoint);

This advice has no pointcut as I set this pointut during compilation
to all pointcuts of the joinpoint Printing (which is the argument).
If there is no pointcut for Printing, i create the never matching
pointcut mentioned above. This I have to do as the advice defines a
formal parameter. If this parameter is not be bound via this(),
target() or args() an error is generated during checking the AST.

In addition to manipulating the pointcut expression of the advice I
add a statement to the advice body. But i do this in the frontend
before the jimple code is generated.

Received on Wed Apr 30 2008 - 07:13:41 BST

This archive was generated by hypermail 2.2.0 : Wed Apr 30 2008 - 14:30:11 BST