6765045: Remove rawtypes warnings from langtools
authormcimadamore
Tue, 13 Jan 2009 13:27:14 +0000
changeset 1789 7ac8c0815000
parent 1788 ced0a1a7ec80
child 1790 7182011ee8a6
6765045: Remove rawtypes warnings from langtools Summary: Removed all occurrences of rawtypes warnings from langtools Reviewed-by: jjg, bpatel
langtools/make/build.properties
langtools/src/share/classes/com/sun/source/util/Trees.java
langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java
langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java
langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java
langtools/src/share/classes/com/sun/tools/javac/Main.java
langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
langtools/src/share/classes/com/sun/tools/javac/util/Context.java
langtools/src/share/classes/com/sun/tools/javac/util/List.java
langtools/src/share/classes/com/sun/tools/javac/util/Pair.java
langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java
langtools/src/share/classes/com/sun/tools/javah/Gen.java
langtools/src/share/classes/com/sun/tools/javah/LLNI.java
langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java
langtools/src/share/classes/sun/tools/javap/FieldData.java
langtools/src/share/classes/sun/tools/javap/JavapPrinter.java
langtools/src/share/classes/sun/tools/javap/MethodData.java
--- a/langtools/make/build.properties	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/make/build.properties	Tue Jan 13 13:27:14 2009 +0000
@@ -66,7 +66,7 @@
 # set the following to -version to verify the versions of javac being used
 javac.version.opt = 
 # in time, there should be no exceptions to -Xlint:all
-javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast,-rawtypes
+javac.lint.opts = -Xlint:all,-deprecation,-fallthrough,-serial,-unchecked,-cast
 
 # options for the <javadoc> task for javac
 javadoc.jls3.url=http://java.sun.com/docs/books/jls/
--- a/langtools/src/share/classes/com/sun/source/util/Trees.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/source/util/Trees.java	Tue Jan 13 13:27:14 2009 +0000
@@ -74,7 +74,7 @@
             ClassLoader cl = arg.getClass().getClassLoader();
             Class<?> c = Class.forName("com.sun.tools.javac.api.JavacTrees", false, cl);
             argType = Class.forName(argType.getName(), false, cl);
-            Method m = c.getMethod("instance", new Class[] { argType });
+            Method m = c.getMethod("instance", new Class<?>[] { argType });
             return (Trees) m.invoke(null, new Object[] { arg });
         } catch (Throwable e) {
             throw new AssertionError(e);
--- a/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java	Tue Jan 13 13:27:14 2009 +0000
@@ -281,7 +281,7 @@
             // Discovery process
 
             // List of annotation processory factory instances
-            java.util.Iterator providers = null;
+            java.util.Iterator<AnnotationProcessorFactory> providers = null;
             {
                 /*
                  * If a factory is provided by the user, the
--- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/AnnotationProxyMaker.java	Tue Jan 13 13:27:14 2009 +0000
@@ -217,7 +217,7 @@
             }
         }
 
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings({"unchecked", "rawtypes"})
         public void visitEnum(Attribute.Enum e) {
             if (runtimeType.isEnum()) {
                 String constName = e.value.toString();
@@ -225,7 +225,7 @@
                     value = Enum.valueOf((Class)runtimeType, constName);
                 } catch (IllegalArgumentException ex) {
                     value = new EnumConstantNotPresentExceptionProxy(
-                                                        (Class)runtimeType, constName);
+                                                        (Class<Enum<?>>)runtimeType, constName);
                 }
             } else {
                 value = null;   // indicates a type mismatch
--- a/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/apt/mirror/declaration/Constants.java	Tue Jan 13 13:27:14 2009 +0000
@@ -130,8 +130,8 @@
                 append((EnumConstantDeclarationImpl) val);
             } else if (val instanceof AnnotationMirror) {
                 append((AnnotationMirrorImpl) val);
-            } else if (val instanceof Collection) {
-                append((Collection) val);
+            } else if (val instanceof Collection<?>) {
+                append((Collection<?>) val);
             } else {
                 appendUnquoted(val.toString());
             }
@@ -234,7 +234,7 @@
          * and separated by ", ".  Useful for array-valued annotation
          * elements.
          */
-        void append(Collection vals) {
+        void append(Collection<?> vals) {
             buf.append('{');
             boolean first = true;
             for (Object val : vals) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -95,14 +95,14 @@
      * @param unicode Unicode for which member list information to be generated.
      * @param memberlist List of members for the unicode character.
      */
-    protected void generateContents(Character unicode, List memberlist) {
+    protected void generateContents(Character unicode, List<? extends Doc> memberlist) {
         anchor("_" + unicode + "_");
         h2();
         strong(unicode.toString());
         h2End();
         dl();
         for (int i = 0; i < memberlist.size(); i++) {
-            Doc element = (Doc)memberlist.get(i);
+            Doc element = memberlist.get(i);
             if (element instanceof MemberDoc) {
                 printDescription((MemberDoc)element);
             } else if (element instanceof ClassDoc) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -317,7 +317,7 @@
      * format for listing the API. Call methods from the sub-class to complete
      * the generation.
      */
-    protected void printDeprecatedAPI(List deprmembers, String headingKey) {
+    protected void printDeprecatedAPI(List<Doc> deprmembers, String headingKey) {
         if (deprmembers.size() > 0) {
             writer.tableIndexSummary();
             writer.tableHeaderStart("#CCCCFF");
@@ -377,12 +377,12 @@
         }
     }
 
-    protected void navDetailLink(List members) {
+    protected void navDetailLink(List<?> members) {
             printNavDetailLink(members.size() > 0? true: false);
     }
 
 
-    protected void navSummaryLink(List members,
+    protected void navSummaryLink(List<?> members,
             VisibleMemberMap visibleMemberMap) {
         if (members.size() > 0) {
             printNavSummaryLink(null, true);
@@ -390,7 +390,7 @@
         } else {
             ClassDoc icd = classdoc.superclass();
             while (icd != null) {
-                List inhmembers = visibleMemberMap.getMembersFor(icd);
+                List<?> inhmembers = visibleMemberMap.getMembersFor(icd);
                 if (inhmembers.size() > 0) {
                     printNavSummaryLink(icd, true);
                     return;
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractTreeWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -96,12 +96,12 @@
      * @param list list of the sub-classes at this level.
      * @param isEnum true if we are generating a tree for enums.
      */
-    protected void generateLevelInfo(ClassDoc parent, List list,
+    protected void generateLevelInfo(ClassDoc parent, List<ClassDoc> list,
             boolean isEnum) {
         if (list.size() > 0) {
             ul();
             for (int i = 0; i < list.size(); i++) {
-                ClassDoc local = (ClassDoc)list.get(i);
+                ClassDoc local = list.get(i);
                 printPartialInfo(local);
                 printExtendsImplements(parent, local);
                 generateLevelInfo(local, classtree.subs(local, isEnum),
@@ -119,9 +119,9 @@
      * other classes in this run will derive from these classes.
      * @param heading Heading for the tree.
      */
-    protected void generateTree(List list, String heading) {
+    protected void generateTree(List<ClassDoc> list, String heading) {
         if (list.size() > 0) {
-            ClassDoc firstClassDoc = (ClassDoc)list.get(0);
+            ClassDoc firstClassDoc = list.get(0);
             printTreeHeading(heading);
             generateLevelInfo(!firstClassDoc.isInterface()? firstClassDoc : null,
                 list,
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AllClassesFrameWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -137,9 +137,9 @@
      * @param classlist Sorted list of classes.
      * @param wantFrames True if we want frames.
      */
-    protected void generateContents(List classlist, boolean wantFrames) {
+    protected void generateContents(List<Doc> classlist, boolean wantFrames) {
         for (int i = 0; i < classlist.size(); i++) {
-            ClassDoc cd = (ClassDoc)(classlist.get(i));
+            ClassDoc cd = (ClassDoc)classlist.get(i);
             if (!Util.isCoreClass(cd)) {
                 continue;
             }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -38,7 +38,7 @@
 public class ClassUseWriter extends SubWriterHolderWriter {
 
     final ClassDoc classdoc;
-    Set pkgToPackageAnnotations = null;
+    Set<PackageDoc> pkgToPackageAnnotations = null;
     final Map<String,List<ProgramElementDoc>> pkgToClassTypeParameter;
     final Map<String,List<ProgramElementDoc>> pkgToClassAnnotations;
     final Map<String,List<ProgramElementDoc>> pkgToMethodTypeParameter;
@@ -220,8 +220,8 @@
                 false)));
         tableHeaderEnd();
 
-        for (Iterator it = pkgSet.iterator(); it.hasNext();) {
-            PackageDoc pkg = (PackageDoc)it.next();
+        for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
+            PackageDoc pkg = it.next();
             generatePackageUse(pkg);
         }
         tableEnd();
@@ -240,8 +240,8 @@
             getLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS_USE_HEADER, classdoc,
                 false)));
         tableHeaderEnd();
-        for (Iterator it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
-            PackageDoc pkg = (PackageDoc)it.next();
+        for (Iterator<PackageDoc> it = pkgToPackageAnnotations.iterator(); it.hasNext();) {
+            PackageDoc pkg = it.next();
             trBgcolorStyle("white", "TableRowColor");
             summaryRow(0);
             //Just want an anchor here.
@@ -259,8 +259,8 @@
     }
 
     protected void generateClassList() throws IOException {
-        for (Iterator it = pkgSet.iterator(); it.hasNext();) {
-            PackageDoc pkg = (PackageDoc)it.next();
+        for (Iterator<PackageDoc> it = pkgSet.iterator(); it.hasNext();) {
+            PackageDoc pkg = it.next();
             anchor(pkg.name());
             tableIndexSummary();
             tableHeaderStart("#CCCCFF");
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Tue Jan 13 13:27:14 2009 +0000
@@ -355,7 +355,7 @@
                 classDoc.qualifiedName().equals("org.omg.CORBA.Object")) {
                 return;    // Don't generate the list, too huge
             }
-            List subclasses = classtree.subs(classDoc, false);
+            List<ClassDoc> subclasses = classtree.subs(classDoc, false);
             if (subclasses.size() > 0) {
                 dl();
                 dt();
@@ -371,7 +371,7 @@
      */
     public void writeSubInterfacesInfo() {
         if (classDoc.isInterface()) {
-            List subInterfaces = classtree.allSubs(classDoc, false);
+            List<ClassDoc> subInterfaces = classtree.allSubs(classDoc, false);
             if (subInterfaces.size() > 0) {
                 dl();
                 dt();
@@ -393,7 +393,7 @@
             classDoc.qualifiedName().equals("java.io.Serializable")) {
             return;   // Don't generate the list, too big
         }
-        List implcl = classtree.implementingclasses(classDoc);
+        List<ClassDoc> implcl = classtree.implementingclasses(classDoc);
         if (implcl.size() > 0) {
             dl();
             dt();
@@ -409,7 +409,7 @@
     public void writeImplementedInterfacesInfo() {
         //NOTE:  we really should be using ClassDoc.interfaceTypes() here, but
         //       it doesn't walk up the tree like we want it to.
-        List interfaceArray = Util.getAllInterfaces(classDoc, configuration);
+        List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
         if (classDoc.isClass() && interfaceArray.size() > 0) {
             dl();
             dt();
@@ -425,7 +425,7 @@
     public void writeSuperInterfacesInfo() {
         //NOTE:  we really should be using ClassDoc.interfaceTypes() here, but
         //       it doesn't walk up the tree like we want it to.
-        List interfaceArray = Util.getAllInterfaces(classDoc, configuration);
+        List<Type> interfaceArray = Util.getAllInterfaces(classDoc, configuration);
         if (classDoc.isInterface() && interfaceArray.size() > 0) {
             dl();
             dt();
@@ -438,7 +438,7 @@
     /**
      * Generate links to the given classes.
      */
-    private void writeClassLinks(int context, List list) {
+    private void writeClassLinks(int context, List<?> list) {
         Object[] typeList = list.toArray();
         //Sort the list to be printed.
         print(' ');
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Tue Jan 13 13:27:14 2009 +0000
@@ -194,10 +194,10 @@
     /**
      * {@inheritDoc}
      */
-    public void writeConstantMembers(ClassDoc cd, List fields) {
+    public void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields) {
         currentClassDoc = cd;
         for (int i = 0; i < fields.size(); ++i) {
-            writeConstantMember((FieldDoc)(fields.get(i)));
+            writeConstantMember(fields.get(i));
         }
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Tue Jan 13 13:27:14 2009 +0000
@@ -238,7 +238,7 @@
         return VisibleMemberMap.CONSTRUCTORS;
     }
 
-    protected void navSummaryLink(List members) {
+    protected void navSummaryLink(List<?> members) {
         printNavSummaryLink(classdoc,
                 members.size() > 0? true: false);
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -1728,13 +1728,13 @@
      * @param descList the array of {@link AnnotationDesc}.
      */
     private boolean writeAnnotationInfo(int indent, Doc doc, AnnotationDesc[] descList, boolean lineBreak) {
-        List annotations = getAnnotations(indent, descList, lineBreak);
+        List<String> annotations = getAnnotations(indent, descList, lineBreak);
         if (annotations.size() == 0) {
             return false;
         }
         fontNoNewLine("-1");
-        for (Iterator iter = annotations.iterator(); iter.hasNext();) {
-            print((String) iter.next());
+        for (Iterator<String> iter = annotations.iterator(); iter.hasNext();) {
+            print(iter.next());
         }
         fontEnd();
         return true;
@@ -1792,8 +1792,8 @@
                         annotationTypeValues.add(annotationValue);
                     }
                     annotation.append(annotationTypeValues.size() == 1 ? "" : "{");
-                    for (Iterator iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
-                        annotation.append(annotationValueToString((AnnotationValue) iter.next()));
+                    for (Iterator<AnnotationValue> iter = annotationTypeValues.iterator(); iter.hasNext(); ) {
+                        annotation.append(annotationValueToString(iter.next()));
                         annotation.append(iter.hasNext() ? "," : "");
                     }
                     annotation.append(annotationTypeValues.size() == 1 ? "" : "}");
@@ -1820,11 +1820,11 @@
                 return type.typeName() + type.dimension() + ".class";
             }
         } else if (annotationValue.value() instanceof AnnotationDesc) {
-            List list = getAnnotations(0,
+            List<String> list = getAnnotations(0,
                 new AnnotationDesc[]{(AnnotationDesc) annotationValue.value()},
                     false);
             StringBuffer buf = new StringBuffer();
-            for (Iterator iter = list.iterator(); iter.hasNext(); ) {
+            for (Iterator<String> iter = list.iterator(); iter.hasNext(); ) {
                 buf.append(iter.next());
             }
             return buf.toString();
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -51,7 +51,7 @@
         super(writer, classdoc);
     }
 
-    public List members(ClassDoc cd) {
+    public List<FieldDoc> members(ClassDoc cd) {
         return Util.asList(cd.serializableFields());
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -49,7 +49,7 @@
      * The classes to be documented.  Use this to filter out classes
      * that will not be documented.
      */
-    private Set documentedClasses;
+    private Set<ClassDoc> documentedClasses;
 
     /**
      * The name of the output file.
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -54,7 +54,7 @@
     /**
      * List to store the order groups as specified on the command line.
      */
-    private List groupList;
+    private List<String> groupList;
 
     /**
      * Construct the PackageIndexWriter. Also constructs the grouping
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -63,8 +63,8 @@
             ClassDoc usedClass = content[i];
             Set<ClassDoc> usingClasses = mapper.classToClass.get(usedClass.qualifiedName());
             if (usingClasses != null) {
-                for (Iterator it = usingClasses.iterator(); it.hasNext(); ) {
-                    ClassDoc usingClass = (ClassDoc)it.next();
+                for (Iterator<ClassDoc> it = usingClasses.iterator(); it.hasNext(); ) {
+                    ClassDoc usingClass = it.next();
                     PackageDoc usingPackage = usingClass.containingPackage();
                     Set<ClassDoc> usedClasses = usingPackageToUsedClasses
                         .get(usingPackage.name());
@@ -136,9 +136,9 @@
         printText("doclet.ClassUse_Packages.that.use.0",
             getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false));
         tableHeaderEnd();
-        Iterator it = usingPackageToUsedClasses.keySet().iterator();
+        Iterator<String> it = usingPackageToUsedClasses.keySet().iterator();
         while (it.hasNext()) {
-            PackageDoc pkg = configuration.root.packageNamed((String)it.next());
+            PackageDoc pkg = configuration.root.packageNamed(it.next());
             generatePackageUse(pkg);
         }
         tableEnd();
@@ -147,9 +147,9 @@
     }
 
     protected void generateClassList() throws IOException {
-        Iterator itp = usingPackageToUsedClasses.keySet().iterator();
+        Iterator<String> itp = usingPackageToUsedClasses.keySet().iterator();
         while (itp.hasNext()) {
-            String packageName = (String)itp.next();
+            String packageName = itp.next();
             PackageDoc usingPackage = configuration.root.packageNamed(packageName);
             if (usingPackage != null) {
                 anchor(usingPackage.name());
@@ -160,11 +160,10 @@
                 getPackageLink(pkgdoc, Util.getPackageName(pkgdoc), false),
                 getPackageLink(usingPackage,Util.getPackageName(usingPackage), false));
             tableHeaderEnd();
-            Iterator itc =
-                ((Collection)usingPackageToUsedClasses.get(packageName))
-                .iterator();
+            Iterator<ClassDoc> itc =
+                    usingPackageToUsedClasses.get(packageName).iterator();
             while (itc.hasNext()) {
-                printClassRow((ClassDoc)itc.next(), packageName);
+                printClassRow(itc.next(), packageName);
             }
             tableEnd();
             space();
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Tue Jan 13 13:27:14 2009 +0000
@@ -441,13 +441,13 @@
      * @param customTagStrs the set two dimentional arrays of strings.  These arrays contain
      * either -tag or -taglet arguments.
      */
-    private void initTagletManager(Set customTagStrs) {
+    private void initTagletManager(Set<String[]> customTagStrs) {
         tagletManager = tagletManager == null ?
             new TagletManager(nosince, showversion, showauthor, message) :
             tagletManager;
         String[] args;
-        for (Iterator it = customTagStrs.iterator(); it.hasNext(); ) {
-            args = (String[]) it.next();
+        for (Iterator<String[]> it = customTagStrs.iterator(); it.hasNext(); ) {
+            args = it.next();
             if (args[0].equals("-taglet")) {
                 tagletManager.addCustomTag(args[1], tagletpath);
                 continue;
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/ConstantsSummaryWriter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -103,7 +103,7 @@
      * @param cd the class whose constants are being documented.
      * @param fields the constants being documented.
      */
-    public abstract void writeConstantMembers(ClassDoc cd, List fields);
+    public abstract void writeConstantMembers(ClassDoc cd, List<FieldDoc> fields);
 
     /**
      * Document the given constants.
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -97,22 +97,22 @@
      * @param elements the XML elements that specify which components to
      *                 document.
      */
-    protected void build(List elements) {
+    protected void build(List<?> elements) {
         for (int i = 0; i < elements.size(); i++ ) {
             Object element = elements.get(i);
             String component = (String)
                 ((element instanceof String) ?
                      element :
-                    ((List) element).get(0));
+                    ((List<?>) element).get(0));
             try {
                 invokeMethod("build" + component,
                     element instanceof String ?
-                        new Class[] {} :
-                        new Class[] {List.class},
+                        new Class<?>[] {} :
+                        new Class<?>[] {List.class},
                     element instanceof String ?
                         new Object[] {} :
-                        new Object[] {((List) element).subList(1,
-                            ((List) element).size())});
+                        new Object[] {((List<?>) element).subList(1,
+                            ((List<?>) element).size())});
             } catch (NoSuchMethodException e) {
                 e.printStackTrace();
                 configuration.root.printError("Unknown element: " + component);
@@ -138,7 +138,7 @@
      * @param paramClasses the types for each parameter.
      * @param params       the parameters of the method.
      */
-    protected abstract void invokeMethod(String methodName, Class[] paramClasses,
+    protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception;
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -69,7 +69,7 @@
      *
      * @param elements {@inheritDoc}
      */
-    public void build(List elements) {
+    public void build(List<?> elements) {
         if (hasMembersToDocument()) {
             super.build(elements);
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -92,7 +92,7 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class[] paramClasses,
+    public void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception {
         if (DEBUG) {
@@ -122,7 +122,7 @@
       *
       * @param elements the XML elements that specify how to document a class.
       */
-     public void buildAnnotationTypeDoc(List elements) throws Exception {
+     public void buildAnnotationTypeDoc(List<?> elements) throws Exception {
         build(elements);
         writer.close();
         copyDocFiles();
@@ -197,7 +197,7 @@
      * @param elements the XML elements that specify how a member summary is
      *                 documented.
      */
-    public void buildMemberSummary(List elements) throws Exception {
+    public void buildMemberSummary(List<?> elements) throws Exception {
         configuration.getBuilderFactory().
             getMemberSummaryBuilder(writer).build(elements);
         writer.completeMemberSummaryBuild();
@@ -209,7 +209,7 @@
      * @param elements the XML elements that specify how a annotation type
      *                 members are documented.
      */
-    public void buildAnnotationTypeOptionalMemberDetails(List elements)
+    public void buildAnnotationTypeOptionalMemberDetails(List<?> elements)
     throws Exception {
         configuration.getBuilderFactory().
             getAnnotationTypeOptionalMemberBuilder(writer).build(elements);
@@ -221,7 +221,7 @@
      * @param elements the XML elements that specify how a annotation type
      *                 members are documented.
      */
-    public void buildAnnotationTypeRequiredMemberDetails(List elements)
+    public void buildAnnotationTypeRequiredMemberDetails(List<?> elements)
     throws Exception {
         configuration.getBuilderFactory().
             getAnnotationTypeRequiredMemberBuilder(writer).build(elements);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -95,7 +95,7 @@
      * @param elements the XML elements that specify how to construct this
      *                documentation.
      */
-    public void buildAnnotationTypeOptionalMember(List elements) {
+    public void buildAnnotationTypeOptionalMember(List<?> elements) {
         if (writer == null) {
             return;
         }
@@ -108,7 +108,7 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class[] paramClasses,
+    public void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception {
         if (DEBUG) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -116,7 +116,7 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class[] paramClasses,
+    public void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception {
         if (DEBUG) {
@@ -135,7 +135,7 @@
      * @param classDoc the {@link ClassDoc} we want to check.
      * @return a list of members that will be documented.
      */
-    public List members(ClassDoc classDoc) {
+    public List<ProgramElementDoc> members(ClassDoc classDoc) {
         return visibleMemberMap.getMembersFor(classDoc);
     }
 
@@ -161,7 +161,7 @@
      * @param elements the XML elements that specify how to construct this
      *                documentation.
      */
-    public void buildAnnotationTypeRequiredMember(List elements) {
+    public void buildAnnotationTypeRequiredMember(List<?> elements) {
         if (writer == null) {
             return;
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -108,7 +108,7 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class[] paramClasses,
+    public void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception {
         if (DEBUG) {
@@ -138,7 +138,7 @@
       *
       * @param elements the XML elements that specify how to document a class.
       */
-     public void buildClassDoc(List elements) throws Exception {
+     public void buildClassDoc(List<?> elements) throws Exception {
         build(elements);
         writer.close();
         copyDocFiles();
@@ -293,7 +293,7 @@
      * @param elements the XML elements that specify how a member summary is
      *                 documented.
      */
-    public void buildMemberSummary(List elements) throws Exception {
+    public void buildMemberSummary(List<?> elements) throws Exception {
         configuration.getBuilderFactory().
             getMemberSummaryBuilder(writer).build(elements);
         writer.completeMemberSummaryBuild();
@@ -305,7 +305,7 @@
      * @param elements the XML elements that specify how a enum constants are
      *                 documented.
      */
-    public void buildEnumConstantsDetails(List elements) throws Exception {
+    public void buildEnumConstantsDetails(List<?> elements) throws Exception {
         configuration.getBuilderFactory().
             getEnumConstantsBuilder(writer).build(elements);
     }
@@ -315,7 +315,7 @@
      *
      * @param elements the XML elements that specify how a field is documented.
      */
-    public void buildFieldDetails(List elements) throws Exception {
+    public void buildFieldDetails(List<?> elements) throws Exception {
         configuration.getBuilderFactory().
             getFieldBuilder(writer).build(elements);
     }
@@ -326,7 +326,7 @@
      * @param elements the XML elements that specify how to document a
      * constructor.
      */
-    public void buildConstructorDetails(List elements) throws Exception {
+    public void buildConstructorDetails(List<?> elements) throws Exception {
         configuration.getBuilderFactory().
             getConstructorBuilder(writer).build(elements);
     }
@@ -336,7 +336,7 @@
      *
      * @param elements the XML elements that specify how a method is documented.
      */
-    public void buildMethodDetails(List elements) throws Exception {
+    public void buildMethodDetails(List<?> elements) throws Exception {
         configuration.getBuilderFactory().
                 getMethodBuilder(writer).build(elements);
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -109,7 +109,7 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class[] paramClasses,
+    public void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception {
         if (DEBUG) {
@@ -144,7 +144,7 @@
      * @param elements the list of elements describing constant summary
      *                 documentation.
      */
-    public void buildConstantSummary(List elements) throws Exception {
+    public void buildConstantSummary(List<?> elements) throws Exception {
         build(elements);
         writer.close();
     }
@@ -186,7 +186,7 @@
      * @param elements the XML elements that represent the components
      *                 of documentation for each package.
      */
-    public void buildConstantSummaries(List elements) {
+    public void buildConstantSummaries(List<?> elements) {
         PackageDoc[] packages = configuration.packages;
         printedPackageHeaders = new HashSet<String>();
         for (int i = 0; i < packages.length; i++) {
@@ -204,7 +204,7 @@
      * @param elements the list of XML elements that make up package
      *                 documentation.
      */
-    public void buildPackageConstantSummary(List elements) {
+    public void buildPackageConstantSummary(List<?> elements) {
         build(elements);
     }
 
@@ -214,7 +214,7 @@
      * @param elements the list of XML elements that make up the class
      *                 constant summary.
      */
-    public void buildClassConstantSummary(List elements) {
+    public void buildClassConstantSummary(List<?> elements) {
         ClassDoc[] classes = currentPackage.name().length() > 0 ?
             currentPackage.allClasses() :
             configuration.classDocCatalog.allClasses(
@@ -297,8 +297,8 @@
     private boolean hasConstantField (ClassDoc classDoc) {
         VisibleMemberMap visibleMemberMapFields = new VisibleMemberMap(classDoc,
             VisibleMemberMap.FIELDS, configuration.nodeprecated);
-        List fields = visibleMemberMapFields.getLeafClassMembers(configuration);
-        for (Iterator iter = fields.iterator(); iter.hasNext(); ) {
+        List<?> fields = visibleMemberMapFields.getLeafClassMembers(configuration);
+        for (Iterator<?> iter = fields.iterator(); iter.hasNext(); ) {
             FieldDoc field = (FieldDoc) iter.next();
             if (field.constantValueExpression() != null) {
                 classDocsWithConstFields.add(classDoc);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -138,7 +138,7 @@
          */
         public void invokeMethod(
                 String methodName,
-                Class[] paramClasses,
+                Class<?>[] paramClasses,
                 Object[] params)
                 throws Exception {
                 if (DEBUG) {
@@ -156,7 +156,7 @@
          *
          * @return a list of constructors that will be documented.
          */
-        public List members(ClassDoc classDoc) {
+        public List<ProgramElementDoc> members(ClassDoc classDoc) {
                 return visibleMemberMap.getMembersFor(classDoc);
         }
 
@@ -175,7 +175,7 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildConstructorDoc(List elements) {
+        public void buildConstructorDoc(List<?> elements) {
                 if (writer == null) {
                         return;
                 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -120,7 +120,7 @@
          */
         public void invokeMethod(
                 String methodName,
-                Class[] paramClasses,
+                Class<?>[] paramClasses,
                 Object[] params)
                 throws Exception {
                 if (DEBUG) {
@@ -139,7 +139,7 @@
          * @param classDoc the {@link ClassDoc} we want to check.
          * @return a list of enum constants that will be documented.
          */
-        public List members(ClassDoc classDoc) {
+        public List<ProgramElementDoc> members(ClassDoc classDoc) {
                 return visibleMemberMap.getMembersFor(classDoc);
         }
 
@@ -165,7 +165,7 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildEnumConstant(List elements) {
+        public void buildEnumConstant(List<?> elements) {
                 if (writer == null) {
                         return;
                 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -121,7 +121,7 @@
          */
         public void invokeMethod(
                 String methodName,
-                Class[] paramClasses,
+                Class<?>[] paramClasses,
                 Object[] params)
                 throws Exception {
                 if (DEBUG) {
@@ -140,7 +140,7 @@
          * @param classDoc the {@link ClassDoc} we want to check.
          * @return a list of fields that will be documented.
          */
-        public List members(ClassDoc classDoc) {
+        public List<ProgramElementDoc> members(ClassDoc classDoc) {
                 return visibleMemberMap.getMembersFor(classDoc);
         }
 
@@ -166,7 +166,7 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildFieldDoc(List elements) {
+        public void buildFieldDoc(List<?> elements) {
                 if (writer == null) {
                         return;
                 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java	Tue Jan 13 13:27:14 2009 +0000
@@ -78,9 +78,9 @@
      *
      * @return List the list of XML elements parsed.
      */
-    public List parseXML(String root) {
+    public List<?> parseXML(String root) {
         if (xmlElementsMap.containsKey(root)) {
-            return (List) xmlElementsMap.get(root);
+            return xmlElementsMap.get(root);
         }
         try {
             List<Object> xmlElements = new ArrayList<Object>();
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -170,7 +170,7 @@
          * @return a list of methods that will be documented.
          * @see VisibleMemberMap
          */
-        public List members(int type) {
+        public List<ProgramElementDoc> members(int type) {
                 return visibleMemberMaps[type].getLeafClassMembers(configuration);
         }
 
@@ -179,7 +179,7 @@
          */
         public void invokeMethod(
                 String methodName,
-                Class[] paramClasses,
+                Class<?>[] paramClasses,
                 Object[] params)
                 throws Exception {
                 if (DEBUG) {
@@ -339,9 +339,9 @@
      */
         private void buildInheritedSummary(MemberSummaryWriter writer,
             VisibleMemberMap visibleMemberMap) {
-        for (Iterator iter = visibleMemberMap.getVisibleClassesList().iterator();
+        for (Iterator<ClassDoc> iter = visibleMemberMap.getVisibleClassesList().iterator();
                 iter.hasNext();) {
-            ClassDoc inhclass = (ClassDoc) (iter.next());
+            ClassDoc inhclass = iter.next();
             if (! (inhclass.isPublic() ||
                 Util.isLinkable(inhclass, configuration))) {
                 continue;
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -116,7 +116,7 @@
          */
         public void invokeMethod(
                 String methodName,
-                Class[] paramClasses,
+                Class<?>[] paramClasses,
                 Object[] params)
                 throws Exception {
                 if (DEBUG) {
@@ -135,7 +135,7 @@
          * @param classDoc the {@link ClassDoc} we want to check.
          * @return a list of methods that will be documented.
          */
-        public List members(ClassDoc classDoc) {
+        public List<ProgramElementDoc> members(ClassDoc classDoc) {
                 return visibleMemberMap.getMembersFor(classDoc);
         }
 
@@ -158,7 +158,7 @@
         /**
          * Build the method documentation.
          */
-        public void buildMethodDoc(List elements) {
+        public void buildMethodDoc(List<?> elements) {
                 if (writer == null) {
                         return;
                 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -88,7 +88,7 @@
          */
         public void invokeMethod(
                 String methodName,
-                Class[] paramClasses,
+                Class<?>[] paramClasses,
                 Object[] params)
                 throws Exception {
                 if (DEBUG) {
@@ -120,7 +120,7 @@
         /**
          * Build the package documentation.
          */
-        public void buildPackageDoc(List elements) throws Exception {
+        public void buildPackageDoc(List<?> elements) throws Exception {
                 build(elements);
                 packageWriter.close();
                 Util.copyDocFiles(
@@ -162,7 +162,7 @@
         /**
          * Build the package summary.
          */
-        public void buildSummary(List elements) {
+        public void buildSummary(List<?> elements) {
                 build(elements);
         }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -130,7 +130,7 @@
     /**
      * Build the serialized form.
      */
-    public void buildSerializedForm(List elements) throws Exception {
+    public void buildSerializedForm(List<?> elements) throws Exception {
         build(elements);
         writer.close();
     }
@@ -138,7 +138,7 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class[] paramClasses,
+    public void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
     throws Exception {
         if (DEBUG) {
@@ -159,7 +159,7 @@
     /**
      * Build the contents.
      */
-    public void buildSerializedFormSummaries(List elements) {
+    public void buildSerializedFormSummaries(List<?> elements) {
         PackageDoc[] packages = configuration.packages;
         for (int i = 0; i < packages.length; i++) {
             currentPackage = packages[i];
@@ -170,7 +170,7 @@
     /**
      * Build the package serialized for for the current package being processed.
      */
-    public void buildPackageSerializedForm(List elements) {
+    public void buildPackageSerializedForm(List<?> elements) {
         String foo = currentPackage.name();
         ClassDoc[] classes = currentPackage.allClasses(false);
         if (classes == null || classes.length == 0) {
@@ -189,7 +189,7 @@
         writer.writePackageHeader(Util.getPackageName(currentPackage));
     }
 
-    public void buildClassSerializedForm(List elements) {
+    public void buildClassSerializedForm(List<?> elements) {
         ClassDoc[] classes = currentPackage.allClasses(false);
         Arrays.sort(classes);
         for (int j = 0; j < classes.length; j++) {
@@ -368,7 +368,7 @@
     /**
      * build the information for the method.
      */
-    public void buildMethodInfo(List elements)  {
+    public void buildMethodInfo(List<?> elements)  {
         if(configuration.nocomment){
             return;
         }
@@ -478,7 +478,7 @@
      * Build the summaries for the methods that belong to the given
      * class.
      */
-    public void buildSerializableMethods(List elements) {
+    public void buildSerializableMethods(List<?> elements) {
         MemberDoc[] members = currentClass.serializationMethods();
         if (members.length > 0) {
             for (int i = 0; i < members.length; i++) {
@@ -492,7 +492,7 @@
      * Build the summaries for the fields that belong to the given
      * class.
      */
-    public void buildSerializableFields(List elements) {
+    public void buildSerializableFields(List<?> elements) {
         MemberDoc[] members = currentClass.serializableFields();
         if (members.length > 0) {
             for (int i = 0; i < members.length; i++) {
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ParamTaglet.java	Tue Jan 13 13:27:14 2009 +0000
@@ -100,7 +100,7 @@
         }
         ParamTag[] tags = input.isTypeVariableParamTag ?
             input.method.typeParamTags() : input.method.paramTags();
-        Map rankMap = getRankMap(input.isTypeVariableParamTag ?
+        Map<String, String> rankMap = getRankMap(input.isTypeVariableParamTag ?
             (Object[]) input.method.typeParameters() :
             (Object[]) input.method.parameters());
         for (int i = 0; i < tags.length; i++) {
@@ -262,7 +262,7 @@
      * @return the TagletOutput representation of this <code>Tag</code>.
      */
     private TagletOutput processParamTags(boolean isNonTypeParams,
-            ParamTag[] paramTags, Map rankMap, TagletWriter writer,
+            ParamTag[] paramTags, Map<String, String> rankMap, TagletWriter writer,
             Set<String> alreadyDocumented) {
         TagletOutput result = writer.getOutputInstance();
         if (paramTags.length > 0) {
@@ -277,7 +277,7 @@
                             "doclet.Type_Parameters_warn",
                         paramName);
                 }
-                String rank = (String) rankMap.get(pt.parameterName());
+                String rank = rankMap.get(pt.parameterName());
                 if (rank != null && alreadyDocumented.contains(rank)) {
                     writer.getMsgRetriever().warning(pt.position(),
                        isNonTypeParams ?
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletManager.java	Tue Jan 13 13:27:14 2009 +0000
@@ -212,7 +212,7 @@
             URLClassLoader appClassLoader = new URLClassLoader(pathToURLs(cpString));
             customTagClass = appClassLoader.loadClass(classname);
             Method meth = customTagClass.getMethod("register",
-                                                   new Class[] {Class.forName("java.util.Map")});
+                                                   new Class<?>[] {java.util.Map.class});
             Object[] list = customTags.values().toArray();
             Taglet lastTag = (list != null && list.length > 0)
                 ? (Taglet) list[list.length-1] : null;
@@ -705,9 +705,9 @@
      * Initialize lowercase version of standard Javadoc tags.
      */
     private void initStandardTagsLowercase() {
-        Iterator it = standardTags.iterator();
+        Iterator<String> it = standardTags.iterator();
         while (it.hasNext()) {
-            standardTagsLowercase.add(((String)it.next()).toLowerCase());
+            standardTagsLowercase.add(it.next().toLowerCase());
         }
     }
 
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java	Tue Jan 13 13:27:14 2009 +0000
@@ -177,9 +177,9 @@
                 bases.add(cd);
             }
         }
-        List intfacs = Util.getAllInterfaces(cd, configuration);
-        for (Iterator iter = intfacs.iterator(); iter.hasNext();) {
-            add(implementingclasses, ((Type) iter.next()).asClassDoc(), cd);
+        List<Type> intfacs = Util.getAllInterfaces(cd, configuration);
+        for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext();) {
+            add(implementingclasses, iter.next().asClassDoc(), cd);
         }
     }
 
@@ -278,13 +278,13 @@
 
         //If class x implements a subinterface of cd, then it follows
         //that class x implements cd.
-        Iterator implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
+        Iterator<ClassDoc> implementingClassesIter, subInterfacesIter = subinterfaces.listIterator();
         ClassDoc c;
         while(subInterfacesIter.hasNext()){
-            implementingClassesIter = implementingclasses((ClassDoc)
+            implementingClassesIter = implementingclasses(
                     subInterfacesIter.next()).listIterator();
             while(implementingClassesIter.hasNext()){
-                c = (ClassDoc)implementingClassesIter.next();
+                c = implementingClassesIter.next();
                 if(! result.contains(c)){
                     result.add(c);
                 }
@@ -328,9 +328,9 @@
         List<ClassDoc> list = subs(cd, isEnum);
         for (int i = 0; i < list.size(); i++) {
             cd = list.get(i);
-            List tlist = subs(cd, isEnum);
+            List<ClassDoc> tlist = subs(cd, isEnum);
             for (int j = 0; j < tlist.size(); j++) {
-                ClassDoc tcd = (ClassDoc)tlist.get(j);
+                ClassDoc tcd = tlist.get(j);
                 if (!list.contains(tcd)) {
                     list.add(tcd);
                 }
@@ -345,7 +345,7 @@
      *  thw classdoc for java.lang.Object, since this is the base class for all
      *  classes.
      */
-    public List baseclasses() {
+    public List<ClassDoc> baseclasses() {
         return baseclasses;
     }
 
@@ -353,7 +353,7 @@
      *  Return the list of base interfaces. This is the list of interfaces
      *  which do not have super-interface.
      */
-    public List baseinterfaces() {
+    public List<ClassDoc> baseinterfaces() {
         return baseinterfaces;
     }
 
@@ -361,7 +361,7 @@
      *  Return the list of base enums. This is the list of enums
      *  which do not have super-enums.
      */
-    public List baseEnums() {
+    public List<ClassDoc> baseEnums() {
         return baseEnums;
     }
 
@@ -369,7 +369,7 @@
      *  Return the list of base annotation types. This is the list of
      *  annotation types which do not have super-annotation types.
      */
-    public List baseAnnotationTypes() {
+    public List<ClassDoc> baseAnnotationTypes() {
         return baseAnnotationTypes;
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassUseMapper.java	Tue Jan 13 13:27:14 2009 +0000
@@ -184,12 +184,12 @@
         this.classtree = classtree;
 
         // Map subclassing, subinterfacing implementing, ...
-        for (Iterator it = classtree.baseclasses().iterator(); it.hasNext();) {
-            subclasses((ClassDoc)it.next());
+        for (Iterator<ClassDoc> it = classtree.baseclasses().iterator(); it.hasNext();) {
+            subclasses(it.next());
         }
-        for (Iterator it = classtree.baseinterfaces().iterator(); it.hasNext();) {
+        for (Iterator<ClassDoc> it = classtree.baseinterfaces().iterator(); it.hasNext();) {
             // does subinterfacing as side-effect
-            implementingClasses((ClassDoc)it.next());
+            implementingClasses(it.next());
         }
         // Map methods, fields, constructors using a class.
         ClassDoc[] classes = root.classes();
@@ -279,12 +279,12 @@
             List<ClassDoc> impl = classtree.implementingclasses(cd);
             if (impl != null) {
                 ret.addAll(impl);
-                for (Iterator it = impl.iterator(); it.hasNext();) {
-                    ret.addAll(subclasses((ClassDoc)it.next()));
+                for (Iterator<ClassDoc> it = impl.iterator(); it.hasNext();) {
+                    ret.addAll(subclasses(it.next()));
                 }
             }
-            for (Iterator it = subinterfaces(cd).iterator(); it.hasNext();) {
-                ret.addAll(implementingClasses((ClassDoc)it.next()));
+            for (Iterator<ClassDoc> it = subinterfaces(cd).iterator(); it.hasNext();) {
+                ret.addAll(implementingClasses(it.next()));
             }
             addAll(classToImplementingClass, cd, ret);
         }
@@ -328,8 +328,7 @@
     private <T> List<T> refList(Map<String,List<T>> map, ClassDoc cd) {
         List<T> list = map.get(cd.qualifiedName());
         if (list == null) {
-            @SuppressWarnings("unchecked")
-            List<T> l = new ArrayList();
+            List<T> l = new ArrayList<T>();
             list = l;
             map.put(cd.qualifiedName(), list);
         }
@@ -348,8 +347,7 @@
     private Set<ClassDoc> classSet(ClassDoc cd) {
         Set<ClassDoc> clsSet = classToClass.get(cd.qualifiedName());
         if (clsSet == null) {
-            @SuppressWarnings("unchecked")
-            Set<ClassDoc> s = new TreeSet();
+            Set<ClassDoc> s = new TreeSet<ClassDoc>();
             clsSet = s;
             classToClass.put(cd.qualifiedName(), clsSet);
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Group.java	Tue Jan 13 13:27:14 2009 +0000
@@ -152,7 +152,7 @@
      *
      * @return true if package name format found in the map, else false.
      */
-    boolean foundGroupFormat(Map map, String pkgFormat) {
+    boolean foundGroupFormat(Map<String,?> map, String pkgFormat) {
         if (map.containsKey(pkgFormat)) {
             configuration.message.error("doclet.Same_package_name_used", pkgFormat);
             return true;
@@ -239,7 +239,7 @@
      * Return the list of groups, in the same order as specified
      * on the command line.
      */
-    public List getGroupList() {
+    public List<String> getGroupList() {
         return groupList;
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ImplementedMethods.java	Tue Jan 13 13:27:14 2009 +0000
@@ -86,9 +86,9 @@
      * from the array passed.
      */
     private void buildImplementedMethodList(boolean sort) {
-        List intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
-        for (Iterator iter = intfacs.iterator(); iter.hasNext(); ) {
-            Type interfaceType = (Type) iter.next();
+        List<Type> intfacs = Util.getAllInterfaces(classdoc, configuration, sort);
+        for (Iterator<Type> iter = intfacs.iterator(); iter.hasNext(); ) {
+            Type interfaceType = iter.next();
             MethodDoc found = Util.findMethod(interfaceType.asClassDoc(), method);
             if (found != null) {
                 removeOverriddenMethod(found);
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Tue Jan 13 13:27:14 2009 +0000
@@ -114,7 +114,7 @@
         this.noDeprecated = noDeprecated;
         this.classesOnly = classesOnly;
         buildIndexMap(configuration.root);
-        Set set = indexmap.keySet();
+        Set<Character> set = indexmap.keySet();
         elements =  set.toArray();
         Arrays.sort(elements);
     }
@@ -215,7 +215,7 @@
      *
      * @return Map index map.
      */
-    public Map getIndexMap() {
+    public Map<Character,List<Doc>> getIndexMap() {
         return indexmap;
     }
 
@@ -225,8 +225,8 @@
      * @param index index Unicode character.
      * @return List member list for specific Unicode character.
      */
-    public List getMemberList(Character index) {
-        return (List)indexmap.get(index);
+    public List<Doc> getMemberList(Character index) {
+        return indexmap.get(index);
     }
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Tue Jan 13 13:27:14 2009 +0000
@@ -88,10 +88,10 @@
     /**
      * Return the list of ProgramElementDoc objects as Array.
      */
-    public static ProgramElementDoc[] toProgramElementDocArray(List list) {
+    public static ProgramElementDoc[] toProgramElementDocArray(List<ProgramElementDoc> list) {
         ProgramElementDoc[] pgmarr = new ProgramElementDoc[list.size()];
         for (int i = 0; i < list.size(); i++) {
-            pgmarr[i] = (ProgramElementDoc)(list.get(i));
+            pgmarr[i] = list.get(i);
         }
         return pgmarr;
     }
@@ -416,9 +416,9 @@
                 continue;
             }
             results.put(interfaceClassDoc, interfaceType);
-            List superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
-            for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) {
-                Type t = (Type) iter.next();
+            List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration, sort);
+            for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
+                Type t = iter.next();
                 results.put(t.asClassDoc(), t);
             }
         }
@@ -438,7 +438,7 @@
         return resultsList;
     }
 
-    public static List getAllInterfaces(Type type, Configuration configuration) {
+    public static List<Type> getAllInterfaces(Type type, Configuration configuration) {
         return getAllInterfaces(type, configuration, true);
     }
 
@@ -480,9 +480,9 @@
             if (raw)
                 interfaceType = interfaceType.asClassDoc();
             results.put(interfaceClassDoc, interfaceType);
-            List superInterfaces = getAllInterfaces(interfaceType, configuration);
-            for (Iterator iter = superInterfaces.iterator(); iter.hasNext(); ) {
-                Type superInterface = (Type) iter.next();
+            List<Type> superInterfaces = getAllInterfaces(interfaceType, configuration);
+            for (Iterator<Type> iter = superInterfaces.iterator(); iter.hasNext(); ) {
+                Type superInterface = iter.next();
                 results.put(superInterface.asClassDoc(), superInterface);
             }
         }
@@ -495,8 +495,8 @@
     }
 
 
-    public static List<ProgramElementDoc> asList(ProgramElementDoc[] members) {
-        List<ProgramElementDoc> list = new ArrayList<ProgramElementDoc>();
+    public static <T extends ProgramElementDoc> List<T> asList(T[] members) {
+        List<T> list = new ArrayList<T>();
         for (int i = 0; i < members.length; i++) {
             list.add(members[i]);
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Tue Jan 13 13:27:14 2009 +0000
@@ -116,7 +116,7 @@
      *
      * @return the list of visible classes in this map.
      */
-    public List getVisibleClassesList() {
+    public List<ClassDoc> getVisibleClassesList() {
         sort(visibleClasses);
         return visibleClasses;
     }
@@ -130,8 +130,8 @@
      */
     private List<ProgramElementDoc> getInheritedPackagePrivateMethods(Configuration configuration) {
         List<ProgramElementDoc> results = new ArrayList<ProgramElementDoc>();
-        for (Iterator iter = visibleClasses.iterator(); iter.hasNext(); ) {
-            ClassDoc currentClass = (ClassDoc) iter.next();
+        for (Iterator<ClassDoc> iter = visibleClasses.iterator(); iter.hasNext(); ) {
+            ClassDoc currentClass = iter.next();
             if (currentClass != classdoc &&
                 currentClass.isPackagePrivate() &&
                 !Util.isLinkable(currentClass, configuration)) {
@@ -203,10 +203,10 @@
         }
     }
 
-    private void purgeMemberLevelMap(List list, String level) {
+    private void purgeMemberLevelMap(List<ProgramElementDoc> list, String level) {
         for (int i = 0; i < list.size(); i++) {
-            Object key = getMemberKey((ProgramElementDoc)list.get(i));
-            Map memberLevelMap = (Map) memberNameMap.get(key);
+            Object key = getMemberKey(list.get(i));
+            Map<ProgramElementDoc, String> memberLevelMap = memberNameMap.get(key);
             if (level.equals(memberLevelMap.get(list.get(i))))
                 memberLevelMap.remove(list.get(i));
         }
@@ -230,7 +230,7 @@
         }
 
         public boolean isEqual(MethodDoc member) {
-            for (Iterator iter = members.iterator(); iter.hasNext(); ) {
+            for (Iterator<ProgramElementDoc> iter = members.iterator(); iter.hasNext(); ) {
                 MethodDoc member2 = (MethodDoc) iter.next();
                 if (Util.executableMembersEqual(member, member2)) {
                     members.add(member);
@@ -438,9 +438,9 @@
             return targetMembers.toArray(new AnnotationTypeElementDoc[]{});
         }
 
-        private boolean found(List list, ProgramElementDoc elem) {
+        private boolean found(List<ProgramElementDoc> list, ProgramElementDoc elem) {
             for (int i = 0; i < list.size(); i++) {
-                ProgramElementDoc pgmelem = (ProgramElementDoc)list.get(i);
+                ProgramElementDoc pgmelem = list.get(i);
                 if (Util.matches(pgmelem, elem)) {
                     return true;
                 }
@@ -455,13 +455,13 @@
          * level "111".
          */
         private boolean isOverridden(ProgramElementDoc pgmdoc, String level) {
-            Map memberLevelMap = (Map) memberNameMap.get(getMemberKey(pgmdoc));
+            Map<?,String> memberLevelMap = (Map<?,String>) memberNameMap.get(getMemberKey(pgmdoc));
             if (memberLevelMap == null)
                 return false;
             String mappedlevel = null;
-            Iterator iterator = memberLevelMap.values().iterator();
+            Iterator<String> iterator = memberLevelMap.values().iterator();
             while (iterator.hasNext()) {
-                mappedlevel = (String)(iterator.next());
+                mappedlevel = iterator.next();
                 if (mappedlevel.equals(STARTLEVEL) ||
                     (level.startsWith(mappedlevel) &&
                      !level.equals(mappedlevel))) {
@@ -482,7 +482,7 @@
     }
 
     private ClassMember getClassMember(MethodDoc member) {
-        for (Iterator iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
+        for (Iterator<?> iter = memberNameMap.keySet().iterator(); iter.hasNext();) {
             Object key = iter.next();
             if (key instanceof String) {
                 continue;
--- a/langtools/src/share/classes/com/sun/tools/javac/Main.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/Main.java	Tue Jan 13 13:27:14 2009 +0000
@@ -56,7 +56,7 @@
       if (args.length > 0 && args[0].equals("-Xjdb")) {
         String[] newargs = new String[args.length + 2];
         Class<?> c = Class.forName("com.sun.tools.example.debug.tty.TTY");
-        Method method = c.getDeclaredMethod ("main", new Class[] {args.getClass()});
+        Method method = c.getDeclaredMethod ("main", new Class<?>[] {args.getClass()});
         method.setAccessible(true);
         System.arraycopy(args, 1, newargs, 3, args.length - 1);
         newargs[0] = "-connect";
--- a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java	Tue Jan 13 13:27:14 2009 +0000
@@ -949,8 +949,8 @@
         Iterable<? extends File> files)
     {
         ArrayList<RegularFileObject> result;
-        if (files instanceof Collection)
-            result = new ArrayList<RegularFileObject>(((Collection)files).size());
+        if (files instanceof Collection<?>)
+            result = new ArrayList<RegularFileObject>(((Collection<?>)files).size());
         else
             result = new ArrayList<RegularFileObject>();
         for (File f: files)
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java	Tue Jan 13 13:27:14 2009 +0000
@@ -1114,7 +1114,7 @@
                 writtenSoFar += dirNameBytesLen;
 
                 // Write the number of files in the dir
-                List dirEntries = dirEntry.getEntriesAsCollection();
+                List<Entry> dirEntries = dirEntry.getEntriesAsCollection();
                 raf.writeInt(dirEntries.size());
                 writtenSoFar += 4;
 
--- a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java	Tue Jan 13 13:27:14 2009 +0000
@@ -215,15 +215,15 @@
             }
         }
 
-        @SuppressWarnings("unchecked")
+        @SuppressWarnings({"unchecked", "rawtypes"})
         public void visitEnum(Attribute.Enum e) {
             if (returnClass.isEnum()) {
                 String constName = e.value.toString();
                 try {
-                    value = Enum.valueOf((Class) returnClass, constName);
+                    value = Enum.valueOf((Class)returnClass, constName);
                 } catch (IllegalArgumentException ex) {
                     value = new EnumConstantNotPresentExceptionProxy(
-                                        (Class) returnClass, constName);
+                                        (Class<Enum<?>>) returnClass, constName);
                 }
             } else {
                 value = null;   // indicates a type mismatch
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java	Tue Jan 13 13:27:14 2009 +0000
@@ -1060,7 +1060,7 @@
             next.put(Names.namesKey, names);
         }
 
-        DiagnosticListener dl = context.get(DiagnosticListener.class);
+        DiagnosticListener<?> dl = context.get(DiagnosticListener.class);
         if (dl != null)
             next.put(DiagnosticListener.class, dl);
 
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java	Tue Jan 13 13:27:14 2009 +0000
@@ -55,12 +55,12 @@
 
     private static final String prefix = "META-INF/services/";
 
-    private static void fail(Class service, String msg)
+    private static void fail(Class<?> service, String msg)
             throws ServiceConfigurationError {
         throw new ServiceConfigurationError(service.getName() + ": " + msg);
     }
 
-    private static void fail(Class service, URL u, int line, String msg)
+    private static void fail(Class<?> service, URL u, int line, String msg)
             throws ServiceConfigurationError {
         fail(service, u + ":" + line + ": " + msg);
     }
@@ -81,7 +81,7 @@
      *         If an I/O error occurs while reading from the given URL, or
      *         if a configuration-file format error is detected
      */
-    private static boolean parse(Class service, URL u) throws ServiceConfigurationError {
+    private static boolean parse(Class<?> service, URL u) throws ServiceConfigurationError {
         InputStream in = null;
         BufferedReader r = null;
         try {
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java	Tue Jan 13 13:27:14 2009 +0000
@@ -116,7 +116,7 @@
      * We maintain the invariant that this table contains only
      * mappings of the form
      * Key<T> -> T or Key<T> -> Factory<T> */
-    private Map<Key,Object> ht = new HashMap<Key,Object>();
+    private Map<Key<?>,Object> ht = new HashMap<Key<?>,Object>();
 
     /** Set the factory for the key in this context. */
     public <T> void put(Key<T> key, Factory<T> fac) {
@@ -128,11 +128,11 @@
 
     /** Set the value for the key in this context. */
     public <T> void put(Key<T> key, T data) {
-        if (data instanceof Factory)
+        if (data instanceof Factory<?>)
             throw new AssertionError("T extends Context.Factory");
         checkState(ht);
         Object old = ht.put(key, data);
-        if (old != null && !(old instanceof Factory) && old != data && data != null)
+        if (old != null && !(old instanceof Factory<?>) && old != data && data != null)
             throw new AssertionError("duplicate context value");
     }
 
@@ -140,10 +140,10 @@
     public <T> T get(Key<T> key) {
         checkState(ht);
         Object o = ht.get(key);
-        if (o instanceof Factory) {
-            Factory fac = (Factory)o;
+        if (o instanceof Factory<?>) {
+            Factory<?> fac = (Factory<?>)o;
             o = fac.make();
-            if (o instanceof Factory)
+            if (o instanceof Factory<?>)
                 throw new AssertionError("T extends Context.Factory");
             assert ht.get(key) == o;
         }
--- a/langtools/src/share/classes/com/sun/tools/javac/util/List.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/List.java	Tue Jan 13 13:27:14 2009 +0000
@@ -71,9 +71,10 @@
      */
     @SuppressWarnings("unchecked")
     public static <A> List<A> nil() {
-        return EMPTY_LIST;
+        return (List<A>)EMPTY_LIST;
     }
-    private static List EMPTY_LIST = new List<Object>(null,null) {
+
+    private static List<?> EMPTY_LIST = new List<Object>(null,null) {
         public List<Object> setTail(List<Object> tail) {
             throw new UnsupportedOperationException();
         }
@@ -318,7 +319,7 @@
 
     /** Are the two lists the same?
      */
-    public static boolean equals(List xs, List ys) {
+    public static boolean equals(List<?> xs, List<?> ys) {
         while (xs.tail != null && ys.tail != null) {
             if (xs.head == null) {
                 if (ys.head != null) return false;
@@ -368,7 +369,7 @@
         return (List<T>)list;
     }
 
-    private static Iterator EMPTYITERATOR = new Iterator() {
+    private static Iterator<?> EMPTYITERATOR = new Iterator<Object>() {
             public boolean hasNext() {
                 return false;
             }
@@ -382,7 +383,7 @@
 
     @SuppressWarnings("unchecked")
     private static <A> Iterator<A> emptyIterator() {
-        return EMPTYITERATOR;
+        return (Iterator<A>)EMPTYITERATOR;
     }
 
     @Override
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java	Tue Jan 13 13:27:14 2009 +0000
@@ -52,9 +52,9 @@
 
     public boolean equals(Object other) {
         return
-            other instanceof Pair &&
-            equals(fst, ((Pair)other).fst) &&
-            equals(snd, ((Pair)other).snd);
+            other instanceof Pair<?,?> &&
+            equals(fst, ((Pair<?,?>)other).fst) &&
+            equals(snd, ((Pair<?,?>)other).snd);
     }
 
     public int hashCode() {
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java	Tue Jan 13 13:27:14 2009 +0000
@@ -88,7 +88,7 @@
             appClassLoader = new URLClassLoader(urls, docletParentClassLoader);
 
         // attempt to find doclet
-        Class dc = null;
+        Class<?> dc = null;
         try {
             dc = appClassLoader.loadClass(docletClassName);
         } catch (ClassNotFoundException exc) {
@@ -104,7 +104,7 @@
     public boolean start(RootDoc root) {
         Object retVal;
         String methodName = "start";
-        Class[] paramTypes = new Class[1];
+        Class<?>[] paramTypes = new Class<?>[1];
         Object[] params = new Object[1];
         paramTypes[0] = RootDoc.class;
         params[0] = root;
@@ -130,7 +130,7 @@
     public int optionLength(String option) {
         Object retVal;
         String methodName = "optionLength";
-        Class[] paramTypes = new Class[1];
+        Class<?>[] paramTypes = new Class<?>[1];
         Object[] params = new Object[1];
         paramTypes[0] = option.getClass();
         params[0] = option;
@@ -157,7 +157,7 @@
         String options[][] = optlist.toArray(new String[optlist.length()][]);
         String methodName = "validOptions";
         DocErrorReporter reporter = messager;
-        Class[] paramTypes = new Class[2];
+        Class<?>[] paramTypes = new Class<?>[2];
         Object[] params = new Object[2];
         paramTypes[0] = options.getClass();
         paramTypes[1] = DocErrorReporter.class;
@@ -185,7 +185,7 @@
         try {
             Object retVal;
             String methodName = "languageVersion";
-            Class[] paramTypes = new Class[0];
+            Class<?>[] paramTypes = new Class<?>[0];
             Object[] params = new Object[0];
             try {
                 retVal = invoke(methodName, JAVA_1_1, paramTypes, params);
@@ -208,7 +208,7 @@
      * Utility method for calling doclet functionality
      */
     private Object invoke(String methodName, Object returnValueIfNonExistent,
-                          Class[] paramTypes, Object[] params)
+                          Class<?>[] paramTypes, Object[] params)
         throws DocletInvokeException {
             Method meth;
             try {
--- a/langtools/src/share/classes/com/sun/tools/javah/Gen.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javah/Gen.java	Tue Jan 13 13:27:14 2009 +0000
@@ -326,7 +326,7 @@
                 throws ClassNotFoundException {
         Vector<FieldDoc> fields = new Vector<FieldDoc>();
         ClassDoc cd = null;
-        Stack s = new Stack();
+        Stack<Object> s = new Stack<Object>();
 
         cd = subclazz;
         while (true) {
--- a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java	Tue Jan 13 13:27:14 2009 +0000
@@ -39,7 +39,7 @@
 
     protected final char  pathChar = File.separatorChar;
     protected final char  innerDelim = '$';     /* For inner classes */
-    protected Hashtable   doneHandleTypes;
+    protected Hashtable<Object, Object>   doneHandleTypes;
     MemberDoc []fields;
     MemberDoc [] methods;
     private boolean       doubleAlign;
@@ -68,7 +68,7 @@
     protected void generateDeclsForClass(PrintWriter pw,
                                          ClassDoc clazz, String cname)
         throws ClassNotFoundException {
-        doneHandleTypes  = new Hashtable();
+        doneHandleTypes  = new Hashtable<Object, Object>();
         /* The following handle types are predefined in "typedefs.h". Suppress
            inclusion in the output by generating them "into the blue" here. */
         genHandleType(null, "java.lang.Class");
--- a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java	Tue Jan 13 13:27:14 2009 +0000
@@ -74,7 +74,7 @@
 
         String signature = null; //Java type signature.
         String typeSignature = null; //Internal type signature.
-        Vector params = new Vector(); //List of parameters.
+        Vector<Object> params = new Vector<Object>(); //List of parameters.
         String paramsig = null; //Java parameter signature.
         String paramJVMSig = null; //Internal parameter signature.
         String returnSig = null; //Java return type signature.
--- a/langtools/src/share/classes/sun/tools/javap/FieldData.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/sun/tools/javap/FieldData.java	Tue Jan 13 13:27:14 2009 +0000
@@ -157,7 +157,7 @@
     /**
      * Returns list of attributes of field.
      */
-    public Vector getAttributes(){
+    public Vector<?> getAttributes(){
         return attrs;
     }
 }
--- a/langtools/src/share/classes/sun/tools/javap/JavapPrinter.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/sun/tools/javap/JavapPrinter.java	Tue Jan 13 13:27:14 2009 +0000
@@ -175,7 +175,7 @@
 
     /* print field attribute information. */
     public void printFieldAttributes(FieldData field){
-        Vector fieldattrs = field.getAttributes();
+        Vector<?> fieldattrs = field.getAttributes();
         for(int j = 0; j < fieldattrs.size(); j++){
             String fieldattrname = ((AttrData)fieldattrs.elementAt(j)).getAttrName();
             if(fieldattrname.equals("ConstantValue")){
@@ -256,8 +256,8 @@
      * print method attribute information.
      */
     public void printMethodAttributes(MethodData method){
-        Vector methodattrs = method.getAttributes();
-        Vector codeattrs =  method.getCodeAttributes();
+        Vector<?> methodattrs = method.getAttributes();
+        Vector<?> codeattrs =  method.getCodeAttributes();
         for(int k = 0; k < methodattrs.size(); k++){
             String methodattrname = ((AttrData)methodattrs.elementAt(k)).getAttrName();
             if(methodattrname.equals("Code")){
@@ -519,7 +519,7 @@
      * Print the exception table for this method code
      */
     void printExceptionTable(MethodData method){//throws IOException
-        Vector exception_table = method.getexception_table();
+        Vector<?> exception_table = method.getexception_table();
         if (exception_table.size() > 0) {
             out.println("  Exception table:");
             out.println("   from   to  target type");
@@ -546,7 +546,7 @@
      */
     public void printLineNumTable(MethodData method) {
         int numlines = method.getnumlines();
-        Vector lin_num_tb = method.getlin_num_tb();
+        Vector<?> lin_num_tb = method.getlin_num_tb();
         if( lin_num_tb.size() > 0){
             out.println("  LineNumberTable: ");
             for (int i=0; i<numlines; i++) {
@@ -568,7 +568,7 @@
             out.print("   ");
             out.println("Start  Length  Slot  Name   Signature");
         }
-        Vector loc_var_tb = method.getloc_var_tb();
+        Vector<?> loc_var_tb = method.getloc_var_tb();
 
         for (int i=0; i<siz; i++) {
             LocVarData entry=(LocVarData)loc_var_tb.elementAt(i);
--- a/langtools/src/share/classes/sun/tools/javap/MethodData.java	Thu Jan 08 16:34:58 2009 -0800
+++ b/langtools/src/share/classes/sun/tools/javap/MethodData.java	Tue Jan 13 13:27:14 2009 +0000
@@ -302,7 +302,7 @@
     /**
      * Return LineNumberTable
      */
-    public Vector getlin_num_tb(){
+    public Vector<?> getlin_num_tb(){
         return lin_num_tb;
     }
 
@@ -317,7 +317,7 @@
     /**
      * Return LocalVariableTable.
      */
-    public Vector getloc_var_tb(){
+    public Vector<?> getloc_var_tb(){
         return loc_var_tb;
     }
 
@@ -378,7 +378,7 @@
     /**
      * Return exception table in code attributre.
      */
-    public Vector getexception_table(){
+    public Vector<?> getexception_table(){
         return exception_table;
     }
 
@@ -386,7 +386,7 @@
     /**
      * Return method attributes.
      */
-    public Vector getAttributes(){
+    public Vector<?> getAttributes(){
         return attrs;
     }
 
@@ -394,7 +394,7 @@
     /**
      * Return code attributes.
      */
-    public Vector getCodeAttributes(){
+    public Vector<?> getCodeAttributes(){
         return code_attrs;
     }