diff options
author | acolyer <acolyer> | 2005-09-28 20:10:19 +0000 |
---|---|---|
committer | acolyer <acolyer> | 2005-09-28 20:10:19 +0000 |
commit | 85a4b0afb2c4b69cb467484d9ed18b21e414a868 (patch) | |
tree | 2eadfae03ca8dd8c5f5b73bc0cb87f5fe4402411 /bcel-builder | |
parent | f8cf60b03ac66011a68da9407f49a69622f26dac (diff) | |
download | aspectj-85a4b0afb2c4b69cb467484d9ed18b21e414a868.tar.gz aspectj-85a4b0afb2c4b69cb467484d9ed18b21e414a868.zip |
final bcel fix for 101047
Diffstat (limited to 'bcel-builder')
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java index 6f021e024..9f874362f 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/MethodGen.java @@ -86,7 +86,7 @@ import org.aspectj.apache.bcel.generic.annotation.AnnotationGen; * use the `removeNOPs' method to get rid off them. * The resulting method object can be obtained via the `getMethod()' method. * - * @version $Id: MethodGen.java,v 1.4 2005/03/10 12:15:04 aclement Exp $ + * @version $Id: MethodGen.java,v 1.5 2005/09/28 20:10:19 acolyer Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> * @author <A HREF="http://www.vmeng.com/beard">Patrick C. Beard</A> [setMaxStack()] * @see InstructionList @@ -263,6 +263,9 @@ public class MethodGen extends FieldGenOrMethodGen { LocalVariable l = lv[k]; InstructionHandle start = il.findHandle(l.getStartPC()); InstructionHandle end = il.findHandle(l.getStartPC() + l.getLength()); + // AMC, this actually gives us the first instruction AFTER the range, + // so move back one... (findHandle can't cope with mid-instruction indices) + if (end != null) end = end.getPrev(); // Repair malformed handles if(null == start) { |