changeset 3091:882808d3b51f

Fix DPrinter and expand BasicAnnoTests.
author wmdietl
date Thu, 05 Dec 2013 16:50:35 -0500
parents f8b150f1e339
children 4d6bcc50a30a
files test/tools/javac/lib/DPrinter.java test/tools/javac/processing/model/type/BasicAnnoTests.java
diffstat 2 files changed, 14 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/test/tools/javac/lib/DPrinter.java	Wed Dec 04 18:49:50 2013 -0500
+++ b/test/tools/javac/lib/DPrinter.java	Thu Dec 05 16:50:35 2013 -0500
@@ -403,7 +403,7 @@
                 printType("type", sym.type, Details.SUMMARY);
                 printType("erasure", sym.erasure_field, Details.SUMMARY);
                 sym.accept(symVisitor, null);
-                printAnnotations("annotations", sym.getAnnotations(), Details.SUMMARY);
+                printAnnotations("annotations", sym.getMetadata(), Details.SUMMARY);
                 indent(-1);
             }
         }
--- a/test/tools/javac/processing/model/type/BasicAnnoTests.java	Wed Dec 04 18:49:50 2013 -0500
+++ b/test/tools/javac/processing/model/type/BasicAnnoTests.java	Thu Dec 05 16:50:35 2013 -0500
@@ -26,7 +26,6 @@
  * @bug     1234567
  * @summary Annotations on types
  * @library /tools/javac/lib
- * @ignore
  * @build JavacTestingAbstractProcessor DPrinter BasicAnnoTests
  * @compile/process -processor BasicAnnoTests -proc:only BasicAnnoTests.java
  */
@@ -47,6 +46,7 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.type.ArrayType;
+import javax.lang.model.type.DeclaredType;
 import javax.lang.model.type.ExecutableType;
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVariable;
@@ -234,6 +234,12 @@
             return super.visitWildcard(t, p);
         }
 
+        @Override
+        public R visitDeclared(DeclaredType t, P p) {
+            scan(t.getTypeArguments(), p);
+            return super.visitDeclared(t, p);
+        }
+
         R scan(TypeMirror t) {
             return scan(t, null);
         }
@@ -285,4 +291,10 @@
 
     @Test(posn=3, annoType=TA.class, expect="6")
     public int m3(float a) throws @TA(6) Exception { return 0; }
+
+    @Test(posn=1, annoType=TA.class, expect="7")
+    public java.util.List<@TA(7) String> f7;
+
+    @Test(posn=2, annoType=TA.class, expect="8")
+    public void m8(java.util.List<@TA(8) String> a) { }
 }