aboutsummaryrefslogtreecommitdiffstats
path: root/weaver
diff options
context:
space:
mode:
authoraclement <aclement>2009-04-04 18:42:04 +0000
committeraclement <aclement>2009-04-04 18:42:04 +0000
commitc17d9d32781bdeadd1b30e166c5c88cb0b258fab (patch)
tree88d32fe4b5fd4058c93e2176d51cf34740aa91da /weaver
parentb90b11e6346a98ec268bfc7619e4d8980b939429 (diff)
downloadaspectj-c17d9d32781bdeadd1b30e166c5c88cb0b258fab.tar.gz
aspectj-c17d9d32781bdeadd1b30e166c5c88cb0b258fab.zip
271169: test and fix: npe in weave call method with 4 longs
Diffstat (limited to 'weaver')
-rw-r--r--weaver/src/org/aspectj/weaver/bcel/BcelShadow.java14
1 files changed, 7 insertions, 7 deletions
diff --git a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
index 086b8f166..3220aecd4 100644
--- a/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
+++ b/weaver/src/org/aspectj/weaver/bcel/BcelShadow.java
@@ -2334,24 +2334,24 @@ public class BcelShadow extends Shadow {
end = end.getPrev();
}
Type[] args = localAdviceMethod.getArgumentTypes();
- int i = 0;
- for (int slot = 0; slot < extraParamOffset; i++) {
+ int argNumber = 0;
+ for (int slot = 0; slot < extraParamOffset; argNumber++) { // slot will increase by the argument size each time
String argumentName = null;
- if (i >= args.length || parameterNames.size() == 0 || i >= parameterNames.size()) {
+ if (argNumber >= args.length || parameterNames.size() == 0 || argNumber >= parameterNames.size()) {
// this should be unnecessary as I think all known joinpoints and helper methods
// propagate the parameter names around correctly - but just in case let us do this
// rather than fail. If a bug is raised reporting unknown as a local variable name
// then investigate the joinpoint giving rise to the ResolvedMember and why it has
// no parameter names specified
- argumentName = new StringBuffer("unknown").append(i).toString();
+ argumentName = new StringBuffer("unknown").append(argNumber).toString();
} else {
- argumentName = (String) parameterNames.get(i);
+ argumentName = (String) parameterNames.get(argNumber);
}
- String argumentSignature = args[i].getSignature();
+ String argumentSignature = args[argNumber].getSignature();
LocalVariableTag lvt = new LocalVariableTag(argumentSignature, argumentName, slot, 0);
start.addTargeter(lvt);
end.addTargeter(lvt);
- slot += args[slot].getSize();
+ slot += args[argNumber].getSize();
}
}