From b0f33152bbea87a54798feb81846f199eaaa9c8e Mon Sep 17 00:00:00 2001 From: "kabir.khan@jboss.com" Date: Tue, 24 Aug 2010 10:22:31 +0000 Subject: [PATCH] [JASSIST-131] Fix ConstPoolWriter.addStringInfo() git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@570 30ef5769-5b8d-40dd-aea6-55b5d6557bb3 --- src/main/javassist/bytecode/ClassFileWriter.java | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/main/javassist/bytecode/ClassFileWriter.java b/src/main/javassist/bytecode/ClassFileWriter.java index 012f495b..bb7342a2 100644 --- a/src/main/javassist/bytecode/ClassFileWriter.java +++ b/src/main/javassist/bytecode/ClassFileWriter.java @@ -651,8 +651,9 @@ public class ClassFileWriter { * @return the index of the added entry. */ public int addStringInfo(String str) { + int utf8 = addUtf8Info(str); output.write(StringInfo.tag); - output.writeShort(addUtf8Info(str)); + output.writeShort(utf8); return num++; } -- 2.39.5