From 5b38e95af69252ca03b64fd7fa08f92840180b77 Mon Sep 17 00:00:00 2001 From: chiba Date: Wed, 14 Nov 2007 08:39:42 +0000 Subject: [PATCH] fixed a bug of JBAOP-481. Javassist could not properly copy a method body if LDC becomes LDC_W after copying. git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@415 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/bytecode/CodeAttribute.java | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/main/javassist/bytecode/CodeAttribute.java b/src/main/javassist/bytecode/CodeAttribute.java index 5a423efc..35ab7ddd 100644 --- a/src/main/javassist/bytecode/CodeAttribute.java +++ b/src/main/javassist/bytecode/CodeAttribute.java @@ -356,6 +356,8 @@ public class CodeAttribute extends AttributeInfo implements Opcode { if (index < 0x100) newcode[i + 1] = (byte)index; else { + newcode[i] = NOP; + newcode[i + 1] = NOP; LdcEntry ldc = new LdcEntry(); ldc.where = i; ldc.index = index; -- 2.39.5