From: acolyer Date: Wed, 28 Sep 2005 20:10:19 +0000 (+0000) Subject: final bcel fix for 101047 X-Git-Tag: preDefaultReweavable~25 X-Git-Url: https://source.dussan.org/?a=commitdiff_plain;h=85a4b0afb2c4b69cb467484d9ed18b21e414a868;p=aspectj.git final bcel fix for 101047 --- 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 M. Dahm * @author Patrick C. Beard [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) { diff --git a/lib/bcel/bcel-src.zip b/lib/bcel/bcel-src.zip index 62037efc8..fe7c65dbb 100644 Binary files a/lib/bcel/bcel-src.zip and b/lib/bcel/bcel-src.zip differ diff --git a/lib/bcel/bcel.jar b/lib/bcel/bcel.jar index 611ca14e3..addbe1c21 100644 Binary files a/lib/bcel/bcel.jar and b/lib/bcel/bcel.jar differ