aboutsummaryrefslogtreecommitdiffstats
path: root/src/main/javassist/bytecode/LocalVariableAttribute.java
diff options
context:
space:
mode:
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-08-13 09:06:31 +0000
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>2007-08-13 09:06:31 +0000
commit2f7efd86200e7f76130224a76259c1a747c87c5c (patch)
tree83598bd1b78793457377f2000e211270254dfcb1 /src/main/javassist/bytecode/LocalVariableAttribute.java
parent08ffecc61983efc2748a3d0b96342dcc4bb5623a (diff)
downloadjavassist-2f7efd86200e7f76130224a76259c1a747c87c5c.tar.gz
javassist-2f7efd86200e7f76130224a76259c1a747c87c5c.zip
the default major version of newly-created class files is either JDK 1.3 or 1.5, which depends on the VM version.
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@402 30ef5769-5b8d-40dd-aea6-55b5d6557bb3
Diffstat (limited to 'src/main/javassist/bytecode/LocalVariableAttribute.java')
-rw-r--r--src/main/javassist/bytecode/LocalVariableAttribute.java7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/main/javassist/bytecode/LocalVariableAttribute.java b/src/main/javassist/bytecode/LocalVariableAttribute.java
index f1eb203c..54929137 100644
--- a/src/main/javassist/bytecode/LocalVariableAttribute.java
+++ b/src/main/javassist/bytecode/LocalVariableAttribute.java
@@ -260,8 +260,11 @@ public class LocalVariableAttribute extends AttributeInfo {
ByteArray.write16bit(name, dest, j + 4);
- if (type != 0)
- type = cp.copy(type, newCp, null);
+ if (type != 0) {
+ String sig = cp.getUtf8Info(type);
+ sig = Descriptor.rename(sig, classnames);
+ type = newCp.addUtf8Info(sig);
+ }
ByteArray.write16bit(type, dest, j + 6);
ByteArray.write16bit(index, dest, j + 8);