]> source.dussan.org Git - javassist.git/commitdiff
[JASSIST-131] Fix ConstPoolWriter.addStringInfo()
authorkabir.khan@jboss.com <kabir.khan@jboss.com@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 24 Aug 2010 10:22:31 +0000 (10:22 +0000)
committerkabir.khan@jboss.com <kabir.khan@jboss.com@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Tue, 24 Aug 2010 10:22:31 +0000 (10:22 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@570 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/ClassFileWriter.java

index 012f495b48bb87a513452fec07a373eac07185a1..bb7342a2992f2b54da3235318f7206cc39637df4 100644 (file)
@@ -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++;
         }