changeset 2265:d92cbf4c1699

Clean up imports and whitespace. Use unannotatedType in a comparison.
author wmdietl
date Sun, 24 Feb 2013 16:34:39 -0800
parents de1519daf492
children 152b6d2ea573
files src/share/classes/com/sun/tools/javac/code/Type.java src/share/classes/com/sun/tools/javac/code/Types.java
diffstat 2 files changed, 3 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/javac/code/Type.java	Sun Feb 24 13:06:56 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Sun Feb 24 16:34:39 2013 -0800
@@ -26,7 +26,6 @@
 package com.sun.tools.javac.code;
 
 import com.sun.tools.javac.model.JavacAnnoConstructs;
-import com.sun.tools.javac.model.JavacTypes;
 import java.lang.annotation.Annotation;
 import java.util.Collections;
 import java.util.EnumMap;
@@ -34,7 +33,6 @@
 import java.util.Map;
 import java.util.Set;
 
-import javax.lang.model.element.AnnotationMirror;
 import javax.lang.model.type.*;
 
 import com.sun.tools.javac.code.Symbol.*;
@@ -248,7 +246,7 @@
     public Type baseType() {
         return this;
     }
-    
+
     public boolean isAnnotated() {
         return false;
     }
@@ -781,7 +779,7 @@
             return
                 getEnclosingType().isErroneous() ||
                 isErroneous(getTypeArguments()) ||
-                this != tsym.type && tsym.type.isErroneous();
+                this != tsym.type.unannotatedType() && tsym.type.isErroneous();
         }
 
         public boolean isParameterized() {
@@ -1593,7 +1591,7 @@
                     "Can't annotate already annotated type: " + underlyingType +
                     "; adding: " + typeAnnotations);
         }
-        
+
         @Override 
         public boolean isAnnotated() {
             return true;
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Sun Feb 24 13:06:56 2013 -0800
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Sun Feb 24 16:34:39 2013 -0800
@@ -26,7 +26,6 @@
 package com.sun.tools.javac.code;
 
 import java.lang.ref.SoftReference;
-import java.util.Comparator;
 import java.util.HashSet;
 import java.util.HashMap;
 import java.util.Locale;
@@ -34,8 +33,6 @@
 import java.util.Set;
 import java.util.WeakHashMap;
 
-import javax.lang.model.type.TypeKind;
-
 import com.sun.tools.javac.code.Attribute.RetentionPolicy;
 import com.sun.tools.javac.code.Lint.LintCategory;
 import com.sun.tools.javac.code.Type.UndetVar.InferenceBound;