1.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java Fri May 27 15:02:39 2011 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java Wed Jun 01 11:25:50 2011 -0700 1.3 @@ -2240,8 +2240,10 @@ 1.4 class AnnotationValidator extends TreeScanner { 1.5 @Override 1.6 public void visitAnnotation(JCAnnotation tree) { 1.7 - super.visitAnnotation(tree); 1.8 - validateAnnotation(tree); 1.9 + if (!tree.type.isErroneous()) { 1.10 + super.visitAnnotation(tree); 1.11 + validateAnnotation(tree); 1.12 + } 1.13 } 1.14 } 1.15 tree.accept(new AnnotationValidator()); 1.16 @@ -2383,8 +2385,6 @@ 1.17 /** Check an annotation value. 1.18 */ 1.19 public void validateAnnotation(JCAnnotation a) { 1.20 - if (a.type.isErroneous()) return; 1.21 - 1.22 // collect an inventory of the members (sorted alphabetically) 1.23 Set<MethodSymbol> members = new TreeSet<MethodSymbol>(new Comparator<Symbol>() { 1.24 public int compare(Symbol t, Symbol t1) {