diff options
author | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2004-07-19 12:02:27 +0000 |
---|---|---|
committer | chiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3> | 2004-07-19 12:02:27 +0000 |
commit | aa92b8250ecf9bb0698a0844123b67a5f2ac5279 (patch) | |
tree | 787192862dd2a8b3214a45e8ea0e6f52573b9a5d /src/main/javassist/bytecode/CodeAttribute.java | |
parent | 785aa0c403ccfe2367417b1431f430961a2af067 (diff) | |
download | javassist-aa92b8250ecf9bb0698a0844123b67a5f2ac5279.tar.gz javassist-aa92b8250ecf9bb0698a0844123b67a5f2ac5279.zip |
Bugs item #988787 has been fixed.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@114 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/CodeAttribute.java')
-rw-r--r-- | src/main/javassist/bytecode/CodeAttribute.java | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/main/javassist/bytecode/CodeAttribute.java b/src/main/javassist/bytecode/CodeAttribute.java index ec1f9a58..4c7e27bb 100644 --- a/src/main/javassist/bytecode/CodeAttribute.java +++ b/src/main/javassist/bytecode/CodeAttribute.java @@ -81,7 +81,7 @@ public class CodeAttribute extends AttributeInfo implements Opcode { maxStack = src.getMaxStack(); maxLocals = src.getMaxLocals(); exceptions = src.getExceptionTable().copy(cp, classnames); - info = src.copyCode(cp, classnames, exceptions); + info = src.copyCode(cp, classnames, exceptions, this); attributes = new LinkedList(); /* Since an index into the source constant pool table may not @@ -279,6 +279,8 @@ public class CodeAttribute extends AttributeInfo implements Opcode { /** * Returns <code>attributes[]</code>. * It returns a list of <code>AttributeInfo</code>. + * A new element can be added to the returned list + * and an existing element can be removed from the list. * * @see AttributeInfo */ @@ -299,7 +301,7 @@ public class CodeAttribute extends AttributeInfo implements Opcode { * Copies code. */ private byte[] copyCode(ConstPool destCp, Map classnames, - ExceptionTable etable) + ExceptionTable etable, CodeAttribute destCa) throws BadBytecode { int len = getCodeLength(); @@ -307,7 +309,7 @@ public class CodeAttribute extends AttributeInfo implements Opcode { LdcEntry ldc = copyCode(this.info, 0, len, this.getConstPool(), newCode, destCp, classnames); - return LdcEntry.doit(newCode, ldc, etable, this); + return LdcEntry.doit(newCode, ldc, etable, destCa); } private static LdcEntry copyCode(byte[] code, int beginPos, int endPos, |