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

From: Pavel Avgustinov <>
Date: Tue, 29 Apr 2008 14:07:49 +0100

Hi Thomas,

First of all, your email made me realise there was a bug in
findUsedArguments(), which I've attempted to fix in the latest svn HEAD. It
won't affect the behaviour you're seeing, though.

> I found out what the problem is but not how to solve it. Perhaps
> someone can give me a hint.
> 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].

This looks quite odd. Advice methods indeed take additional arguments for the
special AspectJ keywords (thisJoinPoint, thisJoinPointStaticPart,
thisEnclosingJoinPointStaticPart) when they're used. It looks like the method
body expects this parameter to be present (so thisJoinPoint must be used in
the advice somewhere) but whatever generated the advice method hasn't updated
the signature.

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?

- P
Received on Tue Apr 29 2008 - 14:08:03 BST

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