1.1 --- a/src/share/classes/com/sun/tools/javac/code/Printer.java Tue Aug 20 15:12:16 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/javac/code/Printer.java Wed Aug 21 16:13:50 2013 -0700 1.3 @@ -27,8 +27,6 @@ 1.4 1.5 import java.util.Locale; 1.6 1.7 -import javax.lang.model.type.TypeKind; 1.8 - 1.9 import com.sun.tools.javac.api.Messages; 1.10 import com.sun.tools.javac.code.Type.AnnotatedType; 1.11 import com.sun.tools.javac.code.Type.ArrayType; 1.12 @@ -191,7 +189,7 @@ 1.13 1.14 void printBaseElementType(Type t, StringBuilder sb, Locale locale) { 1.15 Type arrel = t; 1.16 - while (arrel.getKind() == TypeKind.ARRAY) { 1.17 + while (arrel.hasTag(TypeTag.ARRAY)) { 1.18 arrel = arrel.unannotatedType(); 1.19 arrel = ((ArrayType) arrel).elemtype; 1.20 } 1.21 @@ -200,7 +198,7 @@ 1.22 1.23 void printBrackets(Type t, StringBuilder sb, Locale locale) { 1.24 Type arrel = t; 1.25 - while (arrel.getKind() == TypeKind.ARRAY) { 1.26 + while (arrel.hasTag(TypeTag.ARRAY)) { 1.27 if (arrel.isAnnotated()) { 1.28 sb.append(' '); 1.29 sb.append(arrel.getAnnotationMirrors()); 1.30 @@ -264,12 +262,12 @@ 1.31 public String visitAnnotatedType(AnnotatedType t, Locale locale) { 1.32 if (t.typeAnnotations != null && 1.33 t.typeAnnotations.nonEmpty()) { 1.34 - if (t.underlyingType.getKind() == TypeKind.ARRAY) { 1.35 + if (t.underlyingType.hasTag(TypeTag.ARRAY)) { 1.36 StringBuilder res = new StringBuilder(); 1.37 printBaseElementType(t, res, locale); 1.38 printBrackets(t, res, locale); 1.39 return res.toString(); 1.40 - } else if (t.underlyingType.getKind() == TypeKind.DECLARED && 1.41 + } else if (t.underlyingType.hasTag(TypeTag.CLASS) && 1.42 t.underlyingType.getEnclosingType() != Type.noType) { 1.43 return visit(t.underlyingType.getEnclosingType(), locale) + 1.44 ". " + 1.45 @@ -348,7 +346,7 @@ 1.46 args = args.tail; 1.47 buf.append(','); 1.48 } 1.49 - if (args.head.unannotatedType().getKind() == TypeKind.ARRAY) { 1.50 + if (args.head.unannotatedType().hasTag(TypeTag.ARRAY)) { 1.51 buf.append(visit(((ArrayType) args.head.unannotatedType()).elemtype, locale)); 1.52 if (args.head.getAnnotationMirrors().nonEmpty()) { 1.53 buf.append(' ');