]> source.dussan.org Git - javassist.git/commitdiff
fixed a bug in write() in Annotation and ClassMemberValue
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sun, 13 Aug 2006 16:49:43 +0000 (16:49 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sun, 13 Aug 2006 16:49:43 +0000 (16:49 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@309 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/annotation/Annotation.java
src/main/javassist/bytecode/annotation/ClassMemberValue.java

index 9971fada127a5d39eeace598b6f633a3a2eec489..4b00a318c7924525686756272f065590f77e9330 100644 (file)
@@ -289,12 +289,13 @@ public class Annotation {
      * @param writer            the output.
      */
     public void write(AnnotationsWriter writer) throws IOException {
+        String typeName = pool.getUtf8Info(typeIndex);
         if (members == null) {
-            writer.annotation(typeIndex, 0);
+            writer.annotation(typeName, 0);
             return;
         }
 
-        writer.annotation(typeIndex, members.size());
+        writer.annotation(typeName, members.size());
         Iterator it = members.values().iterator();
         while (it.hasNext()) {
             Pair pair = (Pair)it.next();
index 19b4714b68e2761fcf9bfaa5187d5b40f8badcda..c29dbb207774cc6963869753537233c3b2cf3191 100644 (file)
@@ -120,7 +120,7 @@ public class ClassMemberValue extends MemberValue {
      * Writes the value.
      */
     public void write(AnnotationsWriter writer) throws IOException {
-        writer.classInfoIndex(valueIndex);
+        writer.classInfoIndex(cp.getUtf8Info(valueIndex));
     }
 
     /**