]> source.dussan.org Git - javassist.git/commitdiff
fixed a bug I enbugged in the previous version
authorchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sat, 11 Jun 2005 15:46:49 +0000 (15:46 +0000)
committerchiba <chiba@30ef5769-5b8d-40dd-aea6-55b5d6557bb3>
Sat, 11 Jun 2005 15:46:49 +0000 (15:46 +0000)
git-svn-id: http://anonsvn.jboss.org/repos/javassist/trunk@180 30ef5769-5b8d-40dd-aea6-55b5d6557bb3

src/main/javassist/bytecode/FieldInfo.java

index 744a57e948d8a0f74a80bf211e09f704485e6fe1..73698a62d557d32075015b941d153bf3dc82d29e 100644 (file)
@@ -100,13 +100,13 @@ public final class FieldInfo {
             newAttributes.add(visibleAnnotations);
         }
 
-        attribute = newAttributes;
         int index = getConstantValue();
         if (index != 0) {
             index = constPool.copy(index, cp, null);
-            attribute.add(new ConstantAttribute(cp, index));
+            newAttributes.add(new ConstantAttribute(cp, index));
         }
 
+        attribute = newAttributes;
         name = cp.addUtf8Info(getName());
         descriptor = cp.addUtf8Info(getDescriptor());
         constPool = cp;