1.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java Tue Oct 15 22:15:35 2013 +0200 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java Tue Oct 15 15:57:13 2013 -0700 1.3 @@ -1273,7 +1273,7 @@ 1.4 return false; 1.5 if (!s.getAnnotationMirrors().containsAll(t.getAnnotationMirrors())) 1.6 return false; 1.7 - return visit(t.underlyingType, s); 1.8 + return visit(t.unannotatedType(), s); 1.9 } 1.10 }; 1.11 // </editor-fold> 1.12 @@ -2217,15 +2217,15 @@ 1.13 1.14 @Override 1.15 public Type visitAnnotatedType(AnnotatedType t, Boolean recurse) { 1.16 - Type erased = erasure(t.underlyingType, recurse); 1.17 + Type erased = erasure(t.unannotatedType(), recurse); 1.18 if (erased.isAnnotated()) { 1.19 // This can only happen when the underlying type is a 1.20 // type variable and the upper bound of it is annotated. 1.21 // The annotation on the type variable overrides the one 1.22 // on the bound. 1.23 - erased = ((AnnotatedType)erased).underlyingType; 1.24 + erased = ((AnnotatedType)erased).unannotatedType(); 1.25 } 1.26 - return new AnnotatedType(t.typeAnnotations, erased); 1.27 + return erased.annotatedType(t.getAnnotationMirrors()); 1.28 } 1.29 }; 1.30 1.31 @@ -4419,7 +4419,7 @@ 1.32 public R visitUndetVar(UndetVar t, S s) { return visitType(t, s); } 1.33 public R visitErrorType(ErrorType t, S s) { return visitType(t, s); } 1.34 // Pretend annotations don't exist 1.35 - public R visitAnnotatedType(AnnotatedType t, S s) { return visit(t.underlyingType, s); } 1.36 + public R visitAnnotatedType(AnnotatedType t, S s) { return visit(t.unannotatedType(), s); } 1.37 } 1.38 1.39 /**