langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
changeset 13689 4d519199a6aa
parent 13635 5c742eabba7c
child 14359 d4099818ab70
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Mon Aug 27 10:59:13 2012 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Fri Aug 31 10:37:46 2012 +0100
@@ -1321,7 +1321,7 @@
                 else
                     proxies.append(proxy);
             }
-            annotate.later(new AnnotationCompleter(sym, proxies.toList()));
+            annotate.normal(new AnnotationCompleter(sym, proxies.toList()));
         }
     }
 
@@ -1347,7 +1347,7 @@
     void attachAnnotationDefault(final Symbol sym) {
         final MethodSymbol meth = (MethodSymbol)sym; // only on methods
         final Attribute value = readAttributeValue();
-        annotate.later(new AnnotationDefaultCompleter(meth, value));
+        annotate.normal(new AnnotationDefaultCompleter(meth, value));
     }
 
     Type readTypeOrClassSymbol(int i) {
@@ -1693,10 +1693,13 @@
             JavaFileObject previousClassFile = currentClassFile;
             try {
                 currentClassFile = classFile;
+                Annotations annotations = sym.annotations;
                 List<Attribute.Compound> newList = deproxyCompoundList(l);
-                sym.attributes_field = ((sym.attributes_field == null)
-                                        ? newList
-                                        : newList.prependList(sym.attributes_field));
+                if (annotations.pendingCompletion()) {
+                    annotations.setAttributes(newList);
+                } else {
+                    annotations.append(newList);
+                }
             } finally {
                 currentClassFile = previousClassFile;
             }