diff options
author | aclement <aclement> | 2006-05-12 08:17:43 +0000 |
---|---|---|
committer | aclement <aclement> | 2006-05-12 08:17:43 +0000 |
commit | 5d2b5b8892cc6e714565326b70d7c6a4b7007129 (patch) | |
tree | 5b021aa2f81c7991cac1a043dbe262863a2d818c /bcel-builder | |
parent | 9d1f31f65bbf7e7d4b5e205d983201d724f97676 (diff) | |
download | aspectj-5d2b5b8892cc6e714565326b70d7c6a4b7007129.tar.gz aspectj-5d2b5b8892cc6e714565326b70d7c6a4b7007129.zip |
test and fix for 138384: woven methods being >64k in code size
Diffstat (limited to 'bcel-builder')
-rw-r--r-- | bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionList.java | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionList.java b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionList.java index 55cfc95db..cf0fb321a 100644 --- a/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionList.java +++ b/bcel-builder/src/org/aspectj/apache/bcel/generic/InstructionList.java @@ -75,7 +75,7 @@ import java.util.ArrayList; * A list is finally dumped to a byte code array with <a * href="#getByteCode()">getByteCode</a>. * - * @version $Id: InstructionList.java,v 1.3 2006/02/14 13:32:07 aclement Exp $ + * @version $Id: InstructionList.java,v 1.4 2006/05/12 08:17:43 aclement Exp $ * @author <A HREF="mailto:markus.dahm@berlin.de">M. Dahm</A> * @see Instruction * @see InstructionHandle @@ -986,8 +986,11 @@ public class InstructionList implements Serializable { System.err.println(e); return null; } + byte[] byteCode = b.toByteArray(); + if (byteCode.length > Constants.MAX_CODE_SIZE) + throw new ClassGenException("Code size too big: " + byteCode.length); - return b.toByteArray(); + return byteCode; } /** |