changeset 1023:8b6e015ae7d0

Merge
author asaha
date Tue, 24 May 2011 11:12:40 -0700
parents 145d832616d3 4d05949f8d6b
children 35cc19ae29b5
files test/tools/javac/generics/diamond/7030150/Neg01.java test/tools/javac/generics/diamond/7030150/Neg01.out test/tools/javac/generics/diamond/7030150/Neg02.java test/tools/javac/generics/diamond/7030150/Neg02.out test/tools/javac/generics/diamond/7030150/Neg03.java test/tools/javac/generics/diamond/7030150/Neg03.out test/tools/javac/generics/diamond/7030150/Pos01.java test/tools/javac/generics/diamond/7030150/Pos02.java
diffstat 95 files changed, 2179 insertions(+), 596 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu May 05 22:30:15 2011 -0700
+++ b/.hgtags	Tue May 24 11:12:40 2011 -0700
@@ -116,3 +116,4 @@
 853b6bb99f9b58eb7cf8211c67d3b6e4f1228a3e jdk7-b139
 258e6654aba25aab91c9ba3b4c53d05bc895a86c jdk7-b140
 90adb5d6adc7d99d27c8b142a31ac8921070274f jdk7-b141
+7476b164194c1814704153e74d5ff7e965c6fdbf jdk7-b142
--- a/src/share/classes/com/sun/source/util/Trees.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/source/util/Trees.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -38,6 +38,7 @@
 import javax.tools.Diagnostic;
 import javax.tools.JavaCompiler.CompilationTask;
 
+import com.sun.source.tree.CatchTree;
 import com.sun.source.tree.ClassTree;
 import com.sun.source.tree.CompilationUnitTree;
 import com.sun.source.tree.MethodTree;
@@ -207,4 +208,11 @@
     public abstract void printMessage(Diagnostic.Kind kind, CharSequence msg,
             com.sun.source.tree.Tree t,
             com.sun.source.tree.CompilationUnitTree root);
+
+    /**
+     * Gets the lub of an exception parameter declared in a catch clause.
+     * @param tree the tree for the catch clause
+     * @return The lub of the exception parameter
+     */
+    public abstract TypeMirror getLub(CatchTree tree);
 }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassUseWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -149,11 +149,20 @@
         ClassUseMapper mapper = new ClassUseMapper(configuration.root, classtree);
         ClassDoc[] classes = configuration.root.classes();
         for (int i = 0; i < classes.length; i++) {
-            ClassUseWriter.generate(configuration, mapper, classes[i]);
+            // If -nodeprecated option is set and the containing package is marked
+            // as deprecated, do not generate the class-use page. We will still generate
+            // the class-use page if the class is marked as deprecated but the containing
+            // package is not since it could still be linked from that package-use page.
+            if (!(configuration.nodeprecated &&
+                    Util.isDeprecated(classes[i].containingPackage())))
+                ClassUseWriter.generate(configuration, mapper, classes[i]);
         }
         PackageDoc[] pkgs = configuration.packages;
         for (int i = 0; i < pkgs.length; i++) {
-            PackageUseWriter.generate(configuration, mapper, pkgs[i]);
+            // If -nodeprecated option is set and the package is marked
+            // as deprecated, do not generate the package-use page.
+            if (!(configuration.nodeprecated && Util.isDeprecated(pkgs[i])))
+                PackageUseWriter.generate(configuration, mapper, pkgs[i]);
         }
     }
 
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -31,6 +31,7 @@
 import com.sun.javadoc.*;
 import java.util.*;
 import java.io.*;
+import java.net.*;
 
 /**
  * Configure the output based on the command line options.
@@ -48,6 +49,7 @@
  * @author Robert Field.
  * @author Atul Dambalkar.
  * @author Jamie Ho
+ * @author Bhavesh Patel (Modified)
  */
 public class ConfigurationImpl extends Configuration {
 
@@ -110,6 +112,11 @@
     public String stylesheetfile = "";
 
     /**
+     * Argument for command line option "-Xdocrootparent".
+     */
+    public String docrootparent = "";
+
+    /**
      * True if command line option "-nohelp" is used. Default value is false.
      */
     public boolean nohelp = false;
@@ -239,6 +246,8 @@
                 stylesheetfile =  os[1];
             } else  if (opt.equals("-charset")) {
                 charset =  os[1];
+            } else if (opt.equals("-xdocrootparent")) {
+                docrootparent = os[1];
             } else  if (opt.equals("-nohelp")) {
                 nohelp = true;
             } else  if (opt.equals("-splitindex")) {
@@ -322,7 +331,8 @@
                    option.equals("-helpfile") ||
                    option.equals("-stylesheetfile") ||
                    option.equals("-charset") ||
-                   option.equals("-overview")) {
+                   option.equals("-overview") ||
+                   option.equals("-xdocrootparent")) {
             return 2;
         } else {
             return 0;
@@ -372,6 +382,13 @@
                     return false;
                 }
                 nohelp = true;
+            } else if (opt.equals("-xdocrootparent")) {
+                try {
+                    new URL(os[1]);
+                } catch (MalformedURLException e) {
+                    reporter.printError(getText("doclet.MalformedURL", os[1]));
+                    return false;
+                }
             } else if (opt.equals("-overview")) {
                 if (nooverview == true) {
                     reporter.printError(getText("doclet.Option_conflict",
--- a/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -42,15 +42,15 @@
 public class DeprecatedListWriter extends SubWriterHolderWriter {
 
     private static final String[] ANCHORS = new String[] {
-        "interface", "class", "enum", "exception", "error", "annotation_type",
-         "field", "method", "constructor", "enum_constant",
+        "package", "interface", "class", "enum", "exception", "error",
+        "annotation_type", "field", "method", "constructor", "enum_constant",
         "annotation_type_member"
     };
 
     private static final String[] HEADING_KEYS = new String[] {
-        "doclet.Deprecated_Interfaces", "doclet.Deprecated_Classes",
-        "doclet.Deprecated_Enums", "doclet.Deprecated_Exceptions",
-        "doclet.Deprecated_Errors",
+        "doclet.Deprecated_Packages", "doclet.Deprecated_Interfaces",
+        "doclet.Deprecated_Classes", "doclet.Deprecated_Enums",
+        "doclet.Deprecated_Exceptions", "doclet.Deprecated_Errors",
         "doclet.Deprecated_Annotation_Types",
         "doclet.Deprecated_Fields",
         "doclet.Deprecated_Methods", "doclet.Deprecated_Constructors",
@@ -59,9 +59,9 @@
     };
 
     private static final String[] SUMMARY_KEYS = new String[] {
-        "doclet.deprecated_interfaces", "doclet.deprecated_classes",
-        "doclet.deprecated_enums", "doclet.deprecated_exceptions",
-        "doclet.deprecated_errors",
+        "doclet.deprecated_packages", "doclet.deprecated_interfaces",
+        "doclet.deprecated_classes", "doclet.deprecated_enums",
+        "doclet.deprecated_exceptions", "doclet.deprecated_errors",
         "doclet.deprecated_annotation_types",
         "doclet.deprecated_fields",
         "doclet.deprecated_methods", "doclet.deprecated_constructors",
@@ -70,7 +70,7 @@
     };
 
     private static final String[] HEADER_KEYS = new String[] {
-        "doclet.Interface", "doclet.Class",
+        "doclet.Package", "doclet.Interface", "doclet.Class",
         "doclet.Enum", "doclet.Exceptions",
         "doclet.Errors",
         "doclet.AnnotationType",
@@ -116,7 +116,7 @@
             DeprecatedListWriter depr =
                    new DeprecatedListWriter(configuration, filename);
             depr.generateDeprecatedListFile(
-                   new DeprecatedAPIListBuilder(configuration.root));
+                   new DeprecatedAPIListBuilder(configuration));
             depr.close();
         } catch (IOException exc) {
             configuration.standardmessage.error(
@@ -149,8 +149,14 @@
                 memberTableHeader[0] = configuration.getText("doclet.0_and_1",
                         configuration.getText(HEADER_KEYS[i]),
                         configuration.getText("doclet.Description"));
-                writers[i].addDeprecatedAPI(deprapi.getList(i),
-                        HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
+                // DeprecatedAPIListBuilder.PACKAGE == 0, so if i == 0, it is
+                // a PackageDoc.
+                if (i == DeprecatedAPIListBuilder.PACKAGE)
+                    addPackageDeprecatedAPI(deprapi.getList(i),
+                            HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
+                else
+                    writers[i - 1].addDeprecatedAPI(deprapi.getList(i),
+                            HEADING_KEYS[i], memberTableSummary, memberTableHeader, div);
             }
         }
         body.addContent(div);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDoclet.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -198,23 +198,27 @@
             PackageIndexFrameWriter.generate(configuration);
         }
         PackageDoc prev = null, next;
-        for(int i = 0; i < packages.length; i++) {
-            PackageFrameWriter.generate(configuration, packages[i]);
-            next = (i + 1 < packages.length && packages[i+1].name().length() > 0) ?
-                packages[i+1] : null;
-            //If the next package is unnamed package, skip 2 ahead if possible
-            next = (i + 2 < packages.length && next == null) ?
-                packages[i+2]: next;
-            AbstractBuilder packageSummaryBuilder = configuration.
-                getBuilderFactory().getPackageSummaryBuilder(
-                packages[i], prev, next);
-            packageSummaryBuilder.build();
-            if (configuration.createtree) {
-                PackageTreeWriter.generate(configuration,
-                        packages[i], prev, next,
-                        configuration.nodeprecated);
+        for (int i = 0; i < packages.length; i++) {
+            // if -nodeprecated option is set and the package is marked as
+            // deprecated, do not generate the package-summary.html, package-frame.html
+            // and package-tree.html pages for that package.
+            if (!(configuration.nodeprecated && Util.isDeprecated(packages[i]))) {
+                PackageFrameWriter.generate(configuration, packages[i]);
+                next = (i + 1 < packages.length &&
+                        packages[i + 1].name().length() > 0) ? packages[i + 1] : null;
+                //If the next package is unnamed package, skip 2 ahead if possible
+                next = (i + 2 < packages.length && next == null) ? packages[i + 2] : next;
+                AbstractBuilder packageSummaryBuilder =
+                        configuration.getBuilderFactory().getPackageSummaryBuilder(
+                        packages[i], prev, next);
+                packageSummaryBuilder.build();
+                if (configuration.createtree) {
+                    PackageTreeWriter.generate(configuration,
+                            packages[i], prev, next,
+                            configuration.nodeprecated);
+                }
+                prev = packages[i];
             }
-            prev = packages[i];
         }
     }
 
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -159,22 +159,42 @@
         StringBuilder buf = new StringBuilder();
         int previndex = 0;
         while (true) {
-            // Search for lowercase version of {@docRoot}
-            index = lowerHtml.indexOf("{@docroot}", previndex);
-            // If next {@docRoot} tag not found, append rest of htmlstr and exit loop
-            if (index < 0) {
-                buf.append(htmlstr.substring(previndex));
-                break;
-            }
-            // If next {@docroot} tag found, append htmlstr up to start of tag
-            buf.append(htmlstr.substring(previndex, index));
-            previndex = index + 10;  // length for {@docroot} string
-            // Insert relative path where {@docRoot} was located
-            buf.append(relativepathNoSlash);
-            // Append slash if next character is not a slash
-            if (relativepathNoSlash.length() > 0 && previndex < htmlstr.length()
-                    && htmlstr.charAt(previndex) != '/') {
-                buf.append(DirectoryManager.URL_FILE_SEPARATOR);
+            if (configuration.docrootparent.length() > 0) {
+                // Search for lowercase version of {@docRoot}/..
+                index = lowerHtml.indexOf("{@docroot}/..", previndex);
+                // If next {@docRoot}/.. pattern not found, append rest of htmlstr and exit loop
+                if (index < 0) {
+                    buf.append(htmlstr.substring(previndex));
+                    break;
+                }
+                // If next {@docroot}/.. pattern found, append htmlstr up to start of tag
+                buf.append(htmlstr.substring(previndex, index));
+                previndex = index + 13;  // length for {@docroot}/.. string
+                // Insert docrootparent absolute path where {@docRoot}/.. was located
+
+                buf.append(configuration.docrootparent);
+                // Append slash if next character is not a slash
+                if (previndex < htmlstr.length() && htmlstr.charAt(previndex) != '/') {
+                    buf.append(DirectoryManager.URL_FILE_SEPARATOR);
+                }
+            } else {
+                // Search for lowercase version of {@docRoot}
+                index = lowerHtml.indexOf("{@docroot}", previndex);
+                // If next {@docRoot} tag not found, append rest of htmlstr and exit loop
+                if (index < 0) {
+                    buf.append(htmlstr.substring(previndex));
+                    break;
+                }
+                // If next {@docroot} tag found, append htmlstr up to start of tag
+                buf.append(htmlstr.substring(previndex, index));
+                previndex = index + 10;  // length for {@docroot} string
+                // Insert relative path where {@docRoot} was located
+                buf.append(relativepathNoSlash);
+                // Append slash if next character is not a slash
+                if (relativepathNoSlash.length() > 0 && previndex < htmlstr.length() &&
+                        htmlstr.charAt(previndex) != '/') {
+                    buf.append(DirectoryManager.URL_FILE_SEPARATOR);
+                }
             }
         }
         return buf.toString();
@@ -1395,6 +1415,44 @@
     }
 
     /**
+     * Add package deprecation information to the documentation tree
+     *
+     * @param deprPkgs list of deprecated packages
+     * @param headingKey the caption for the deprecated package table
+     * @param tableSummary the summary for the deprecated package table
+     * @param tableHeader table headers for the deprecated package table
+     * @param contentTree the content tree to which the deprecated package table will be added
+     */
+    protected void addPackageDeprecatedAPI(List<Doc> deprPkgs, String headingKey,
+            String tableSummary, String[] tableHeader, Content contentTree) {
+        if (deprPkgs.size() > 0) {
+            Content table = HtmlTree.TABLE(0, 3, 0, tableSummary,
+                    getTableCaption(configuration().getText(headingKey)));
+            table.addContent(getSummaryTableHeader(tableHeader, "col"));
+            Content tbody = new HtmlTree(HtmlTag.TBODY);
+            for (int i = 0; i < deprPkgs.size(); i++) {
+                PackageDoc pkg = (PackageDoc) deprPkgs.get(i);
+                HtmlTree td = HtmlTree.TD(HtmlStyle.colOne,
+                        getPackageLink(pkg, getPackageName(pkg)));
+                if (pkg.tags("deprecated").length > 0) {
+                    addInlineDeprecatedComment(pkg, pkg.tags("deprecated")[0], td);
+                }
+                HtmlTree tr = HtmlTree.TR(td);
+                if (i % 2 == 0) {
+                    tr.addStyle(HtmlStyle.altColor);
+                } else {
+                    tr.addStyle(HtmlStyle.rowColor);
+                }
+                tbody.addContent(tr);
+            }
+            table.addContent(tbody);
+            Content li = HtmlTree.LI(HtmlStyle.blockList, table);
+            Content ul = HtmlTree.UL(HtmlStyle.blockList, li);
+            contentTree.addContent(ul);
+        }
+    }
+
+    /**
      * Prine table header information about color, column span and the font.
      *
      * @param color Background color.
@@ -2280,6 +2338,7 @@
     public String commentTagsToString(Tag holderTag, Doc doc, Tag[] tags,
             boolean isFirstSentence) {
         StringBuilder result = new StringBuilder();
+        boolean textTagChange = false;
         // Array of all possible inline tags for this javadoc run
         configuration.tagletManager.checkTags(doc, tags, true);
         for (int i = 0; i < tags.length; i++) {
@@ -2295,13 +2354,26 @@
                 result.append(output == null ? "" : output.toString());
                 if (originalLength == 0 && isFirstSentence && tagelem.name().equals("@inheritDoc") && result.length() > 0) {
                     break;
+                } else if (configuration.docrootparent.length() > 0 &&
+                        tagelem.name().equals("@docRoot") &&
+                        ((tags[i + 1]).text()).startsWith("/..")) {
+                    //If Xdocrootparent switch ON, set the flag to remove the /.. occurance after
+                    //{@docRoot} tag in the very next Text tag.
+                    textTagChange = true;
+                    continue;
                 } else {
-                        continue;
+                    continue;
                 }
             } else {
+                String text = tagelem.text();
+                //If Xdocrootparent switch ON, remove the /.. occurance after {@docRoot} tag.
+                if (textTagChange) {
+                    text = text.replaceFirst("/..", "");
+                    textTagChange = false;
+                }
                 //This is just a regular text tag.  The text may contain html links (<a>)
                 //or inline tag {@docRoot}, which will be handled as special cases.
-                String text = redirectRelativeLinks(tagelem.holder(), tagelem.text());
+                text = redirectRelativeLinks(tagelem.holder(), text);
 
                 // Replace @docRoot only if not represented by an instance of DocRootTaglet,
                 // that is, only if it was not present in a source file doc comment.
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageFrameWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -93,7 +93,7 @@
             packgen = new PackageFrameWriter(configuration, packageDoc);
             String pkgName = Util.getPackageName(packageDoc);
             Content body = packgen.getBody(false, packgen.getWindowTitle(pkgName));
-            Content pkgNameContent = new StringContent(pkgName);
+            Content pkgNameContent = new RawHtml(pkgName);
             Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, HtmlStyle.bar,
                     packgen.getTargetPackageLink(packageDoc, "classFrame", pkgNameContent));
             body.addContent(heading);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexFrameWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -80,7 +80,10 @@
         HtmlTree ul = new HtmlTree(HtmlTag.UL);
         ul.addAttr(HtmlAttr.TITLE, packagesLabel.toString());
         for(int i = 0; i < packages.length; i++) {
-            if (packages[i] != null) {
+            // Do not list the package if -nodeprecated option is set and the
+            // package is marked as deprecated.
+            if (packages[i] != null &&
+                    (!(configuration.nodeprecated && Util.isDeprecated(packages[i])))) {
                 ul.addContent(getPackage(packages[i]));
             }
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -137,6 +137,8 @@
     protected void addPackagesList(PackageDoc[] packages, Content tbody) {
         for (int i = 0; i < packages.length; i++) {
             if (packages[i] != null && packages[i].name().length() > 0) {
+                if (configuration.nodeprecated && Util.isDeprecated(packages[i]))
+                    continue;
                 Content packageLinkContent = getPackageLink(packages[i],
                         getPackageName(packages[i]));
                 Content tdPackage = HtmlTree.TD(HtmlStyle.colFirst, packageLinkContent);
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageUseWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -242,11 +242,16 @@
      */
     protected void addPackageUse(PackageDoc pkg, Content contentTree) throws IOException {
         Content tdFirst = HtmlTree.TD(HtmlStyle.colFirst,
-                getHyperLink("", pkg.name(), new StringContent(Util.getPackageName(pkg))));
+                getHyperLink("", Util.getPackageName(pkg),
+                new RawHtml(Util.getPackageName(pkg))));
         contentTree.addContent(tdFirst);
         HtmlTree tdLast = new HtmlTree(HtmlTag.TD);
         tdLast.addStyle(HtmlStyle.colLast);
-        addSummaryComment(pkg, tdLast);
+        if (pkg != null && pkg.name().length() != 0) {
+            addSummaryComment(pkg, tdLast);
+        } else {
+            tdLast.addContent(getSpace());
+        }
         contentTree.addContent(tdLast);
     }
 
--- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Tue May 24 11:12:40 2011 -0700
@@ -114,11 +114,12 @@
         Content packageHead = new RawHtml(heading);
         tHeading.addContent(packageHead);
         div.addContent(tHeading);
+        addDeprecationInfo(div);
         if (packageDoc.inlineTags().length > 0 && ! configuration.nocomment) {
-            HtmlTree subTitleDiv = new HtmlTree(HtmlTag.DIV);
-            subTitleDiv.addStyle(HtmlStyle.subTitle);
-            addSummaryComment(packageDoc, subTitleDiv);
-            div.addContent(subTitleDiv);
+            HtmlTree docSummaryDiv = new HtmlTree(HtmlTag.DIV);
+            docSummaryDiv.addStyle(HtmlStyle.docSummary);
+            addSummaryComment(packageDoc, docSummaryDiv);
+            div.addContent(docSummaryDiv);
             Content space = getSpace();
             Content descLink = getHyperLink("", "package_description",
                     descriptionLabel, "", "");
@@ -139,6 +140,28 @@
     }
 
     /**
+     * Add the package deprecation information to the documentation tree.
+     *
+     * @param div the content tree to which the deprecation information will be added
+     */
+    public void addDeprecationInfo(Content div) {
+        Tag[] deprs = packageDoc.tags("deprecated");
+        if (Util.isDeprecated(packageDoc)) {
+            HtmlTree deprDiv = new HtmlTree(HtmlTag.DIV);
+            deprDiv.addStyle(HtmlStyle.deprecatedContent);
+            Content deprPhrase = HtmlTree.SPAN(HtmlStyle.strong, deprecatedPhrase);
+            deprDiv.addContent(deprPhrase);
+            if (deprs.length > 0) {
+                Tag[] commentTags = deprs[0].inlineTags();
+                if (commentTags.length > 0) {
+                    addInlineDeprecatedComment(packageDoc, deprs[0], deprDiv);
+                }
+            }
+            div.addContent(deprDiv);
+        }
+    }
+
+    /**
      * {@inheritDoc}
      */
     public Content getSummaryHeader() {
--- a/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/SourceToHTMLConverter.java	Tue May 24 11:12:40 2011 -0700
@@ -82,12 +82,20 @@
         }
         PackageDoc[] pds = rd.specifiedPackages();
         for (int i = 0; i < pds.length; i++) {
-            convertPackage(configuration, pds[i], outputdir);
+            // If -nodeprecated option is set and the package is marked as deprecated,
+            // do not convert the package files to HTML.
+            if (!(configuration.nodeprecated && Util.isDeprecated(pds[i])))
+                convertPackage(configuration, pds[i], outputdir);
         }
         ClassDoc[] cds = rd.specifiedClasses();
         for (int i = 0; i < cds.length; i++) {
-            convertClass(configuration, cds[i],
-                    getPackageOutputDir(outputdir, cds[i].containingPackage()));
+            // If -nodeprecated option is set and the class is marked as deprecated
+            // or the containing package is deprecated, do not convert the
+            // package files to HTML.
+            if (!(configuration.nodeprecated &&
+                    (Util.isDeprecated(cds[i]) || Util.isDeprecated(cds[i].containingPackage()))))
+                convertClass(configuration, cds[i],
+                        getPackageOutputDir(outputdir, cds[i].containingPackage()));
         }
     }
 
@@ -106,7 +114,12 @@
         String classOutputdir = getPackageOutputDir(outputdir, pd);
         ClassDoc[] cds = pd.allClasses();
         for (int i = 0; i < cds.length; i++) {
-            convertClass(configuration, cds[i], classOutputdir);
+            // If -nodeprecated option is set and the class is marked as deprecated,
+            // do not convert the package files to HTML. We do not check for
+            // containing package deprecation since it is already check in
+            // the calling method above.
+            if (!(configuration.nodeprecated && Util.isDeprecated(cds[i])))
+                convertClass(configuration, cds[i], classOutputdir);
         }
     }
 
--- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -59,7 +59,10 @@
      * {@inheritDoc}
      */
     public TagletOutput getDocRootOutput() {
-        return new TagletOutputImpl(htmlWriter.relativepathNoSlash);
+        if (htmlWriter.configuration.docrootparent.length() > 0)
+            return new TagletOutputImpl(htmlWriter.configuration.docrootparent);
+        else
+            return new TagletOutputImpl(htmlWriter.relativepathNoSlash);
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -132,7 +132,11 @@
             HtmlTree ul = new HtmlTree(HtmlTag.UL);
             ul.addStyle(HtmlStyle.horizontal);
             for (int i = 0; i < packages.length; i++) {
-                if (packages[i].name().length() == 0) {
+                // If the package name length is 0 or if -nodeprecated option
+                // is set and the package is marked as deprecated, do not include
+                // the page in the list of package hierarchies.
+                if (packages[i].name().length() == 0 ||
+                        (configuration.nodeprecated && Util.isDeprecated(packages[i]))) {
                     continue;
                 }
                 String link = pathString(packages[i], "package-tree.html");
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlStyle.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -46,6 +46,7 @@
     contentContainer,
     description,
     details,
+    docSummary,
     header,
     horizontal,
     footer,
@@ -67,6 +68,7 @@
     subNavList,
     subTitle,
     summary,
+    deprecatedContent,
     tabEnd,
     title,
     topNav;
--- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard.properties	Tue May 24 11:12:40 2011 -0700
@@ -68,6 +68,7 @@
 doclet.see.malformed_tag=Tag {0}: Malformed: {1}
 doclet.Inherited_API_Summary=Inherited API Summary
 doclet.Deprecated_API=Deprecated API
+doclet.Deprecated_Packages=Deprecated Packages
 doclet.Deprecated_Classes=Deprecated Classes
 doclet.Deprecated_Enums=Deprecated Enums
 doclet.Deprecated_Interfaces=Deprecated Interfaces
@@ -79,6 +80,7 @@
 doclet.Deprecated_Methods=Deprecated Methods
 doclet.Deprecated_Enum_Constants=Deprecated Enum Constants
 doclet.Deprecated_Annotation_Type_Members=Deprecated Annotation Type Elements
+doclet.deprecated_packages=deprecated packages
 doclet.deprecated_classes=deprecated classes
 doclet.deprecated_enums=deprecated enums
 doclet.deprecated_interfaces=deprecated interfaces
@@ -245,6 +247,7 @@
   -tag <name>:<locations>:<header>  Specify single argument custom tags\n\
   -taglet                           The fully qualified name of Taglet to register\n\
   -tagletpath                       The path to Taglets\n\
+  -Xdocrootparent <url>             Replaces all appearances of @docRoot followed by /.. in doc comments with <url>\n\
   -charset <charset>                Charset for cross-platform viewing of generated documentation.\n\
   -helpfile <file>                  Include file that help link links to\n\
   -linksource                       Generate source in HTML\n\
--- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties	Tue May 24 11:12:40 2011 -0700
@@ -11,54 +11,30 @@
 doclet.Interface_Hierarchy=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u968E\u5C64
 doclet.Enum_Hierarchy=\u5217\u6319\u578B\u968E\u5C64
 doclet.Annotation_Type_Hierarchy=\u6CE8\u91C8\u578B\u968E\u5C64
-# The following ALL CAPS words should be translated. It is used as "Previous" link on javadoc.
 doclet.Prev=\u524D
-# The following ALL CAPS words should be translated. It is used as "Next" link on javadoc.
 doclet.Next=\u6B21
-# The following ALL CAPS words should be translated. It is used as "Previous Class" link on javadoc.
-doclet.Prev_Class=PREV CLASS
-# The following ALL CAPS words should be translated. It is used as "Next Class" link on javadoc.
-doclet.Next_Class=NEXT CLASS
-# The following ALL CAPS words should be translated. It is used as "Previous Package" link on javadoc.
-doclet.Prev_Package=PREV PACKAGE
-# The following ALL CAPS words should be translated. It is used as "Next Package" link on javadoc.
-doclet.Next_Package=NEXT PACKAGE
-# The following ALL CAPS words should be translated. It is used as "Previous Letter" link on javadoc alphabetical index.
-doclet.Prev_Letter=PREV LETTER
-# The following ALL CAPS words should be translated. It is used as "Next Letter" link on javadoc alphabetical index.
-doclet.Next_Letter=NEXT LETTER
-# The following ALL CAPS words should be translated. It is used as "Show List" link on javadoc.
-doclet.Show_Lists=SHOW LISTS
-# The following ALL CAPS words should be translated. It is used as "Hide List" link on javadoc.
-doclet.Hide_Lists=HIDE LISTS
+doclet.Prev_Class=\u524D\u306E\u30AF\u30E9\u30B9
+doclet.Next_Class=\u6B21\u306E\u30AF\u30E9\u30B9
+doclet.Prev_Package=\u524D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Next_Package=\u6B21\u306E\u30D1\u30C3\u30B1\u30FC\u30B8
+doclet.Prev_Letter=\u524D\u306E\u6587\u5B57
+doclet.Next_Letter=\u6B21\u306E\u6587\u5B57
 doclet.Href_Class_Title={0}\u5185\u306E\u30AF\u30E9\u30B9
 doclet.Href_Interface_Title={0}\u5185\u306E\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
 doclet.Href_Annotation_Title={0}\u5185\u306E\u6CE8\u91C8
 doclet.Href_Enum_Title={0}\u5185\u306E\u5217\u6319\u578B
 doclet.Href_Type_Param_Title={0}\u5185\u306E\u578B\u30D1\u30E9\u30E1\u30FC\u30BF
 doclet.Href_Class_Or_Interface_Title={0}\u5185\u306E\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
-# The following ALL CAPS words should be translated. It's used as SUMMARY: NESTED | FIELD | CONSTR | METHOD, meaning Nested Class Summary, Field Summary, Constructor Summary, or Method Summary.
-doclet.Summary=SUMMARY:
-# The following ALL CAPS words should be translated. It is used as DETAIL: FIELD | CONSTR | METHOD, meaning Field Detail, Constructor Detail, or Method Detail.
-doclet.Detail=DETAIL:
-# The following ALL CAPS words should be translated. It is used as "Nested" (Nested Class Summary) link on javadoc.
-doclet.navNested=NESTED
-# The following ALL CAPS words should be translated. It is used as "Optional" (Optional Element Summary) link on javadoc.
-doclet.navAnnotationTypeOptionalMember=OPTIONAL
-# The following ALL CAPS words should be translated. It is used as "Required" (Required Element Summary) link on javadoc.
-doclet.navAnnotationTypeRequiredMember=REQUIRED
-# The following ALL CAPS words should be translated. It is used as "Element" (Required Element Summary) link on javadoc.
-doclet.navAnnotationTypeMember=ELEMENT
-# The following ALL CAPS words should be translated. It is used as "Field" (Field Detail) link on javadoc.
-doclet.navField=FIELD
-# The following ALL CAPS words should be translated. It is used as "Enum Constants" link on javadoc.
-doclet.navEnum=ENUM CONSTANTS
-# The following ALL CAPS words should be translated. It is used as "Constructor" (Constructor Detail) link on javadoc.
-doclet.navConstructor=CONSTR
-# The following ALL CAPS words should be translated. It is used as "Method" (Method Detail) link on javadoc.
-doclet.navMethod=METHOD
-# The following resource does not seem to be used anymore.
-doclet.navFactoryMethod=FACTORY
+doclet.Summary=\u6982\u8981:
+doclet.Detail=\u8A73\u7D30:
+doclet.navNested=\u30CD\u30B9\u30C8
+doclet.navAnnotationTypeOptionalMember=\u30AA\u30D7\u30B7\u30E7\u30F3
+doclet.navAnnotationTypeRequiredMember=\u5FC5\u9808
+doclet.navAnnotationTypeMember=\u8981\u7D20
+doclet.navField=\u30D5\u30A3\u30FC\u30EB\u30C9
+doclet.navEnum=\u5217\u6319\u5B9A\u6570
+doclet.navConstructor=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF
+doclet.navMethod=\u30E1\u30BD\u30C3\u30C9
 doclet.Index=\u7D22\u5F15
 doclet.Window_Single_Index=\u7D22\u5F15
 doclet.Window_Split_Index={0}\u306E\u7D22\u5F15
@@ -66,12 +42,6 @@
 doclet.Skip_navigation_links=\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30EA\u30F3\u30AF\u3092\u30B9\u30AD\u30C3\u30D7
 doclet.New_Page=NewPage
 doclet.None=\u306A\u3057
-# The following resource does not seem to be used anymore
-doclet.CLASSES=CLASSES
-# The following resource does not seem to be used anymore
-doclet.MEMBERS=MEMBERS
-# The following resource does not seem to be used anymore
-doclet.NONE=\u306A\u3057
 doclet.Factory_Method_Detail=static\u30D5\u30A1\u30AF\u30C8\u30EA\u30FB\u30E1\u30BD\u30C3\u30C9\u306E\u8A73\u7D30
 doclet.navDeprecated=\u975E\u63A8\u5968
 doclet.Deprecated_List=\u975E\u63A8\u5968API\u306E\u30EA\u30B9\u30C8
@@ -136,10 +106,7 @@
 doclet.Option=\u30AA\u30D7\u30B7\u30E7\u30F3
 doclet.Or=\u307E\u305F\u306F
 doclet.Frames=\u30D5\u30EC\u30FC\u30E0
-# The following ALL CAPS words should be translated. It is used as "FRAMES" javadoc navigation link to indicate displaying the page with HTML frames.
-doclet.FRAMES=FRAMES
-# The following ALL CAPS words should be translated. It is used as "NO FRAMES" javadoc navigation link to indicate displaying the page without HTML frames.
-doclet.NO_FRAMES=NO FRAMES
+doclet.No_Frames=\u30D5\u30EC\u30FC\u30E0\u306A\u3057
 doclet.Package_Hierarchies=\u30D1\u30C3\u30B1\u30FC\u30B8\u968E\u5C64:
 doclet.Hierarchy_For_Package=\u30D1\u30C3\u30B1\u30FC\u30B8{0}\u306E\u968E\u5C64
 doclet.Source_Code=\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9:
@@ -147,11 +114,10 @@
 doclet.Cannot_handle_no_packages=\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u51E6\u7406\u3067\u304D\u307E\u305B\u3093\u3002
 doclet.Frame_Alert=\u30D5\u30EC\u30FC\u30E0\u95A2\u9023\u306E\u30A2\u30E9\u30FC\u30C8
 doclet.Overview-Member-Frame=\u6982\u8981\u30E1\u30F3\u30D0\u30FC\u30FB\u30D5\u30EC\u30FC\u30E0
-doclet.Frame_Warning_Message=\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30D5\u30EC\u30FC\u30E0\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u3066\u8868\u793A\u3059\u308B\u3088\u3046\u306B\u4F5C\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D5\u30EC\u30FC\u30E0\u3092\u8868\u793A\u3067\u304D\u306A\u3044Web\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u5834\u5408\u306B\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+doclet.Frame_Warning_Message=\u3053\u306E\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306F\u30D5\u30EC\u30FC\u30E0\u6A5F\u80FD\u3092\u4F7F\u7528\u3057\u3066\u8868\u793A\u3059\u308B\u3088\u3046\u306B\u4F5C\u6210\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u30D5\u30EC\u30FC\u30E0\u3092\u8868\u793A\u3067\u304D\u306A\u3044Web\u30AF\u30E9\u30A4\u30A2\u30F3\u30C8\u306E\u5834\u5408\u306B\u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002{0}\u306B\u30EA\u30F3\u30AF\u3057\u307E\u3059\u3002
 doclet.No_Script_Message=\u30D6\u30E9\u30A6\u30B6\u306EJavaScript\u304C\u7121\u52B9\u306B\u306A\u3063\u3066\u3044\u307E\u3059\u3002
-doclet.Non_Frame_Version=\u30D5\u30EC\u30FC\u30E0\u306A\u3057\u306E\u30D0\u30FC\u30B8\u30E7\u30F3\u3002
+doclet.Non_Frame_Version=\u30D5\u30EC\u30FC\u30E0\u306B\u5BFE\u5FDC\u3057\u3066\u3044\u306A\u3044\u30D0\u30FC\u30B8\u30E7\u30F3
 doclet.Frame_Version=\u30D5\u30EC\u30FC\u30E0\u3042\u308A\u306E\u30D0\u30FC\u30B8\u30E7\u30F3
-doclet.Link_To=\u30EA\u30F3\u30AF\u5148
 doclet.Following_From_Class=\u30AF\u30E9\u30B9{0}\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u30BF\u30B0:
 doclet.Following_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9{0}\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u30BF\u30B0:
 doclet.Description_From_Interface=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304B\u3089\u30B3\u30D4\u30FC\u3055\u308C\u305F\u8AAC\u660E:
@@ -167,7 +133,7 @@
 doclet.Help_line_1=API\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u69CB\u6210
 doclet.Help_line_2=\u3053\u306EAPI(Application Programming Interface)\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u306F\u3001\u6B21\u306B\u8AAC\u660E\u3059\u308B\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u3042\u308B\u9805\u76EE\u306B\u5BFE\u5FDC\u3059\u308B\u30DA\u30FC\u30B8\u304C\u542B\u307E\u308C\u307E\u3059\u3002
 doclet.Help_line_3={0}\u30DA\u30FC\u30B8\u306FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30D5\u30ED\u30F3\u30C8\u30FB\u30DA\u30FC\u30B8\u3067\u3001\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u3092\u542B\u3080\u5168\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30EA\u30B9\u30C8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\u4E00\u9023\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u6982\u8981\u8AAC\u660E\u3082\u8868\u793A\u3055\u308C\u307E\u3059\u3002
-doclet.Help_line_4=\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u6982\u8981\u3092\u542B\u3080\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306F4\u3064\u306E\u30AB\u30C6\u30B4\u30EA\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_4=\u5404\u30D1\u30C3\u30B1\u30FC\u30B8\u306B\u306F\u3001\u305D\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u30EA\u30B9\u30C8\u3068\u3001\u305D\u308C\u305E\u308C\u306E\u6982\u8981\u3092\u542B\u3080\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u3053\u306E\u30DA\u30FC\u30B8\u306F6\u3064\u306E\u30AB\u30C6\u30B4\u30EA\u3067\u69CB\u6210\u3055\u308C\u307E\u3059\u3002
 doclet.Help_line_5=\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9
 doclet.Help_line_6=\u5404\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306B\u306F\u500B\u5225\u306E\u30DA\u30FC\u30B8\u304C\u3042\u308A\u307E\u3059\u3002\u5404\u30DA\u30FC\u30B8\u306B\u306F\u6B21\u306E\u3088\u3046\u306B\u3001\u30AF\u30E9\u30B9\u307E\u305F\u306F\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u306E\u8AAC\u660E\u3068\u3001\u6982\u8981\u8868\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u8A73\u7D30\u8AAC\u660E\u304C\u542B\u307E\u308C\u307E\u3059\u3002
 doclet.Help_line_7=\u30AF\u30E9\u30B9\u968E\u5C64\u8868\u793A
@@ -190,16 +156,16 @@
 doclet.Help_line_24=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306B\u3088\u308A\u3001\u524D\u307E\u305F\u306F\u6B21\u306E\u30AF\u30E9\u30B9\u3001\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u307E\u305F\u306F\u95A2\u9023\u30DA\u30FC\u30B8\u3078\u79FB\u52D5\u3067\u304D\u307E\u3059\u3002
 doclet.Help_line_25=\u30D5\u30EC\u30FC\u30E0/\u30D5\u30EC\u30FC\u30E0\u306A\u3057
 doclet.Help_line_26=\u3053\u308C\u3089\u306E\u30EA\u30F3\u30AF\u306FHTML\u30D5\u30EC\u30FC\u30E0\u306E\u8868\u793A\u3068\u975E\u8868\u793A\u3092\u5207\u308A\u66FF\u3048\u307E\u3059\u3002\u3059\u3079\u3066\u306E\u30DA\u30FC\u30B8\u306F\u30D5\u30EC\u30FC\u30E0\u3042\u308A\u3067\u3082\u3001\u30D5\u30EC\u30FC\u30E0\u306A\u3057\u3067\u3082\u8868\u793A\u3067\u304D\u307E\u3059\u3002
-doclet.Help_line_27=\u76F4\u5217\u5316\u53EF\u80FD\u307E\u305F\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u5404\u30AF\u30E9\u30B9\u306F\u3001\u76F4\u5217\u5316\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9\u306E\u8AAC\u660E\u3092\u542B\u307F\u307E\u3059\u3002\u3053\u306E\u60C5\u5831\u306F\u3001API\u3092\u4F7F\u7528\u3059\u308B\u958B\u767A\u8005\u3067\u306F\u306A\u304F\u3001\u518D\u5B9F\u88C5\u3092\u884C\u3046\u62C5\u5F53\u8005\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u30EA\u30F3\u30AF\u304C\u306A\u3044\u5834\u5408\u3001\u76F4\u5217\u5316\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306B\u79FB\u52D5\u3057\u3066\u3001\u30AF\u30E9\u30B9\u8A18\u8FF0\u306E\u300C\u95A2\u9023\u9805\u76EE\u300D\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3042\u308B\u300C\u76F4\u5217\u5316\u3055\u308C\u305F\u5F62\u5F0F\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u3053\u306E\u60C5\u5831\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002
-doclet.Help_line_28=<a href="constant-values.html">\u300C\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024\u300D</a> \u30DA\u30FC\u30B8\u306B\u306F\u3001static final\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u305D\u306E\u5024\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u3002
-doclet.Help_line_29=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u6A19\u6E96doclet\u3092\u4F7F\u7528\u3057\u3066\u751F\u6210\u3055\u308C\u305FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_27={0}\u30EA\u30F3\u30AF\u306B\u306F\u3001\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9(\u975Estatic\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u578B\u3092\u9664\u304F)\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002
+doclet.Help_line_28=\u76F4\u5217\u5316\u53EF\u80FD\u307E\u305F\u306F\u5916\u90E8\u5316\u53EF\u80FD\u306A\u5404\u30AF\u30E9\u30B9\u306F\u3001\u76F4\u5217\u5316\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u30E1\u30BD\u30C3\u30C9\u306E\u8AAC\u660E\u3092\u542B\u307F\u307E\u3059\u3002\u3053\u306E\u60C5\u5831\u306F\u3001API\u3092\u4F7F\u7528\u3059\u308B\u958B\u767A\u8005\u3067\u306F\u306A\u304F\u3001\u518D\u5B9F\u88C5\u3092\u884C\u3046\u62C5\u5F53\u8005\u306B\u5F79\u7ACB\u3061\u307E\u3059\u3002\u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u306B\u30EA\u30F3\u30AF\u304C\u306A\u3044\u5834\u5408\u3001\u76F4\u5217\u5316\u3055\u308C\u305F\u30AF\u30E9\u30B9\u306B\u79FB\u52D5\u3057\u3066\u3001\u30AF\u30E9\u30B9\u8A18\u8FF0\u306E\u300C\u95A2\u9023\u9805\u76EE\u300D\u30BB\u30AF\u30B7\u30E7\u30F3\u306B\u3042\u308B\u300C\u76F4\u5217\u5316\u3055\u308C\u305F\u5F62\u5F0F\u300D\u3092\u30AF\u30EA\u30C3\u30AF\u3059\u308B\u3053\u3068\u306B\u3088\u308A\u3001\u3053\u306E\u60C5\u5831\u3092\u8868\u793A\u3067\u304D\u307E\u3059\u3002
+doclet.Help_line_29=<a href="constant-values.html">\u300C\u5B9A\u6570\u30D5\u30A3\u30FC\u30EB\u30C9\u5024\u300D</a> \u30DA\u30FC\u30B8\u306B\u306F\u3001static final\u30D5\u30A3\u30FC\u30EB\u30C9\u3068\u305D\u306E\u5024\u306E\u30EA\u30B9\u30C8\u304C\u3042\u308A\u307E\u3059\u3002
+doclet.Help_line_30=\u3053\u306E\u30D8\u30EB\u30D7\u30FB\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u6A19\u6E96doclet\u3092\u4F7F\u7528\u3057\u3066\u751F\u6210\u3055\u308C\u305FAPI\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002
 doclet.Help_enum_line_1=\u5404\u5217\u6319\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059:
 doclet.Help_enum_line_2=\u5217\u6319\u578B\u306E\u5BA3\u8A00
 doclet.Help_enum_line_3=\u5217\u6319\u578B\u306E\u8AAC\u660E
 doclet.Help_annotation_type_line_1=\u5404\u6CE8\u91C8\u578B\u306B\u306F\u3001\u305D\u308C\u81EA\u8EAB\u306E\u500B\u5225\u306E\u30DA\u30FC\u30B8\u3068\u6B21\u306E\u30BB\u30AF\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u3059:
 doclet.Help_annotation_type_line_2=\u6CE8\u91C8\u578B\u306E\u5BA3\u8A00
 doclet.Help_annotation_type_line_3=\u6CE8\u91C8\u578B\u306E\u8AAC\u660E
-doclet.The=The
 doclet.Style_line_1=javadoc\u30B9\u30BF\u30A4\u30EB\u30FB\u30B7\u30FC\u30C8
 doclet.Style_line_2=\u8272\u3084\u30D5\u30A9\u30F3\u30C8\u306A\u3069\u306E\u30B9\u30BF\u30A4\u30EB\u5C5E\u6027\u306E\u30C7\u30D5\u30A9\u30EB\u30C8\u5024\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\u306B\u306F\u3001\u3053\u3053\u3067\u5B9A\u7FA9\u3057\u307E\u3059
 doclet.Style_line_3=\u30DA\u30FC\u30B8\u306E\u30D0\u30C3\u30AF\u30B0\u30E9\u30A6\u30F3\u30C9\u306E\u8272
--- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties	Tue May 24 11:12:40 2011 -0700
@@ -11,54 +11,30 @@
 doclet.Interface_Hierarchy=\u63A5\u53E3\u5206\u5C42\u7ED3\u6784
 doclet.Enum_Hierarchy=\u679A\u4E3E\u5206\u5C42\u7ED3\u6784
 doclet.Annotation_Type_Hierarchy=\u6CE8\u91CA\u7C7B\u578B\u5206\u5C42\u7ED3\u6784
-# The following ALL CAPS words should be translated. It is used as "Previous" link on javadoc.
 doclet.Prev=\u4E0A\u4E00\u4E2A
-# The following ALL CAPS words should be translated. It is used as "Next" link on javadoc.
 doclet.Next=\u4E0B\u4E00\u4E2A
-# The following ALL CAPS words should be translated. It is used as "Previous Class" link on javadoc.
-doclet.Prev_Class=PREV CLASS
-# The following ALL CAPS words should be translated. It is used as "Next Class" link on javadoc.
-doclet.Next_Class=NEXT CLASS
-# The following ALL CAPS words should be translated. It is used as "Previous Package" link on javadoc.
-doclet.Prev_Package=PREV PACKAGE
-# The following ALL CAPS words should be translated. It is used as "Next Package" link on javadoc.
-doclet.Next_Package=NEXT PACKAGE
-# The following ALL CAPS words should be translated. It is used as "Previous Letter" link on javadoc alphabetical index.
-doclet.Prev_Letter=PREV LETTER
-# The following ALL CAPS words should be translated. It is used as "Next Letter" link on javadoc alphabetical index.
-doclet.Next_Letter=NEXT LETTER
-# The following ALL CAPS words should be translated. It is used as "Show List" link on javadoc.
-doclet.Show_Lists=SHOW LISTS
-# The following ALL CAPS words should be translated. It is used as "Hide List" link on javadoc.
-doclet.Hide_Lists=HIDE LISTS
+doclet.Prev_Class=\u4E0A\u4E00\u4E2A\u7C7B
+doclet.Next_Class=\u4E0B\u4E00\u4E2A\u7C7B
+doclet.Prev_Package=\u4E0A\u4E00\u4E2A\u7A0B\u5E8F\u5305
+doclet.Next_Package=\u4E0B\u4E00\u4E2A\u7A0B\u5E8F\u5305
+doclet.Prev_Letter=\u4E0A\u4E00\u4E2A\u5B57\u6BCD
+doclet.Next_Letter=\u4E0B\u4E00\u4E2A\u5B57\u6BCD
 doclet.Href_Class_Title={0}\u4E2D\u7684\u7C7B
 doclet.Href_Interface_Title={0}\u4E2D\u7684\u63A5\u53E3
 doclet.Href_Annotation_Title={0}\u4E2D\u7684\u6CE8\u91CA
 doclet.Href_Enum_Title={0}\u4E2D\u7684\u679A\u4E3E
 doclet.Href_Type_Param_Title={0}\u4E2D\u7684\u7C7B\u578B\u53C2\u6570
 doclet.Href_Class_Or_Interface_Title={0}\u4E2D\u7684\u7C7B\u6216\u63A5\u53E3
-# The following ALL CAPS words should be translated. It's used as SUMMARY: NESTED | FIELD | CONSTR | METHOD, meaning Nested Class Summary, Field Summary, Constructor Summary, or Method Summary.
-doclet.Summary=SUMMARY:
-# The following ALL CAPS words should be translated. It is used as DETAIL: FIELD | CONSTR | METHOD, meaning Field Detail, Constructor Detail, or Method Detail.
-doclet.Detail=DETAIL:
-# The following ALL CAPS words should be translated. It is used as "Nested" (Nested Class Summary) link on javadoc.
-doclet.navNested=NESTED
-# The following ALL CAPS words should be translated. It is used as "Optional" (Optional Element Summary) link on javadoc.
-doclet.navAnnotationTypeOptionalMember=OPTIONAL
-# The following ALL CAPS words should be translated. It is used as "Required" (Required Element Summary) link on javadoc.
-doclet.navAnnotationTypeRequiredMember=REQUIRED
-# The following ALL CAPS words should be translated. It is used as "Element" (Required Element Summary) link on javadoc.
-doclet.navAnnotationTypeMember=ELEMENT
-# The following ALL CAPS words should be translated. It is used as "Field" (Field Detail) link on javadoc.
-doclet.navField=FIELD
-# The following ALL CAPS words should be translated. It is used as "Enum Constants" link on javadoc.
-doclet.navEnum=ENUM CONSTANTS
-# The following ALL CAPS words should be translated. It is used as "Constructor" (Constructor Detail) link on javadoc.
-doclet.navConstructor=CONSTR
-# The following ALL CAPS words should be translated. It is used as "Method" (Method Detail) link on javadoc.
-doclet.navMethod=METHOD
-# The following resource does not seem to be used anymore.
-doclet.navFactoryMethod=FACTORY
+doclet.Summary=\u6982\u8981:
+doclet.Detail=\u8BE6\u7EC6\u8D44\u6599:
+doclet.navNested=\u5D4C\u5957
+doclet.navAnnotationTypeOptionalMember=\u53EF\u9009
+doclet.navAnnotationTypeRequiredMember=\u5FC5\u9700
+doclet.navAnnotationTypeMember=\u5143\u7D20
+doclet.navField=\u5B57\u6BB5
+doclet.navEnum=\u679A\u4E3E\u5E38\u91CF
+doclet.navConstructor=\u6784\u9020\u5668
+doclet.navMethod=\u65B9\u6CD5
 doclet.Index=\u7D22\u5F15
 doclet.Window_Single_Index=\u7D22\u5F15
 doclet.Window_Split_Index={0} - \u7D22\u5F15
@@ -66,12 +42,6 @@
 doclet.Skip_navigation_links=\u8DF3\u8FC7\u5BFC\u822A\u94FE\u63A5
 doclet.New_Page=NewPage
 doclet.None=\u65E0
-# The following resource does not seem to be used anymore
-doclet.CLASSES=CLASSES
-# The following resource does not seem to be used anymore
-doclet.MEMBERS=MEMBERS
-# The following resource does not seem to be used anymore
-doclet.NONE=\u65E0
 doclet.Factory_Method_Detail=\u9759\u6001\u5DE5\u5382\u65B9\u6CD5\u8BE6\u7EC6\u8D44\u6599
 doclet.navDeprecated=\u5DF2\u8FC7\u65F6
 doclet.Deprecated_List=\u5DF2\u8FC7\u65F6\u7684\u5217\u8868
@@ -136,10 +106,7 @@
 doclet.Option=\u9009\u9879
 doclet.Or=\u6216
 doclet.Frames=\u6846\u67B6
-# The following ALL CAPS words should be translated. It is used as "FRAMES" javadoc navigation link to indicate displaying the page with HTML frames.
-doclet.FRAMES=FRAMES
-# The following ALL CAPS words should be translated. It is used as "NO FRAMES" javadoc navigation link to indicate displaying the page without HTML frames.
-doclet.NO_FRAMES=NO FRAMES
+doclet.No_Frames=\u65E0\u6846\u67B6
 doclet.Package_Hierarchies=\u7A0B\u5E8F\u5305\u5206\u5C42\u7ED3\u6784:
 doclet.Hierarchy_For_Package=\u7A0B\u5E8F\u5305{0}\u7684\u5206\u5C42\u7ED3\u6784
 doclet.Source_Code=\u6E90\u4EE3\u7801:
@@ -147,11 +114,10 @@
 doclet.Cannot_handle_no_packages=\u65E0\u6CD5\u5904\u7406\u6CA1\u6709\u7A0B\u5E8F\u5305\u7684\u60C5\u51B5\u3002
 doclet.Frame_Alert=\u6846\u67B6\u9884\u8B66
 doclet.Overview-Member-Frame=\u6210\u5458\u6846\u67B6\u6982\u89C8
-doclet.Frame_Warning_Message=\u8BF7\u4F7F\u7528\u6846\u67B6\u529F\u80FD\u67E5\u770B\u6B64\u6587\u6863\u3002\u5982\u679C\u770B\u5230\u6B64\u6D88\u606F, \u5219\u8868\u660E\u60A8\u4F7F\u7528\u7684\u662F\u4E0D\u652F\u6301\u6846\u67B6\u7684 Web \u5BA2\u6237\u673A\u3002
+doclet.Frame_Warning_Message=\u8BF7\u4F7F\u7528\u6846\u67B6\u529F\u80FD\u67E5\u770B\u6B64\u6587\u6863\u3002\u5982\u679C\u770B\u5230\u6B64\u6D88\u606F, \u5219\u8868\u660E\u60A8\u4F7F\u7528\u7684\u662F\u4E0D\u652F\u6301\u6846\u67B6\u7684 Web \u5BA2\u6237\u673A\u3002\u94FE\u63A5\u5230{0}\u3002
 doclet.No_Script_Message=\u60A8\u7684\u6D4F\u89C8\u5668\u5DF2\u7981\u7528 JavaScript\u3002
-doclet.Non_Frame_Version=\u975E\u6846\u67B6\u7248\u672C\u3002
+doclet.Non_Frame_Version=\u975E\u6846\u67B6\u7248\u672C
 doclet.Frame_Version=\u6846\u67B6\u7248\u672C
-doclet.Link_To=\u94FE\u63A5\u5230
 doclet.Following_From_Class=\u4EE5\u4E0B\u5185\u5BB9\u662F\u4ECE\u7C7B{0}\u590D\u5236\u7684
 doclet.Following_From_Interface=\u4EE5\u4E0B\u5185\u5BB9\u662F\u4ECE\u63A5\u53E3{0}\u590D\u5236\u7684
 doclet.Description_From_Interface=\u4ECE\u63A5\u53E3\u590D\u5236\u7684\u8BF4\u660E:
@@ -167,7 +133,7 @@
 doclet.Help_line_1=\u6B64 API \u6587\u6863\u7684\u7EC4\u7EC7\u65B9\u5F0F
 doclet.Help_line_2=\u6B64 API (\u5E94\u7528\u7A0B\u5E8F\u7F16\u7A0B\u63A5\u53E3) \u6587\u6863\u5305\u542B\u5BF9\u5E94\u4E8E\u5BFC\u822A\u680F\u4E2D\u7684\u9879\u76EE\u7684\u9875\u9762, \u5982\u4E0B\u6240\u8FF0\u3002
 doclet.Help_line_3={0} \u9875\u9762\u662F\u6B64 API \u6587\u6863\u7684\u9996\u9875, \u63D0\u4F9B\u4E86\u6240\u6709\u7A0B\u5E8F\u5305\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u4E5F\u53EF\u80FD\u5305\u542B\u8FD9\u4E9B\u7A0B\u5E8F\u5305\u7684\u603B\u4F53\u8BF4\u660E\u3002
-doclet.Help_line_4=\u6BCF\u4E2A\u7A0B\u5E8F\u5305\u90FD\u6709\u4E00\u4E2A\u9875\u9762, \u5176\u4E2D\u5305\u542B\u5B83\u7684\u7C7B\u548C\u63A5\u53E3\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u53EF\u4EE5\u5305\u542B\u56DB\u4E2A\u7C7B\u522B:
+doclet.Help_line_4=\u6BCF\u4E2A\u7A0B\u5E8F\u5305\u90FD\u6709\u4E00\u4E2A\u9875\u9762, \u5176\u4E2D\u5305\u542B\u5B83\u7684\u7C7B\u548C\u63A5\u53E3\u7684\u5217\u8868\u53CA\u5176\u6982\u8981\u3002\u6B64\u9875\u9762\u53EF\u4EE5\u5305\u542B\u516D\u4E2A\u7C7B\u522B:
 doclet.Help_line_5=\u7C7B/\u63A5\u53E3
 doclet.Help_line_6=\u6BCF\u4E2A\u7C7B, \u63A5\u53E3, \u5D4C\u5957\u7C7B\u548C\u5D4C\u5957\u63A5\u53E3\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762\u3002\u5176\u4E2D\u6BCF\u4E2A\u9875\u9762\u90FD\u7531\u4E09\u90E8\u5206 (\u7C7B/\u63A5\u53E3\u8BF4\u660E, \u6982\u8981\u8868, \u4EE5\u53CA\u8BE6\u7EC6\u7684\u6210\u5458\u8BF4\u660E) \u7EC4\u6210:
 doclet.Help_line_7=\u7C7B\u7EE7\u627F\u56FE
@@ -190,16 +156,16 @@
 doclet.Help_line_24=\u8FD9\u4E9B\u94FE\u63A5\u4F7F\u60A8\u53EF\u4EE5\u8F6C\u81F3\u4E0B\u4E00\u4E2A\u6216\u4E0A\u4E00\u4E2A\u7C7B, \u63A5\u53E3, \u7A0B\u5E8F\u5305\u6216\u76F8\u5173\u9875\u9762\u3002
 doclet.Help_line_25=\u6846\u67B6/\u65E0\u6846\u67B6
 doclet.Help_line_26=\u8FD9\u4E9B\u94FE\u63A5\u7528\u4E8E\u663E\u793A\u548C\u9690\u85CF HTML \u6846\u67B6\u3002\u6240\u6709\u9875\u9762\u5747\u5177\u6709\u6709\u6846\u67B6\u548C\u65E0\u6846\u67B6\u4E24\u79CD\u663E\u793A\u65B9\u5F0F\u3002
-doclet.Help_line_27=\u6BCF\u4E2A\u53EF\u5E8F\u5217\u5316\u6216\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u90FD\u6709\u5176\u5E8F\u5217\u5316\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u8BF4\u660E\u3002\u6B64\u4FE1\u606F\u5BF9\u91CD\u65B0\u5B9E\u73B0\u8005\u6709\u7528, \u800C\u5BF9\u4F7F\u7528 API \u7684\u5F00\u53D1\u8005\u5219\u6CA1\u6709\u4EC0\u4E48\u7528\u5904\u3002\u5C3D\u7BA1\u5BFC\u822A\u680F\u4E2D\u6CA1\u6709\u94FE\u63A5, \u4F46\u60A8\u53EF\u4EE5\u901A\u8FC7\u4E0B\u5217\u65B9\u5F0F\u83B7\u53D6\u6B64\u4FE1\u606F: \u8F6C\u81F3\u4EFB\u4F55\u5E8F\u5217\u5316\u7C7B, \u7136\u540E\u5355\u51FB\u7C7B\u8BF4\u660E\u7684 "\u53E6\u8BF7\u53C2\u9605" \u90E8\u5206\u4E2D\u7684 "\u5E8F\u5217\u5316\u8868\u683C"\u3002
-doclet.Help_line_28=<a href="constant-values.html">\u5E38\u91CF\u5B57\u6BB5\u503C</a>\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002
-doclet.Help_line_29=\u6B64\u5E2E\u52A9\u6587\u4EF6\u9002\u7528\u4E8E\u4F7F\u7528\u6807\u51C6 doclet \u751F\u6210\u7684 API \u6587\u6863\u3002
+doclet.Help_line_27={0}\u94FE\u63A5\u663E\u793A\u6240\u6709\u7C7B\u548C\u63A5\u53E3 (\u9664\u4E86\u975E\u9759\u6001\u5D4C\u5957\u7C7B\u578B)\u3002
+doclet.Help_line_28=\u6BCF\u4E2A\u53EF\u5E8F\u5217\u5316\u6216\u53EF\u5916\u90E8\u5316\u7684\u7C7B\u90FD\u6709\u5176\u5E8F\u5217\u5316\u5B57\u6BB5\u548C\u65B9\u6CD5\u7684\u8BF4\u660E\u3002\u6B64\u4FE1\u606F\u5BF9\u91CD\u65B0\u5B9E\u73B0\u8005\u6709\u7528, \u800C\u5BF9\u4F7F\u7528 API \u7684\u5F00\u53D1\u8005\u5219\u6CA1\u6709\u4EC0\u4E48\u7528\u5904\u3002\u5C3D\u7BA1\u5BFC\u822A\u680F\u4E2D\u6CA1\u6709\u94FE\u63A5, \u4F46\u60A8\u53EF\u4EE5\u901A\u8FC7\u4E0B\u5217\u65B9\u5F0F\u83B7\u53D6\u6B64\u4FE1\u606F: \u8F6C\u81F3\u4EFB\u4F55\u5E8F\u5217\u5316\u7C7B, \u7136\u540E\u5355\u51FB\u7C7B\u8BF4\u660E\u7684 "\u53E6\u8BF7\u53C2\u9605" \u90E8\u5206\u4E2D\u7684 "\u5E8F\u5217\u5316\u8868\u683C"\u3002
+doclet.Help_line_29=<a href="constant-values.html">\u5E38\u91CF\u5B57\u6BB5\u503C</a>\u9875\u9762\u5217\u51FA\u4E86\u9759\u6001\u6700\u7EC8\u5B57\u6BB5\u53CA\u5176\u503C\u3002
+doclet.Help_line_30=\u6B64\u5E2E\u52A9\u6587\u4EF6\u9002\u7528\u4E8E\u4F7F\u7528\u6807\u51C6 doclet \u751F\u6210\u7684 API \u6587\u6863\u3002
 doclet.Help_enum_line_1=\u6BCF\u4E2A\u679A\u4E3E\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206:
 doclet.Help_enum_line_2=\u679A\u4E3E\u58F0\u660E
 doclet.Help_enum_line_3=\u679A\u4E3E\u8BF4\u660E
 doclet.Help_annotation_type_line_1=\u6BCF\u4E2A\u6CE8\u91CA\u7C7B\u578B\u90FD\u6709\u5404\u81EA\u7684\u9875\u9762, \u5176\u4E2D\u5305\u542B\u4EE5\u4E0B\u90E8\u5206:
 doclet.Help_annotation_type_line_2=\u6CE8\u91CA\u7C7B\u578B\u58F0\u660E
 doclet.Help_annotation_type_line_3=\u6CE8\u91CA\u7C7B\u578B\u8BF4\u660E
-doclet.The=\u8BE5
 doclet.Style_line_1=Javadoc \u6837\u5F0F\u8868
 doclet.Style_line_2=\u5728\u6B64\u5904\u5B9A\u4E49\u989C\u8272, \u5B57\u4F53\u548C\u5176\u4ED6\u6837\u5F0F\u5C5E\u6027\u4EE5\u8986\u76D6\u9ED8\u8BA4\u503C
 doclet.Style_line_3=\u9875\u9762\u80CC\u666F\u989C\u8272
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/Configuration.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -419,7 +419,7 @@
             docencoding = encoding;
         }
 
-        classDocCatalog = new ClassDocCatalog(root.specifiedClasses());
+        classDocCatalog = new ClassDocCatalog(root.specifiedClasses(), this);
         initTagletManager(customTagStrs);
     }
 
@@ -677,15 +677,18 @@
     }
 
     /**
-     * Return true if the doc element is getting documented, depending upon
-     * -nodeprecated option and @deprecated tag used. Return true if
-     * -nodeprecated is not used or @deprecated tag is not used.
+     * Return true if the ClassDoc element is getting documented, depending upon
+     * -nodeprecated option and the deprecation information. Return true if
+     * -nodeprecated is not used. Return false if -nodeprecated is used and if
+     * either ClassDoc element is deprecated or the containing package is deprecated.
+     *
+     * @param cd the ClassDoc for which the page generation is checked
      */
-    public boolean isGeneratedDoc(Doc doc) {
+    public boolean isGeneratedDoc(ClassDoc cd) {
         if (!nodeprecated) {
             return true;
         }
-        return (doc.tags("deprecated")).length == 0;
+        return !(Util.isDeprecated(cd) || Util.isDeprecated(cd.containingPackage()));
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/stylesheet.css	Tue May 24 11:12:40 2011 -0700
@@ -2,17 +2,10 @@
 /*
 Overall document style
 */
-* {
-    margin:0;
-    padding:0;
-}
 body {
     font-family:Helvetica, Arial, sans-serif;
     color:#000000;
 }
-p {
-    margin:20px 0;
-}
 pre {
     font-size:1.0em;
 }
@@ -30,35 +23,18 @@
 }
 ul {
     margin:10px 0 10px 20px;
-}
-li {
-    list-style:disc;
-}
-dl dt {
-    font-size:0.95em;
-    font-weight:bold;
-    margin:10px 0 0 0;
-}
-dl dd {
-    margin:10px 0 10px 20px;
-}
-dl dd ul {
-    margin-left:0;
-}
-dl dd ul li {
-    list-style:none;
-    margin:10px 0 10px 0;
+    list-style-type:disc;
 }
 caption {
     background: #CCCCFF;
     color:#000000;
-    text-align: left;
-    font-size: 150%;
-    font-weight: bold;
-    border-left: 2px ridge;
-    border-right: 2px ridge;
-    border-top: 2px ridge;
-    padding-left: 5px;
+    text-align:left;
+    font-size:150%;
+    font-weight:bold;
+    border-left:2px ridge;
+    border-right:2px ridge;
+    border-top:2px ridge;
+    padding-left:5px;
     width:auto;
 }
 /*
@@ -70,11 +46,11 @@
     color:#000000;
 }
 .legalCopy {
-    margin:7px;
+    margin:7px 0;
 }
 .bar {
     font-size:1em;
-    margin:10px 0 0 10px;
+    margin:10px 0 0 2px;
 }
 .bar a {
     font-weight:normal;
@@ -84,24 +60,21 @@
 */
 .topNav {
     border-top:2px solid #C0C0C0;
-    margin:7px;
     padding:7px 0;
     height:2.8em;
-    width:99%;
+    width:100%;
     min-width:600px;
 }
 .bottomNav {
     border-top:2px solid #C0C0C0;
-    margin:7px;
     padding:7px 0;
     height:2.8em;
-    width:99%;
+    width:100%;
 }
 .subNav {
     border-bottom:2px solid #C0C0C0;
     float:left;
-    width:99%;
-    margin:7px;
+    width:100%;
     min-width:600px;
 }
 .subNav div {
@@ -120,7 +93,7 @@
 /* Navigation bar list styles */
 .topNav ul.navList, .bottomNav ul.navList {
     background-color:#EEEEFF;
-    padding:7px 5px;
+    padding:4px 4px;
     margin:0;
     float:left;
     width:80%;
@@ -128,7 +101,7 @@
 ul.navList li{
     list-style:none;
     float:left;
-    padding:3px 4px;
+    padding:0 4px;
     color:#000000;
     font-size:0.98em;
 }
@@ -142,14 +115,16 @@
 .subNav ul.navList {
     float:left;
     margin:0;
+    padding:0;
     font-size:0.8em;
     width:350px;
 }
 ul.subNavList {
     float:left;
-    margin:0;
     font-size:0.8em;
     width:350px;
+    margin:0;
+    padding:0;
 }
 ul.subNavList li{
     list-style:none;
@@ -161,16 +136,16 @@
 */
 .header, .footer {
     clear:both;
-    margin:0 7px;
+    padding:10px 0;
 }
 .indexHeader {
     font-size:0.9em;
-    margin:10px 0 7px 10px;
+    margin:10px 0 0 2px;
 }
 .header ul {
     padding-left:20px;
 }
-/* Header and footer title styles */ 
+/* Header and footer title styles */
 .header h1.title {
     font-size:1.4em;
     text-align:center;
@@ -181,7 +156,16 @@
     margin:0;
 }
 .subTitle {
+    padding-top:10px;
+}
+/*
+Content styles
+*/
+.deprecatedContent {
     margin:0;
+    padding:10px 0;
+}
+.docSummary {
     padding-top:10px;
 }
 /*
@@ -190,11 +174,11 @@
 .contentContainer, .sourceContainer, .classUseContainer, .serializedFormContainer,
 .constantValuesContainer {
     clear:both;
-    padding:10px 10px;
     position:relative;
+    padding-bottom:20px;
 }
 .indexContainer {
-    padding:0 0 10px 10px;
+    padding:0 0 0 2px;
     font-size:0.9em;
 }
 /*
@@ -221,7 +205,8 @@
 .indexContainer h2 {
     font-weight:normal;
     font-size:1.0em;
-    padding:10px 0 0 0;
+    padding:5px 0 0 0;
+    margin:10px 0 0 0;
 }
 .contentContainer h2 {
     margin:10px 0;
@@ -263,7 +248,7 @@
     background:#CCCCFF;
     border:0;
     border:2px ridge;
-    padding-left:5px;
+    margin:0;
 }
 div.summary ul.blockList ul.blockList ul.blockList li.blockList h3 {
     background:#EEEEFF;
@@ -274,23 +259,22 @@
 div.details ul.blockList ul.blockList ul.blockListLast li.blockList h4 {
     font-size:1.15em;
     font-weight:bold;
-    padding:0 0 10px 0;
+    padding:0 0 5px 0;
+    margin:0;
 }
 /*
 Table styles
 */
 .contentContainer table {
-    border-collapse: collapse ;
+    border-collapse:collapse ;
     width:100%;
 }
 .contentContainer table td, .contentContainer table th {
     border:2px ridge;
-    padding:3px;
 }
 /* Constant values page table styles */
 .constantValuesContainer table {
-    border-collapse: collapse ;
-    margin:0 0 10px 0;
+    border-collapse:collapse;
 }
 .constantValuesContainer table caption{
     font-size:0.95em;
@@ -303,12 +287,9 @@
 }
 /* Class-use/Package-use page table styles */
 .classUseContainer table {
-    border-collapse: collapse ;
+    border-collapse:collapse ;
     width:100%;
-    margin:0 0 15px 0;
-}
-.classUseContainer ul li ul li table {
-    margin-bottom:30px;
+    margin:0 0 10px 0;
 }
 .classUseContainer ul li ul li table caption{
     font-size:0.95em;
@@ -365,6 +346,7 @@
 /* Container specific list styles */
 .indexContainer ul {
     margin:0;
+    padding:0;
 }
 .indexContainer ul li {
     list-style:none;
@@ -376,6 +358,7 @@
     list-style:none;
     border:0;
     border-bottom:2px ridge;
+    height:1%;
 }
 .serializedFormContainer ul.blockList li.blockList ul.blockList li.blockList ul.blockList li.blockList ul.blockList li.blockListLast {
     list-style:none;
@@ -395,6 +378,7 @@
 div.details ul.blockList ul.blockList ul.blockList li.blockList {
     border:0;
     border-bottom:2px ridge;
+    height:1%;
 }
 /* Definition list styles */
 ul.blockList li.blockList dl{
@@ -413,9 +397,17 @@
 ul.blockList li.blockList pre{
     margin:0 0 15px 0;
 }
+.description dl dt {
+    font-size:0.95em;
+    font-weight:bold;
+    margin:5px 0 0 0;
+}
+.description dl dd {
+    margin:10px 0 10px 20px;
+}
 /* List content styles */
 ul.blockList li.blockList ul.blockList li.blockList pre{
-    margin:10px 0 15px 0;
+    margin:10px 0 10px 0;
 }
 ul.blockList li.blockList ul.blockList li.blockList ul.blockList li.blockList pre,
 ul.blockList li.blockList ul.blockList li.blockList ul.blockListLast li.blockList pre{
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/DeprecatedTaglet.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -47,13 +47,6 @@
     /**
      * {@inheritDoc}
      */
-    public boolean inPackage() {
-        return false;
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public TagletOutput getTagletOutput(Doc holder, TagletWriter writer) {
         return writer.deprecatedTagOutput(holder);
     }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassDocCatalog.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2001, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2001, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,8 +25,9 @@
 
 package com.sun.tools.doclets.internal.toolkit.util;
 
+import java.util.*;
 import com.sun.javadoc.*;
-import java.util.*;
+import com.sun.tools.doclets.internal.toolkit.Configuration;
 
 /**
  * This class acts as an artificial PackageDoc for classes specified
@@ -88,13 +89,16 @@
       */
      private Map<String,Set<ClassDoc>> interfaces;
 
+     private Configuration configuration;
+
      /**
       * Construct a new ClassDocCatalog.
       *
       * @param classdocs the array of ClassDocs to catalog
       */
-     public ClassDocCatalog (ClassDoc[] classdocs) {
+     public ClassDocCatalog (ClassDoc[] classdocs, Configuration config) {
          init();
+         this.configuration = config;
          for (int i = 0; i < classdocs.length; i++) {
              addClassDoc(classdocs[i]);
          }
@@ -151,9 +155,10 @@
       private void addClass(ClassDoc classdoc, Map<String,Set<ClassDoc>> map) {
 
           PackageDoc pkg = classdoc.containingPackage();
-          if (pkg.isIncluded()) {
-              //No need to catalog this class since it's package is
-              //included on the command line
+          if (pkg.isIncluded() || (configuration.nodeprecated && Util.isDeprecated(pkg))) {
+              //No need to catalog this class if it's package is
+              //included on the command line or if -nodeprecated option is set
+              // and the containing package is marked as deprecated.
               return;
           }
           String key = Util.getPackageName(pkg);
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/ClassTree.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -122,8 +122,12 @@
      */
     private void buildTree(ClassDoc[] classes, Configuration configuration) {
         for (int i = 0; i < classes.length; i++) {
+            // In the tree page (e.g overview-tree.html) do not include
+            // information of classes which are deprecated or are a part of a
+            // deprecated package.
             if (configuration.nodeprecated &&
-                    classes[i].tags("deprecated").length > 0) {
+                    (Util.isDeprecated(classes[i]) ||
+                    Util.isDeprecated(classes[i].containingPackage()))) {
                 continue;
             }
             if (classes[i].isEnum()) {
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DeprecatedAPIListBuilder.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -27,27 +27,29 @@
 
 import com.sun.javadoc.*;
 import java.util.*;
+import com.sun.tools.doclets.internal.toolkit.Configuration;
 
 /**
- * Build list of all the deprecated classes, constructors, fields and methods.
+ * Build list of all the deprecated packages, classes, constructors, fields and methods.
  *
  * @author Atul M Dambalkar
  */
 public class DeprecatedAPIListBuilder {
 
-    public static final int NUM_TYPES = 11;
+    public static final int NUM_TYPES = 12;
 
-    public static final int INTERFACE = 0;
-    public static final int CLASS = 1;
-    public static final int ENUM = 2;
-    public static final int EXCEPTION = 3;
-    public static final int ERROR = 4;
-    public static final int ANNOTATION_TYPE = 5;
-    public static final int FIELD = 6;
-    public static final int METHOD = 7;
-    public static final int CONSTRUCTOR = 8;
-    public static final int ENUM_CONSTANT = 9;
-    public static final int ANNOTATION_TYPE_MEMBER = 10;
+    public static final int PACKAGE = 0;
+    public static final int INTERFACE = 1;
+    public static final int CLASS = 2;
+    public static final int ENUM = 3;
+    public static final int EXCEPTION = 4;
+    public static final int ERROR = 5;
+    public static final int ANNOTATION_TYPE = 6;
+    public static final int FIELD = 7;
+    public static final int METHOD = 8;
+    public static final int CONSTRUCTOR = 9;
+    public static final int ENUM_CONSTANT = 10;
+    public static final int ANNOTATION_TYPE_MEMBER = 11;
 
     /**
      * List of deprecated type Lists.
@@ -58,25 +60,33 @@
     /**
      * Constructor.
      *
-     * @param root Root of the tree.
+     * @param configuration the current configuration of the doclet
      */
-    public DeprecatedAPIListBuilder(RootDoc root) {
+    public DeprecatedAPIListBuilder(Configuration configuration) {
         deprecatedLists = new ArrayList<List<Doc>>();
         for (int i = 0; i < NUM_TYPES; i++) {
             deprecatedLists.add(i, new ArrayList<Doc>());
         }
-        buildDeprecatedAPIInfo(root);
+        buildDeprecatedAPIInfo(configuration);
     }
 
     /**
      * Build the sorted list of all the deprecated APIs in this run.
-     * Build separate lists for deprecated classes, constructors, methods and
-     * fields.
+     * Build separate lists for deprecated packages, classes, constructors,
+     * methods and fields.
      *
-     * @param root Root of the tree.
+     * @param configuration the current configuration of the doclet.
      */
-    private void buildDeprecatedAPIInfo(RootDoc root) {
-        ClassDoc[] classes = root.classes();
+    private void buildDeprecatedAPIInfo(Configuration configuration) {
+        PackageDoc[] packages = configuration.packages;
+        PackageDoc pkg;
+        for (int c = 0; c < packages.length; c++) {
+            pkg = packages[c];
+            if (Util.isDeprecated(pkg)) {
+                getList(PACKAGE).add(pkg);
+            }
+        }
+        ClassDoc[] classes = configuration.root.classes();
         for (int i = 0; i < classes.length; i++) {
             ClassDoc cd = classes[i];
             if (Util.isDeprecated(cd)) {
@@ -90,7 +100,7 @@
                     getList(ENUM).add(cd);
                 } else if (cd.isError()) {
                     getList(ERROR).add(cd);
-                }else if (cd.isAnnotationType()) {
+                } else if (cd.isAnnotationType()) {
                     getList(ANNOTATION_TYPE).add(cd);
                 }
             }
@@ -102,7 +112,7 @@
             }
             if (cd.isAnnotationType()) {
                 composeDeprecatedList(getList(ANNOTATION_TYPE_MEMBER),
-                    ((AnnotationTypeDoc) cd).elements());
+                        ((AnnotationTypeDoc) cd).elements());
             }
         }
         sortDeprecatedLists();
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/IndexBuilder.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2008, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -207,7 +207,17 @@
      * Should this doc element be added to the index map?
      */
     protected boolean shouldAddToIndexMap(Doc element) {
-        return !(noDeprecated && element.tags("deprecated").length > 0);
+        if (element instanceof PackageDoc)
+            // Do not add to index map if -nodeprecated option is set and the
+            // package is marked as deprecated.
+            return !(noDeprecated && Util.isDeprecated(element));
+        else
+            // Do not add to index map if -nodeprecated option is set and if the
+            // Doc is marked as deprecated or the containing package is marked as
+            // deprecated.
+            return !(noDeprecated &&
+                    (Util.isDeprecated(element) ||
+                    Util.isDeprecated(((ProgramElementDoc)element).containingPackage())));
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/PackageListWriter.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -76,13 +76,16 @@
 
     protected void generatePackageListFile(RootDoc root) {
         PackageDoc[] packages = configuration.packages;
-        String[] names = new String[packages.length];
+        ArrayList<String> names = new ArrayList<String>();
         for (int i = 0; i < packages.length; i++) {
-            names[i] = packages[i].name();
+            // if the -nodeprecated option is set and the package is marked as
+            // deprecated, do not include it in the packages list.
+            if (!(configuration.nodeprecated && Util.isDeprecated(packages[i])))
+                names.add(packages[i].name());
         }
-        Arrays.sort(names);
-        for (int i = 0; i < packages.length; i++) {
-            println(names[i]);
+        Collections.sort(names);
+        for (int i = 0; i < names.size(); i++) {
+            println(names.get(i));
         }
     }
 }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/Util.java	Tue May 24 11:12:40 2011 -0700
@@ -861,11 +861,15 @@
      * @param doc the Doc to check.
      * @return true if the given Doc is deprecated.
      */
-    public static boolean isDeprecated(ProgramElementDoc doc) {
+    public static boolean isDeprecated(Doc doc) {
         if (doc.tags("deprecated").length > 0) {
             return true;
         }
-        AnnotationDesc[] annotationDescList = doc.annotations();
+        AnnotationDesc[] annotationDescList;
+        if (doc instanceof PackageDoc)
+            annotationDescList = ((PackageDoc)doc).annotations();
+        else
+            annotationDescList = ((ProgramElementDoc)doc).annotations();
         for (int i = 0; i < annotationDescList.length; i++) {
             if (annotationDescList[i].annotationType().qualifiedName().equals(
                    java.lang.Deprecated.class.getName())){
--- a/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/api/JavacTrees.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -34,11 +34,13 @@
 import javax.lang.model.element.ExecutableElement;
 import javax.lang.model.element.TypeElement;
 import javax.lang.model.type.DeclaredType;
+import javax.lang.model.type.TypeKind;
 import javax.lang.model.type.TypeMirror;
 import javax.tools.Diagnostic;
 import javax.tools.JavaCompiler;
 import javax.tools.JavaFileObject;
 
+import com.sun.source.tree.CatchTree;
 import com.sun.source.tree.CompilationUnitTree;
 import com.sun.source.tree.Scope;
 import com.sun.source.tree.Tree;
@@ -49,7 +51,7 @@
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
 import com.sun.tools.javac.code.Symbol.TypeSymbol;
 import com.sun.tools.javac.code.Symbol;
-import com.sun.tools.javac.code.Type;
+import com.sun.tools.javac.code.Type.UnionClassType;
 import com.sun.tools.javac.comp.Attr;
 import com.sun.tools.javac.comp.AttrContext;
 import com.sun.tools.javac.comp.Enter;
@@ -430,4 +432,16 @@
                 log.useSource(oldSource);
         }
     }
+
+    @Override
+    public TypeMirror getLub(CatchTree tree) {
+        JCCatch ct = (JCCatch) tree;
+        JCVariableDecl v = ct.param;
+        if (v.type != null && v.type.getKind() == TypeKind.UNION) {
+            UnionClassType ut = (UnionClassType) v.type;
+            return ut.getLub();
+        } else {
+            return v.type;
+        }
+    }
 }
--- a/src/share/classes/com/sun/tools/javac/code/Source.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Source.java	Tue May 24 11:12:40 2011 -0700
@@ -186,6 +186,9 @@
     public boolean allowSimplifiedVarargs() {
         return compareTo(JDK1_7) >= 0;
     }
+    public boolean allowObjectToPrimitiveCast() {
+        return compareTo(JDK1_7) >= 0;
+    }
     public static SourceVersion toSourceVersion(Source source) {
         switch(source) {
         case JDK1_2:
--- a/src/share/classes/com/sun/tools/javac/code/Type.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Tue May 24 11:12:40 2011 -0700
@@ -25,6 +25,8 @@
 
 package com.sun.tools.javac.code;
 
+import java.util.Collections;
+
 import com.sun.tools.javac.util.*;
 import com.sun.tools.javac.code.Symbol.*;
 
@@ -741,6 +743,38 @@
         }
     }
 
+    // a clone of a ClassType that knows about the alternatives of a union type.
+    public static class UnionClassType extends ClassType implements UnionType {
+        final List<? extends Type> alternatives_field;
+
+        public UnionClassType(ClassType ct, List<? extends Type> alternatives) {
+            super(ct.outer_field, ct.typarams_field, ct.tsym);
+            allparams_field = ct.allparams_field;
+            supertype_field = ct.supertype_field;
+            interfaces_field = ct.interfaces_field;
+            all_interfaces_field = ct.interfaces_field;
+            alternatives_field = alternatives;
+        }
+
+        public Type getLub() {
+            return tsym.type;
+        }
+
+        public java.util.List<? extends TypeMirror> getAlternatives() {
+            return Collections.unmodifiableList(alternatives_field);
+        }
+
+        @Override
+        public TypeKind getKind() {
+            return TypeKind.UNION;
+        }
+
+        @Override
+        public <R, P> R accept(TypeVisitor<R, P> v, P p) {
+            return v.visitUnion(this, p);
+        }
+    }
+
     public static class ArrayType extends Type
             implements javax.lang.model.type.ArrayType {
 
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Tue May 24 11:12:40 2011 -0700
@@ -74,8 +74,9 @@
     final JavacMessages messages;
     final Names names;
     final boolean allowBoxing;
+    final boolean allowCovariantReturns;
+    final boolean allowObjectToPrimitiveCast;
     final ClassReader reader;
-    final Source source;
     final Check chk;
     List<Warner> warnStack = List.nil();
     final Name capturedName;
@@ -92,9 +93,11 @@
         context.put(typesKey, this);
         syms = Symtab.instance(context);
         names = Names.instance(context);
-        allowBoxing = Source.instance(context).allowBoxing();
+        Source source = Source.instance(context);
+        allowBoxing = source.allowBoxing();
+        allowCovariantReturns = source.allowCovariantReturns();
+        allowObjectToPrimitiveCast = source.allowObjectToPrimitiveCast();
         reader = ClassReader.instance(context);
-        source = Source.instance(context);
         chk = Check.instance(context);
         capturedName = names.fromString("<captured wildcard>");
         messages = JavacMessages.instance(context);
@@ -409,6 +412,7 @@
                     return
                         s.tag == BOT || s.tag == CLASS ||
                         s.tag == ARRAY || s.tag == TYPEVAR;
+                case WILDCARD: //we shouldn't be here - avoids crash (see 7034495)
                 case NONE:
                     return false;
                 default:
@@ -949,8 +953,9 @@
             return true;
 
         if (t.isPrimitive() != s.isPrimitive())
-            return allowBoxing && (isConvertible(t, s, warn) || isConvertible(s, t, warn));
-
+            return allowBoxing && (
+                    isConvertible(t, s, warn)
+                    || (allowObjectToPrimitiveCast && isConvertible(s, t, warn)));
         if (warn != warnStack.head) {
             try {
                 warnStack = warnStack.prepend(warn);
@@ -2309,7 +2314,7 @@
             if (elemtype == t.elemtype)
                 return t;
             else
-                return new ArrayType(elemtype, t.tsym);
+                return new ArrayType(upperBound(elemtype), t.tsym);
         }
 
         @Override
@@ -3070,7 +3075,7 @@
 
         if (hasSameArgs(r1, r2))
             return covariantReturnType(r1.getReturnType(), r2res, warner);
-        if (!source.allowCovariantReturns())
+        if (!allowCovariantReturns)
             return false;
         if (isSubtypeUnchecked(r1.getReturnType(), r2res, warner))
             return true;
@@ -3087,7 +3092,7 @@
     public boolean covariantReturnType(Type t, Type s, Warner warner) {
         return
             isSameType(t, s) ||
-            source.allowCovariantReturns() &&
+            allowCovariantReturns &&
             !t.isPrimitive() &&
             !s.isPrimitive() &&
             isAssignable(t, s, warner);
@@ -3293,7 +3298,7 @@
         }
         if (giveWarning && !isReifiable(reverse ? from : to))
             warn.warn(LintCategory.UNCHECKED);
-        if (!source.allowCovariantReturns())
+        if (!allowCovariantReturns)
             // reject if there is a common method signature with
             // incompatible return types.
             chk.checkCompatibleAbstracts(warn.pos(), from, to);
@@ -3320,7 +3325,7 @@
         Type t2 = to;
         if (disjointTypes(t1.getTypeArguments(), t2.getTypeArguments()))
             return false;
-        if (!source.allowCovariantReturns())
+        if (!allowCovariantReturns)
             // reject if there is a common method signature with
             // incompatible return types.
             chk.checkCompatibleAbstracts(warn.pos(), from, to);
--- a/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Annotate.java	Tue May 24 11:12:40 2011 -0700
@@ -168,11 +168,11 @@
             }
             JCIdent left = (JCIdent)assign.lhs;
             Symbol method = rs.resolveQualifiedMethod(left.pos(),
-                                                      env,
-                                                      a.type,
-                                                      left.name,
-                                                      List.<Type>nil(),
-                                                      null);
+                                                          env,
+                                                          a.type,
+                                                          left.name,
+                                                          List.<Type>nil(),
+                                                          null);
             left.sym = method;
             left.type = method.type;
             if (method.owner != a.type.tsym)
@@ -190,6 +190,15 @@
     Attribute enterAttributeValue(Type expected,
                                   JCExpression tree,
                                   Env<AttrContext> env) {
+        //first, try completing the attribution value sym - if a completion
+        //error is thrown, we should recover gracefully, and display an
+        //ordinary resolution diagnostic.
+        try {
+            expected.tsym.complete();
+        } catch(CompletionFailure e) {
+            log.error(tree.pos(), "cant.resolve", Kinds.kindName(e.sym), e.sym);
+            return new Attribute.Error(expected);
+        }
         if (expected.isPrimitive() || types.isSameType(expected, syms.stringType)) {
             Type result = attr.attribExpr(tree, env, expected);
             if (result.isErroneous())
--- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Tue May 24 11:12:40 2011 -0700
@@ -2910,6 +2910,7 @@
 
     public void visitTypeUnion(JCTypeUnion tree) {
         ListBuffer<Type> multicatchTypes = ListBuffer.lb();
+        ListBuffer<Type> all_multicatchTypes = null; // lazy, only if needed
         for (JCExpression typeTree : tree.alternatives) {
             Type ctype = attribType(typeTree, env);
             ctype = chk.checkType(typeTree.pos(),
@@ -2931,9 +2932,23 @@
                     }
                 }
                 multicatchTypes.append(ctype);
+                if (all_multicatchTypes != null)
+                    all_multicatchTypes.append(ctype);
+            } else {
+                if (all_multicatchTypes == null) {
+                    all_multicatchTypes = ListBuffer.lb();
+                    all_multicatchTypes.appendList(multicatchTypes);
+                }
+                all_multicatchTypes.append(ctype);
             }
         }
-        tree.type = result = check(tree, types.lub(multicatchTypes.toList()), TYP, pkind, pt);
+        Type t = check(tree, types.lub(multicatchTypes.toList()), TYP, pkind, pt);
+        if (t.tag == CLASS) {
+            List<Type> alternatives =
+                ((all_multicatchTypes == null) ? multicatchTypes : all_multicatchTypes).toList();
+            t = new UnionClassType((ClassType) t, alternatives);
+        }
+        tree.type = result = t;
     }
 
     public void visitTypeParameter(JCTypeParameter tree) {
--- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Tue May 24 11:12:40 2011 -0700
@@ -681,6 +681,12 @@
                 "cant.apply.diamond.1",
                 t, diags.fragment("diamond.non.generic", t));
             return types.createErrorType(t);
+        } else if (tree.typeargs != null &&
+                tree.typeargs.nonEmpty()) {
+            log.error(tree.clazz.pos(),
+                "cant.apply.diamond.1",
+                t, diags.fragment("diamond.and.explicit.params", t));
+            return types.createErrorType(t);
         } else {
             return t;
         }
--- a/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java	Tue May 24 11:12:40 2011 -0700
@@ -1153,8 +1153,7 @@
         if (chk.subset(exc, caughtInTry)) {
             log.error(pos, "except.already.caught", exc);
         } else if (!chk.isUnchecked(pos, exc) &&
-                exc.tsym != syms.throwableType.tsym &&
-                exc.tsym != syms.exceptionType.tsym &&
+                !isExceptionOrThrowable(exc) &&
                 !chk.intersects(exc, thrownInTry)) {
             log.error(pos, "except.never.thrown.in.try", exc);
         } else if (allowImprovedCatchAnalysis) {
@@ -1163,7 +1162,8 @@
             // unchecked exception, the result list would not be empty, as the augmented
             // thrown set includes { RuntimeException, Error }; if 'exc' was a checked
             // exception, that would have been covered in the branch above
-            if (chk.diff(catchableThrownTypes, caughtInTry).isEmpty()) {
+            if (chk.diff(catchableThrownTypes, caughtInTry).isEmpty() &&
+                    !isExceptionOrThrowable(exc)) {
                 String key = catchableThrownTypes.length() == 1 ?
                         "unreachable.catch" :
                         "unreachable.catch.1";
@@ -1171,6 +1171,12 @@
             }
         }
     }
+    //where
+        private boolean isExceptionOrThrowable(Type exc) {
+            return exc.tsym == syms.throwableType.tsym ||
+                exc.tsym == syms.exceptionType.tsym;
+        }
+
 
     public void visitConditional(JCConditional tree) {
         scanCond(tree.cond);
--- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Tue May 24 11:12:40 2011 -0700
@@ -1609,18 +1609,31 @@
             // type.tsym.flatName() should == proxy.enumFlatName
             TypeSymbol enumTypeSym = proxy.enumType.tsym;
             VarSymbol enumerator = null;
-            for (Scope.Entry e = enumTypeSym.members().lookup(proxy.enumerator);
-                 e.scope != null;
-                 e = e.next()) {
-                if (e.sym.kind == VAR) {
-                    enumerator = (VarSymbol)e.sym;
-                    break;
+            CompletionFailure failure = null;
+            try {
+                for (Scope.Entry e = enumTypeSym.members().lookup(proxy.enumerator);
+                     e.scope != null;
+                     e = e.next()) {
+                    if (e.sym.kind == VAR) {
+                        enumerator = (VarSymbol)e.sym;
+                        break;
+                    }
                 }
             }
+            catch (CompletionFailure ex) {
+                failure = ex;
+            }
             if (enumerator == null) {
-                log.error("unknown.enum.constant",
-                          currentClassFile, enumTypeSym, proxy.enumerator);
-                result = new Attribute.Error(enumTypeSym.type);
+                if (failure != null) {
+                    log.warning("unknown.enum.constant.reason",
+                              currentClassFile, enumTypeSym, proxy.enumerator,
+                              failure.getDiagnostic());
+                } else {
+                    log.warning("unknown.enum.constant",
+                              currentClassFile, enumTypeSym, proxy.enumerator);
+                }
+                result = new Attribute.Enum(enumTypeSym.type,
+                        new VarSymbol(0, proxy.enumerator, syms.botType, enumTypeSym));
             } else {
                 result = new Attribute.Enum(enumTypeSym.type, enumerator);
             }
--- a/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Code.java	Tue May 24 11:12:40 2011 -0700
@@ -479,7 +479,12 @@
             state.pop(1);// index
             Type a = state.stack[state.stacksize-1];
             state.pop(1);
-            state.push(types.erasure(types.elemtype(a))); }
+            //sometimes 'null type' is treated as a one-dimensional array type
+            //see Gen.visitLiteral - we should handle this case accordingly
+            Type stackType = a.tag == BOT ?
+                syms.objectType :
+                types.erasure(types.elemtype(a));
+            state.push(stackType); }
             break;
         case goto_:
             markDead();
--- a/src/share/classes/com/sun/tools/javac/model/JavacTypes.java	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/model/JavacTypes.java	Tue May 24 11:12:40 2011 -0700
@@ -72,11 +72,11 @@
     }
 
     public Element asElement(TypeMirror t) {
-        Type type = cast(Type.class, t);
-        switch (type.tag) {
-            case TypeTags.CLASS:
-            case TypeTags.ERROR:
-            case TypeTags.TYPEVAR:
+        switch (t.getKind()) {
+            case DECLARED:
+            case ERROR:
+            case TYPEVAR:
+                Type type = cast(Type.class, t);
                 return type.asElement();
             default:
                 return null;
--- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties	Tue May 24 11:12:40 2011 -0700
@@ -762,9 +762,6 @@
 compiler.err.unclosed.str.lit=\
     unclosed string literal
 
-compiler.err.unknown.enum.constant=\
-    in class file {0}: unknown enum constant {1}.{2}
-
 # 0: name
 compiler.err.unsupported.encoding=\
     unsupported encoding: {0}
@@ -1307,6 +1304,15 @@
 compiler.warn.annotation.method.not.found.reason=\
     Cannot find annotation method ''{1}()'' in type ''{0}'': {2}
 
+# 0: symbol, 1: name
+compiler.warn.unknown.enum.constant=\
+    unknown enum constant {1}.{2}
+
+# 0: symbol, 1: name, 2: message segment
+compiler.warn.unknown.enum.constant.reason=\
+    unknown enum constant {1}.{2}\n\
+    reason: {3}
+
 # 0: type, 1: type
 compiler.warn.raw.class.use=\
     found raw type: {0}\n\
@@ -1618,6 +1624,9 @@
 compiler.misc.diamond.non.generic=\
     cannot use ''<>'' with non-generic class {0}
 
+compiler.misc.diamond.and.explicit.params=\
+    cannot use ''<>'' with explicit type parameters for constructor
+
 # 0: type, 1: list of type
 compiler.misc.explicit.param.do.not.conform.to.bounds=\
     explicit type argument {0} does not conform to declared bound(s) {1}
--- a/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Tue May 24 11:12:40 2011 -0700
@@ -228,6 +228,9 @@
 # 0: symbol
 compiler.err.multicatch.parameter.may.not.be.assigned=\u8907\u6570catch\u30D1\u30E9\u30E1\u30FC\u30BF{0}\u306B\u5024\u3092\u4EE3\u5165\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
+# 0: type, 1: type
+compiler.err.multicatch.types.must.be.disjoint=\u8907\u6570catch\u6587\u306E\u4EE3\u66FF\u3092\u30B5\u30D6\u30AF\u30E9\u30B9\u5316\u306B\u3088\u3063\u3066\u95A2\u9023\u4ED8\u3051\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n\u4EE3\u66FF{0}\u306F\u4EE3\u66FF{1}\u306E\u30B5\u30D6\u30AF\u30E9\u30B9\u3067\u3059
+
 compiler.err.finally.without.try=''finally''\u3078\u306E''try''\u304C\u3042\u308A\u307E\u305B\u3093
 
 # 0: type, 1: message segment
@@ -436,8 +439,12 @@
 
 # Errors related to annotation processing
 
+# 0: symbol, 1: string, 2: stack-trace
 compiler.err.proc.cant.access={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}\n\u8A73\u7D30\u306F\u6B21\u306E\u30B9\u30BF\u30C3\u30AF\u30C8\u30EC\u30FC\u30B9\u3067\u8ABF\u67FB\u3057\u3066\u304F\u3060\u3055\u3044\u3002\n{2}
 
+# 0: symbol, 1: string
+compiler.err.proc.cant.access.1={0}\u306B\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u307E\u305B\u3093\n{1}
+
 # 0: string
 compiler.err.proc.cant.find.class=''{0}''\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3067\u3057\u305F\u3002
 
@@ -535,8 +542,6 @@
 
 compiler.err.unclosed.str.lit=\u6587\u5B57\u5217\u30EA\u30C6\u30E9\u30EB\u304C\u9589\u3058\u3089\u308C\u3066\u3044\u307E\u305B\u3093
 
-compiler.err.unknown.enum.constant=\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB{0}\u5185: \u4E0D\u660E\u306A\u5217\u6319\u578B\u5B9A\u6570\u3067\u3059{1}.{2}
-
 # 0: name
 compiler.err.unsupported.encoding=\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u306A\u3044\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3067\u3059: {0}
 
@@ -686,6 +691,7 @@
 
 # 0: file name
 compiler.note.sunapi.filename={0}\u306F\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u5185\u90E8\u6240\u6709\u306EAPI\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002
+
 compiler.note.sunapi.plural=\u4E00\u90E8\u306E\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u306F\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u5185\u90E8\u6240\u6709\u306EAPI\u3092\u4F7F\u7528\u3057\u3066\u3044\u307E\u3059\u3002
 
 # The following string may appear after one of the above sunapi messages.
@@ -796,6 +802,12 @@
 # 0: type, 1: type
 compiler.warn.inexact.non-varargs.call=\u6700\u7D42\u30D1\u30E9\u30E1\u30FC\u30BF\u306E\u4E0D\u6B63\u78BA\u306A\u5F15\u6570\u578B\u3092\u6301\u3063\u305F\u53EF\u5909\u5F15\u6570\u30E1\u30BD\u30C3\u30C9\u306E\u975E\u53EF\u5909\u5F15\u6570\u547C\u51FA\u3057\u3002\n\u53EF\u5909\u5F15\u6570\u547C\u51FA\u3057\u306B\u95A2\u3057\u3066\u306F{0}\u306B\u30AD\u30E3\u30B9\u30C8\u3057\u307E\u3059\u3002\n\u975E\u53EF\u5909\u5F15\u6570\u547C\u51FA\u3057\u306B\u95A2\u3057\u3066\u306F{1}\u306B\u30AD\u30E3\u30B9\u30C8\u3057\u3066\u3053\u306E\u8B66\u544A\u3092\u51FA\u3055\u306A\u3044\u3088\u3046\u306B\u3057\u307E\u3059
 
+# 0: list of type
+compiler.warn.unreachable.catch=catch\u53E5\u306B\u79FB\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\n\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u3059\u3067\u306B\u6355\u6349\u3055\u308C\u3066\u3044\u307E\u3059
+
+# 0: list of type
+compiler.warn.unreachable.catch.1=catch\u53E5\u306B\u79FB\u3059\u3053\u3068\u304C\u3067\u304D\u307E\u305B\u3093\n\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u3059\u3067\u306B\u6355\u6349\u3055\u308C\u3066\u3044\u307E\u3059
+
 # 0: symbol
 compiler.warn.long.SVUID=serialVersionUID\u306F\u3001\u30AF\u30E9\u30B9{0}\u306Elong\u578B\u3067\u3042\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059
 
@@ -888,6 +900,9 @@
 # 0: symbol
 compiler.warn.try.resource.not.referenced=\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u53EF\u80FD\u306A\u30EA\u30BD\u30FC\u30B9{0}\u306F\u5BFE\u5FDC\u3059\u308Btry\u6587\u306E\u672C\u4F53\u3067\u306F\u53C2\u7167\u3055\u308C\u307E\u305B\u3093
 
+# 0: type
+compiler.warn.try.resource.throws.interrupted.exc=\u81EA\u52D5\u30AF\u30ED\u30FC\u30BA\u53EF\u80FD\u306A\u30EA\u30BD\u30FC\u30B9{0}\u306B\u3001InterruptedException\u3092\u30B9\u30ED\u30FC\u3059\u308B\u53EF\u80FD\u6027\u304C\u3042\u308B\u30E1\u30F3\u30D0\u30FC\u30FB\u30E1\u30BD\u30C3\u30C9close()\u304C\u3042\u308A\u307E\u3059
+
 compiler.warn.unchecked.assign={0}\u304B\u3089{1}\u3078\u306E\u7121\u691C\u67FB\u4EE3\u5165\u3067\u3059
 
 # 0: symbol, 1: type
@@ -924,6 +939,12 @@
 
 compiler.warn.annotation.method.not.found.reason=\u30BF\u30A4\u30D7''{0}''\u5185\u306B\u6CE8\u91C8\u30E1\u30BD\u30C3\u30C9''{1}()''\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {2}
 
+# 0: symbol, 1: name
+compiler.warn.unknown.enum.constant=\u4E0D\u660E\u306A\u5217\u6319\u578B\u5B9A\u6570\u3067\u3059{1}.{2}
+
+# 0: symbol, 1: name, 2: message segment
+compiler.warn.unknown.enum.constant.reason=\u4E0D\u660E\u306A\u5217\u6319\u578B\u5B9A\u6570\u3067\u3059{1}.{2}\n\u7406\u7531: {3}
+
 # 0: type, 1: type
 compiler.warn.raw.class.use=raw\u578B\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F: {0}\n\u6C4E\u7528\u30AF\u30E9\u30B9{1}\u306E\u578B\u5F15\u6570\u304C\u3042\u308A\u307E\u305B\u3093
 
@@ -1011,7 +1032,11 @@
 ## above strings.
 compiler.misc.bad.class.signature=\u30AF\u30E9\u30B9{0}\u306E\u30B7\u30B0\u30CB\u30C1\u30E3\u304C\u4E0D\u6B63\u3067\u3059
 
-compiler.misc.bad.enclosing.method=\u56F2\u3093\u3067\u3044\u308B\u30E1\u30BD\u30C3\u30C9\u5C5E\u6027\u304C\u4E0D\u6B63\u3067\u3059: {0}
+#0: symbol, 1: symbol
+compiler.misc.bad.enclosing.class={0}\u306E\u5185\u90E8\u30AF\u30E9\u30B9\u304C\u4E0D\u6B63\u3067\u3059: {1}
+
+# 0: symbol
+compiler.misc.bad.enclosing.method=\u30AF\u30E9\u30B9{0}\u306E\u56F2\u3093\u3067\u3044\u308B\u30E1\u30BD\u30C3\u30C9\u5C5E\u6027\u304C\u4E0D\u6B63\u3067\u3059
 
 compiler.misc.bad.runtime.invisible.param.annotations=RuntimeInvisibleParameterAnnotations\u5C5E\u6027\u304C\u4E0D\u6B63\u3067\u3059: {0}
 
@@ -1140,11 +1165,7 @@
 # 0: type
 compiler.misc.diamond.non.generic=\u975E\u6C4E\u7528\u30AF\u30E9\u30B9{0}\u3067''<>''\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
-# 0: list of type, 1: message segment
-compiler.misc.diamond.invalid.arg={1}\u306B\u3064\u3044\u3066\u63A8\u5B9A\u3055\u308C\u305F\u578B\u5F15\u6570{0}\u306F\u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
-
-# 0: list of type, 1: message segment
-compiler.misc.diamond.invalid.args={1}\u306B\u3064\u3044\u3066\u63A8\u5B9A\u3055\u308C\u305F\u578B\u5F15\u6570{0}\u306F\u3053\u306E\u30B3\u30F3\u30C6\u30AD\u30B9\u30C8\u3067\u306F\u8A31\u53EF\u3055\u308C\u307E\u305B\u3093
+compiler.misc.diamond.and.explicit.params=\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u306E\u660E\u793A\u7684\u306A\u578B\u30D1\u30E9\u30E1\u30FC\u30BF\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
 # 0: type, 1: list of type
 compiler.misc.explicit.param.do.not.conform.to.bounds=\u660E\u793A\u7684\u306A\u578B\u5F15\u6570{0}\u306F\u3001\u5BA3\u8A00\u3055\u308C\u305F\u5883\u754C{1}\u306B\u9069\u5408\u3057\u307E\u305B\u3093
@@ -1291,7 +1312,7 @@
 # 0: symbol, 1: symbol, 2: symbol, 3: symbol
 compiler.misc.varargs.clash.with={1}\u306E{0}\u306F{3}\u306E{2}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u3059
 
-compiler.misc.non.denotable.type=\u3053\u3053\u3067\u975E\u578B\u6307\u5B9A\u578B{0}\u3092\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
+compiler.misc.diamond.and.anon.class=\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3067\u306F''<>''\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
 
 # 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
 compiler.misc.inapplicable.method={0} {1}.{2}\u306F\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\n({3})
--- a/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Tue May 24 11:12:40 2011 -0700
@@ -228,6 +228,9 @@
 # 0: symbol
 compiler.err.multicatch.parameter.may.not.be.assigned=\u53EF\u80FD\u672A\u5206\u914D multi-catch \u53C2\u6570{0}
 
+# 0: type, 1: type
+compiler.err.multicatch.types.must.be.disjoint=multi-catch \u8BED\u53E5\u4E2D\u7684\u66FF\u4EE3\u65E0\u6CD5\u901A\u8FC7\u5B50\u7C7B\u5316\u5173\u8054\n\u66FF\u4EE3{0}\u662F\u66FF\u4EE3{1}\u7684\u5B50\u7C7B
+
 compiler.err.finally.without.try=\u6709 ''finally'', \u4F46\u662F\u6CA1\u6709 ''try''
 
 # 0: type, 1: message segment
@@ -436,8 +439,12 @@
 
 # Errors related to annotation processing
 
+# 0: symbol, 1: string, 2: stack-trace
 compiler.err.proc.cant.access=\u65E0\u6CD5\u8BBF\u95EE{0}\n{1}\n\u6709\u5173\u8BE6\u7EC6\u4FE1\u606F, \u8BF7\u53C2\u9605\u4EE5\u4E0B\u5806\u6808\u8DDF\u8E2A\u3002\n{2}
 
+# 0: symbol, 1: string
+compiler.err.proc.cant.access.1=\u65E0\u6CD5\u8BBF\u95EE{0}\n{1}
+
 # 0: string
 compiler.err.proc.cant.find.class=\u627E\u4E0D\u5230 ''{0}'' \u7684\u7C7B\u6587\u4EF6\u3002
 
@@ -535,8 +542,6 @@
 
 compiler.err.unclosed.str.lit=\u672A\u7ED3\u675F\u7684\u5B57\u7B26\u4E32\u6587\u5B57
 
-compiler.err.unknown.enum.constant=\u5728\u7C7B\u6587\u4EF6{0}\u4E2D: \u672A\u77E5\u7684\u679A\u4E3E\u5E38\u91CF {1}.{2}
-
 # 0: name
 compiler.err.unsupported.encoding=\u4E0D\u652F\u6301\u7684\u7F16\u7801: {0}
 
@@ -686,6 +691,7 @@
 
 # 0: file name
 compiler.note.sunapi.filename={0}\u4F7F\u7528\u4E86\u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u7684\u5185\u90E8\u4E13\u7528 API\u3002
+
 compiler.note.sunapi.plural=\u67D0\u4E9B\u8F93\u5165\u6587\u4EF6\u4F7F\u7528\u4E86\u53EF\u80FD\u4F1A\u5728\u672A\u6765\u53D1\u884C\u7248\u4E2D\u5220\u9664\u7684\u5185\u90E8\u4E13\u7528 API\u3002
 
 # The following string may appear after one of the above sunapi messages.
@@ -796,6 +802,12 @@
 # 0: type, 1: type
 compiler.warn.inexact.non-varargs.call=\u6700\u540E\u4E00\u4E2A\u53C2\u6570\u4F7F\u7528\u4E86\u4E0D\u51C6\u786E\u7684\u53D8\u91CF\u7C7B\u578B\u7684 varargs \u65B9\u6CD5\u7684\u975E varargs \u8C03\u7528; \n\u5BF9\u4E8E varargs \u8C03\u7528, \u5E94\u4F7F\u7528 {0}\n\u5BF9\u4E8E\u975E varargs \u8C03\u7528, \u5E94\u4F7F\u7528 {1}, \u8FD9\u6837\u4E5F\u53EF\u4EE5\u6291\u5236\u6B64\u8B66\u544A
 
+# 0: list of type
+compiler.warn.unreachable.catch=catch \u5B50\u53E5\u65E0\u6CD5\u8BBF\u95EE\n\u5DF2\u6355\u83B7\u5230\u629B\u51FA\u7684\u7C7B\u578B{0}
+
+# 0: list of type
+compiler.warn.unreachable.catch.1=catch \u5B50\u53E5\u65E0\u6CD5\u8BBF\u95EE\n\u5DF2\u6355\u83B7\u5230\u629B\u51FA\u7684\u7C7B\u578B{0}
+
 # 0: symbol
 compiler.warn.long.SVUID=serialVersionUID \u5728\u7C7B{0}\u4E2D\u5FC5\u987B\u662F long \u7C7B\u578B
 
@@ -888,6 +900,9 @@
 # 0: symbol
 compiler.warn.try.resource.not.referenced=\u4E0D\u80FD\u5728\u76F8\u5E94\u7684 try \u8BED\u53E5\u7684\u6B63\u6587\u4E2D\u5F15\u7528\u53EF\u81EA\u52A8\u7ED3\u675F\u7684\u8D44\u6E90{0}
 
+# 0: type
+compiler.warn.try.resource.throws.interrupted.exc=\u53EF\u81EA\u52A8\u5173\u95ED\u7684\u8D44\u6E90{0}\u5305\u542B\u7684\u6210\u5458\u65B9\u6CD5 close() \u53EF\u80FD\u629B\u51FA InterruptedException
+
 compiler.warn.unchecked.assign=\u672A\u7ECF\u68C0\u67E5\u7684\u5206\u914D: \u5C06{0}\u5206\u914D\u7ED9{1}
 
 # 0: symbol, 1: type
@@ -924,6 +939,12 @@
 
 compiler.warn.annotation.method.not.found.reason=\u65E0\u6CD5\u627E\u5230\u7C7B\u578B ''{0}'' \u7684\u6CE8\u91CA\u65B9\u6CD5 ''{1}()'': {2}
 
+# 0: symbol, 1: name
+compiler.warn.unknown.enum.constant=\u672A\u77E5\u7684\u679A\u4E3E\u5E38\u91CF {1}.{2}
+
+# 0: symbol, 1: name, 2: message segment
+compiler.warn.unknown.enum.constant.reason=\u672A\u77E5\u7684\u679A\u4E3E\u5E38\u91CF {1}.{2}\n\u539F\u56E0: {3}
+
 # 0: type, 1: type
 compiler.warn.raw.class.use=\u627E\u5230\u539F\u59CB\u7C7B\u578B: {0}\n\u7F3A\u5C11\u6CDB\u578B\u7C7B{1}\u7684\u7C7B\u578B\u53C2\u6570
 
@@ -1011,7 +1032,11 @@
 ## above strings.
 compiler.misc.bad.class.signature=\u9519\u8BEF\u7684\u7C7B\u7B7E\u540D: {0}
 
-compiler.misc.bad.enclosing.method=\u9519\u8BEF\u7684\u5C01\u95ED\u65B9\u6CD5\u5C5E\u6027: {0}
+#0: symbol, 1: symbol
+compiler.misc.bad.enclosing.class={0}\u7684\u5C01\u95ED\u7C7B\u9519\u8BEF: {1}
+
+# 0: symbol
+compiler.misc.bad.enclosing.method=\u7C7B {0} \u7684\u5C01\u95ED\u65B9\u6CD5\u5C5E\u6027\u9519\u8BEF
 
 compiler.misc.bad.runtime.invisible.param.annotations=\u9519\u8BEF\u7684 RuntimeInvisibleParameterAnnotations \u5C5E\u6027: {0}
 
@@ -1140,11 +1165,7 @@
 # 0: type
 compiler.misc.diamond.non.generic=\u65E0\u6CD5\u5C06 ''<>'' \u4E0E\u975E\u6CDB\u578B\u7C7B{0}\u4E00\u8D77\u4F7F\u7528
 
-# 0: list of type, 1: message segment
-compiler.misc.diamond.invalid.arg=\u6B64\u4E0A\u4E0B\u6587\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4E3A{1}\u63A8\u65AD\u7684\u7C7B\u578B\u53C2\u6570{0}
-
-# 0: list of type, 1: message segment
-compiler.misc.diamond.invalid.args=\u6B64\u4E0A\u4E0B\u6587\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u4E3A{1}\u63A8\u65AD\u7684\u7C7B\u578B\u53C2\u6570{0}
+compiler.misc.diamond.and.explicit.params=\u4E0D\u80FD\u5C06 ''<>'' \u4E0E\u6784\u9020\u5668\u7684\u663E\u5F0F\u7C7B\u578B\u53C2\u6570\u4E00\u8D77\u4F7F\u7528
 
 # 0: type, 1: list of type
 compiler.misc.explicit.param.do.not.conform.to.bounds=\u663E\u5F0F\u7C7B\u578B\u53C2\u6570{0}\u4E0D\u7B26\u5408\u58F0\u660E\u7684\u8303\u56F4{1}
@@ -1291,7 +1312,7 @@
 # 0: symbol, 1: symbol, 2: symbol, 3: symbol
 compiler.misc.varargs.clash.with={1}\u4E2D\u7684{0}\u8986\u76D6\u4E86{3}\u4E2D\u7684{2}
 
-compiler.misc.non.denotable.type=\u6B64\u5904\u4E0D\u5141\u8BB8\u4F7F\u7528\u4E0D\u53EF\u6307\u793A\u7684\u7C7B\u578B{0}
+compiler.misc.diamond.and.anon.class=\u65E0\u6CD5\u5C06 ''<>'' \u4E0E\u533F\u540D\u5185\u90E8\u7C7B\u4E00\u8D77\u4F7F\u7528
 
 # 0: symbol kind, 1: symbol, 2: symbol, 3: message segment
 compiler.misc.inapplicable.method={0} {1}.{2}\u4E0D\u9002\u7528\n({3})
--- a/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties	Tue May 24 11:12:40 2011 -0700
@@ -87,6 +87,7 @@
 javac.opt.printRounds=\u6CE8\u91C8\u51E6\u7406\u306E\u5F80\u5FA9\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u5370\u5237\u3059\u308B
 javac.opt.printProcessorInfo=\u30D7\u30ED\u30BB\u30C3\u30B5\u304C\u51E6\u7406\u3092\u4F9D\u983C\u3055\u308C\u308B\u6CE8\u91C8\u306B\u3064\u3044\u3066\u306E\u60C5\u5831\u3092\u5370\u5237\u3059\u308B
 javac.opt.prefer=\u6697\u9ED9\u7684\u306B\u30B3\u30F3\u30D1\u30A4\u30EB\u3055\u308C\u308B\u30AF\u30E9\u30B9\u306B\u3064\u3044\u3066\u3001\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3068\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u4E21\u65B9\u304C\u898B\u3064\u304B\u3063\u305F\u969B\u3069\u3061\u3089\u3092\u8AAD\u307F\u8FBC\u3080\u304B\u6307\u5B9A\u3059\u308B
+javac.opt.AT=\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u306E\u8AAD\u53D6\u308A\u30AA\u30D7\u30B7\u30E7\u30F3\u304A\u3088\u3073\u30D5\u30A1\u30A4\u30EB\u540D
 
 ## errors
 
@@ -96,6 +97,7 @@
 javac.err.invalid.flag={0}\u306F\u7121\u52B9\u306A\u30D5\u30E9\u30B0\u3067\u3059
 javac.err.invalid.target={0}\u306F\u7121\u52B9\u306A\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30EA\u30EA\u30FC\u30B9\u3067\u3059
 javac.err.no.source.files=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093
+javac.err.no.source.files.classes=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u307E\u305F\u306F\u30AF\u30E9\u30B9\u540D\u304C\u3042\u308A\u307E\u305B\u3093
 javac.err.req.arg={0}\u306B\u306F\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059
 javac.err.invalid.source={0}\u306F\u7121\u52B9\u306A\u30BD\u30FC\u30B9\u30FB\u30EA\u30EA\u30FC\u30B9\u3067\u3059
 javac.err.error.writing.file={0}\u306E\u66F8\u8FBC\u307F\u30A8\u30E9\u30FC\u3067\u3059\u3002{1}
--- a/src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties	Tue May 24 11:12:40 2011 -0700
@@ -87,6 +87,7 @@
 javac.opt.printRounds=\u8F93\u51FA\u6709\u5173\u6CE8\u91CA\u5904\u7406\u5FAA\u73AF\u7684\u4FE1\u606F
 javac.opt.printProcessorInfo=\u8F93\u51FA\u6709\u5173\u8BF7\u6C42\u5904\u7406\u7A0B\u5E8F\u5904\u7406\u54EA\u4E9B\u6CE8\u91CA\u7684\u4FE1\u606F
 javac.opt.prefer=\u6307\u5B9A\u8BFB\u53D6\u6587\u4EF6, \u5F53\u540C\u65F6\u627E\u5230\u9690\u5F0F\u7F16\u8BD1\u7C7B\u7684\u6E90\u6587\u4EF6\u548C\u7C7B\u6587\u4EF6\u65F6
+javac.opt.AT=\u4ECE\u6587\u4EF6\u8BFB\u53D6\u9009\u9879\u548C\u6587\u4EF6\u540D
 
 ## errors
 
@@ -96,6 +97,7 @@
 javac.err.invalid.flag=\u65E0\u6548\u7684\u6807\u8BB0: {0}
 javac.err.invalid.target=\u65E0\u6548\u7684\u76EE\u6807\u53D1\u884C\u7248: {0}
 javac.err.no.source.files=\u65E0\u6E90\u6587\u4EF6
+javac.err.no.source.files.classes=\u65E0\u6E90\u6587\u4EF6\u6216\u7C7B\u540D
 javac.err.req.arg={0}\u9700\u8981\u53C2\u6570
 javac.err.invalid.source=\u65E0\u6548\u7684\u6E90\u53D1\u884C\u7248: {0}
 javac.err.error.writing.file=\u5199\u5165{0}\u65F6\u51FA\u9519; {1}
--- a/src/share/classes/com/sun/tools/javac/resources/legacy.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javac/resources/legacy.properties	Tue May 24 11:12:40 2011 -0700
@@ -266,6 +266,8 @@
 com.sun.swing.internal.plaf.basic.resources = tiger legacy
 com.sun.swing.internal.plaf.metal.resources = tiger legacy
 com.sun.swing.internal.plaf.synth.resources = tiger legacy
+com.sun.tracing = tiger legacy
+com.sun.tracing.dtrace = tiger legacy
 java.applet = tiger legacy
 java.awt = tiger legacy
 java.awt.color = tiger legacy
--- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties	Tue May 24 11:12:40 2011 -0700
@@ -75,7 +75,7 @@
 tag.End_delimiter_missing_for_possible_SeeTag=\u30B3\u30E1\u30F3\u30C8\u6587\u5B57\u5217"{0}"\u3067\u3001\u6709\u52B9\u306Asee\u30BF\u30B0\u306B\u7D42\u7AEF\u30C7\u30EA\u30DF\u30BF}\u304C\u3042\u308A\u307E\u305B\u3093
 tag.Improper_Use_Of_Link_Tag=\u30A4\u30F3\u30E9\u30A4\u30F3\u30FB\u30BF\u30B0"{0}"\u306B\u7D42\u4E86\u6587\u5B57''}''\u304C\u3042\u308A\u307E\u305B\u3093
 javadoc.File_Read_Error=\u30D5\u30A1\u30A4\u30EB{0}\u306E\u8AAD\u8FBC\u307F\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F
-javadoc.Body_missing_from_html_file=HTML\u30D5\u30A1\u30A4\u30EB\u306Bbody\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
+javadoc.Body_missing_from_html_file=HTML\u306Bbody\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
 javadoc.End_body_missing_from_html_file=HTML\u30D5\u30A1\u30A4\u30EB\u306Bbody\u306E\u9589\u3058\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093
 javadoc.Multiple_package_comments=\u30D1\u30C3\u30B1\u30FC\u30B8"{0}"\u306B\u8907\u6570\u306E\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30B3\u30E1\u30F3\u30C8\u306E\u30BD\u30FC\u30B9\u304C\u691C\u51FA\u3055\u308C\u307E\u3057\u305F
 javadoc.class_not_found=\u30AF\u30E9\u30B9{0}\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093\u3002
--- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Thu May 05 22:30:15 2011 -0700
+++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Tue May 24 11:12:40 2011 -0700
@@ -75,7 +75,7 @@
 tag.End_delimiter_missing_for_possible_SeeTag=\u6CE8\u91CA\u5B57\u7B26\u4E32\u4E2D\u53EF\u80FD\u51FA\u73B0\u7684 See \u6807\u8BB0\u7F3A\u5C11\u7ED3\u675F\u5206\u9694\u7B26 }: "{0}"
 tag.Improper_Use_Of_Link_Tag=\u5185\u5D4C\u6807\u8BB0\u7F3A\u5C11\u7ED3\u675F ''}'' \u5B57\u7B26: "{0}"
 javadoc.File_Read_Error=\u8BFB\u53D6\u6587\u4EF6{0}\u65F6\u51FA\u9519
-javadoc.Body_missing_from_html_file=HTML \u4E2D\u7F3A\u5C11\u4E3B\u4F53\u6807\u8BB0
+javadoc.Body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u6807\u8BB0
 javadoc.End_body_missing_from_html_file=HTML \u6587\u4EF6\u4E2D\u7F3A\u5C11\u4E3B\u4F53\u7ED3\u675F\u6807\u8BB0
 javadoc.Multiple_package_comments=\u627E\u5230\u7A0B\u5E8F\u5305 "{0}" \u7684\u591A\u4E2A\u7A0B\u5E8F\u5305\u6CE8\u91CA\u6E90
 javadoc.class_not_found=\u627E\u4E0D\u5230\u7C7B{0}\u3002
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocRootLink/TestDocRootLink.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,101 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 6553182
+ * @summary This test verifies the -Xdocrootparent option.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestDocRootLink
+ * @run main TestDocRootLink
+ */
+public class TestDocRootLink extends JavadocTester {
+
+    private static final String BUG_ID = "6553182";
+    private static final String[][] TEST1 = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html",
+            "<a href=\"../../technotes/guides/index.html\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
+            "<a href=\"../../technotes/guides/index.html\">"
+        }
+    };
+    private static final String[][] NEGATED_TEST1 = {
+        {BUG_ID + FS + "pkg1" + FS + "C1.html",
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html",
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
+        }
+    };
+    private static final String[][] TEST2 = {
+        {BUG_ID + FS + "pkg2" + FS + "C2.html",
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
+        },
+        {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
+            "<a href=\"http://download.oracle.com/javase/7/docs/technotes/guides/index.html\">"
+        }
+    };
+    private static final String[][] NEGATED_TEST2 = {
+        {BUG_ID + FS + "pkg2" + FS + "C2.html",
+            "<a href=\"../../technotes/guides/index.html\">"
+        },
+        {BUG_ID + FS + "pkg2" + FS + "package-summary.html",
+            "<a href=\"../../technotes/guides/index.html\">"
+        }
+    };
+    private static final String[] ARGS1 =
+            new String[]{
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"
+    };
+    private static final String[] ARGS2 =
+            new String[]{
+        "-d", BUG_ID, "-Xdocrootparent", "http://download.oracle.com/javase/7/docs", "-sourcepath", SRC_DIR, "pkg2"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestDocRootLink tester = new TestDocRootLink();
+        run(tester, ARGS1, TEST1, NEGATED_TEST1);
+        run(tester, ARGS2, TEST2, NEGATED_TEST2);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocRootLink/pkg1/C1.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+/**
+ * Class 1. This is a test.
+ * Refer <a href="{@docRoot}/../technotes/guides/index.html">Here</a>. Lets see if this works
+ * or not.
+ */
+public class C1 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocRootLink/pkg1/package.html	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>javax.management package</title>
+</head>
+<body bgcolor="white">
+This is a test.
+      <p id="spec">
+    @see <a href="{@docRoot}/../technotes/guides/index.html">
+      Test document 1</a>
+      in particular the
+      <a href="{@docRoot}/../technotes/guides/index.html">
+
+      Test document 2.</a>
+
+	@since 1.5
+
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocRootLink/pkg2/C2.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg2;
+
+/**
+ * Class 1. This is a test.
+ * Refer <a href="{@docRoot}/../technotes/guides/index.html">Here</a>. Lets see if this works
+ * or not.
+ */
+public class C2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testDocRootLink/pkg2/package.html	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,18 @@
+<html>
+<head>
+<title>javax.management package</title>
+</head>
+<body bgcolor="white">
+This is a test.
+      <p id="spec">
+    @see <a href="{@docRoot}/../technotes/guides/index.html">
+      Test document 1</a>
+      in particular the
+      <a href="{@docRoot}/../technotes/guides/index.html">
+
+      Test document 2.</a>
+
+	@since 1.5
+
+</body>
+</html>
--- a/test/com/sun/javadoc/testHelpOption/TestHelpOption.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/com/sun/javadoc/testHelpOption/TestHelpOption.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,20 +23,19 @@
 
 /*
  * @test
- * @bug      4934778 4777599
+ * @bug      4934778 4777599 6553182
  * @summary  Make sure that the -help option works properly.  Make sure
  *           the help link appears in the documentation.
  * @author   jamieh
  * @library  ../lib/
- * @build    JavadocTester
- * @build    TestHelpOption
+ * @build    JavadocTester TestHelpOption
  * @run main TestHelpOption
  */
 
 public class TestHelpOption extends JavadocTester {
 
     //Test information.
-    private static final String BUG_ID = "4934778-4777599";
+    private static final String BUG_ID = "4934778-4777599-6553182";
 
     //Javadoc arguments.
     private static final String[] ARGS = new String[] {
@@ -79,6 +78,7 @@
         {STANDARD_OUTPUT, "-tag "},
         {STANDARD_OUTPUT, "-taglet "},
         {STANDARD_OUTPUT, "-tagletpath "},
+        {STANDARD_OUTPUT, "-Xdocrootparent "},
         {STANDARD_OUTPUT, "-charset "},
         {STANDARD_OUTPUT, "-helpfile "},
         {STANDARD_OUTPUT, "-linksource "},
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/C2.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,55 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Another test class.
+ *
+ * @author Bhavesh Patel
+ */
+public class C2 {
+
+    public static enum ModalExclusionType {
+        /**
+         * Test comment.
+         */
+        NO_EXCLUDE,
+        /**
+         * Another comment.
+         */
+        APPLICATION_EXCLUDE
+    };
+
+    /**
+     * A string constant.
+     */
+    public static final String CONSTANT1 = "C2";
+
+    /**
+     * A sample method.
+     *
+     * @param param some parameter.
+     */
+    public void method(String param) {
+
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/FooDepr.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+import java.util.*;
+
+/**
+* Test Deprecated class
+* @deprecated This class is Deprecated.
+*/
+public class FooDepr {
+
+    public void method(Vector<Object> o){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/TestPackageDeprecation.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug      6492694
+ * @summary  Test package deprecation.
+ * @author   bpatel
+ * @library  ../lib/
+ * @build    JavadocTester TestPackageDeprecation
+ * @run main TestPackageDeprecation
+ */
+
+public class TestPackageDeprecation extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "6492694";
+
+    //Javadoc arguments.
+    private static final String[] ARGS1 = new String[]{
+        "-d", BUG_ID + "-1", "-source", "1.5", "-sourcepath", SRC_DIR, "-use", "pkg", "pkg1",
+        SRC_DIR + FS + "C2.java", SRC_DIR + FS + "FooDepr.java"
+    };
+    private static final String[] ARGS2 = new String[]{
+        "-d", BUG_ID + "-2", "-source", "1.5", "-sourcepath", SRC_DIR, "-use", "-nodeprecated",
+        "pkg", "pkg1", SRC_DIR + FS + "C2.java", SRC_DIR + FS + "FooDepr.java"
+    };
+
+    //Input for string search tests.
+    private static final String[][] TEST1 = {
+        {BUG_ID + "-1" + FS + "pkg1" + FS + "package-summary.html",
+            "<div class=\"deprecatedContent\"><span class=\"strong\">Deprecated.</span>" + NL +
+            "<div class=\"block\"><i>This package is Deprecated.</i></div>"
+        },
+        {BUG_ID + "-1" + FS + "deprecated-list.html",
+            "<li><a href=\"#package\">Deprecated Packages</a></li>"
+        }
+    };
+    private static final String[][] TEST2 = NO_TEST;
+    private static final String[][] NEGATED_TEST1 = NO_TEST;
+    private static final String[][] NEGATED_TEST2 = {
+        {BUG_ID + "-2" + FS + "overview-summary.html", "pkg1"},
+        {BUG_ID + "-2" + FS + "allclasses-frame.html", "FooDepr"}
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestPackageDeprecation tester = new TestPackageDeprecation();
+        run(tester, ARGS1, TEST1, NEGATED_TEST1);
+        run(tester, ARGS2, TEST2, NEGATED_TEST2);
+        if ((new java.io.File(BUG_ID + "-2" + FS + "pkg1" + FS +
+                "package-summary.html")).exists()) {
+            throw new Error("Test Fails: packages summary should not be" +
+                    "generated for deprecated package.");
+        } else {
+            System.out.println("Test passes:  package-summary.html not found.");
+        }
+        if ((new java.io.File(BUG_ID + "-2" + FS + "FooDepr.html")).exists()) {
+            throw new Error("Test Fails: FooDepr should not be" +
+                    "generated as it is deprecated.");
+        } else {
+            System.out.println("Test passes:  FooDepr.html not found.");
+        }
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/pkg/A.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,35 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+public class A {
+   /** Test constant. */
+   public static final String DEMO= "y";
+   public static final String THIS_IS_OK= "(x)";
+
+   public String DEMO_STRING = "<Hello World>";
+
+   public A() {
+   }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/pkg1/ClassUseTest1.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,31 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+public class ClassUseTest1 <T extends Foo & Foo2> {
+
+    public <T extends Foo & Foo2> T method(T t) {
+        return null;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/pkg1/Foo.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,36 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+import java.util.*;
+
+/**
+* Test Deprecated class
+* @deprecated This class is Deprecated.
+*/
+public class Foo {
+
+    public void method(Vector<Object> o){}
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/pkg1/Foo2.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+public interface Foo2 {}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testPackageDeprecation/pkg1/package-info.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,28 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Test pkg1 used.
+ * @deprecated This package is Deprecated.
+ */
+package pkg1;
--- a/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/com/sun/javadoc/testStylesheet/TestStylesheet.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,19 +23,18 @@
 
 /*
  * @test
- * @bug      4494033
+ * @bug      4494033 7028815
  * @summary  Run tests on doclet stylesheet.
  * @author   jamieh
  * @library  ../lib/
- * @build    JavadocTester
- * @build    TestStylesheet
+ * @build    JavadocTester TestStylesheet
  * @run main TestStylesheet
  */
 
 public class TestStylesheet extends JavadocTester {
 
     //Test information.
-    private static final String BUG_ID = "4494033";
+    private static final String BUG_ID = "4494033-7028815";
 
     //Javadoc arguments.
     private static final String[] ARGS = new String[] {
@@ -56,15 +55,18 @@
                 "body {" + NL + "    font-family:Helvetica, Arial, sans-serif;" + NL +
                 "    color:#000000;" + NL + "}"},
         {BUG_ID + FS + "stylesheet.css",
-                "dl dd ul li {" + NL + "    list-style:none;" + NL +
-                "    margin:10px 0 10px 0;" + NL + "}"},
+                "ul {" + NL + "    margin:10px 0 10px 20px;" + NL +
+                "    list-style-type:disc;" + NL + "}"},
         // Test whether a link to the stylesheet file is inserted properly
         // in the class documentation.
         {BUG_ID + FS + "pkg" + FS + "A.html",
                 "<link rel=\"stylesheet\" type=\"text/css\" " +
                 "href=\"../stylesheet.css\" title=\"Style\">"}
     };
-    private static final String[][] NEGATED_TEST = NO_TEST;
+    private static final String[][] NEGATED_TEST = {
+        {BUG_ID + FS + "stylesheet.css",
+                "* {" + NL + "    margin:0;" + NL + "    padding:0;" + NL + "}"}
+    };
 
     /**
      * The entry point of the test.
--- a/test/com/sun/javadoc/testSubTitle/TestSubTitle.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/com/sun/javadoc/testSubTitle/TestSubTitle.java	Tue May 24 11:12:40 2011 -0700
@@ -37,8 +37,7 @@
     private static final String BUG_ID = "7010342";
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "package-summary.html",
-            "<div class=\"subTitle\">" + NL + "<div class=\"block\">This is the " +
-            "description of package pkg.</div>" + NL + "</div>"
+            "<div class=\"block\">This is the description of package pkg.</div>"
         },
         {BUG_ID + FS + "pkg" + FS + "C.html",
             "<div class=\"subTitle\">pkg</div>"
--- a/test/tools/javac/6558548/T6558548.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/6558548/T6558548.java	Tue May 24 11:12:40 2011 -0700
@@ -1,9 +1,9 @@
 /*
  * @test /nodynamiccopyright/
- * @bug     6558548
+ * @bug     6558548 7039937
  * @summary The compiler needs to be aligned with clarified specification of throws
  * @compile/fail/ref=T6558548_latest.out -XDrawDiagnostics T6558548.java
- * @compile/fail/ref=T6558548_6.out -source 6 -XDrawDiagnostics T6558548.java
+ * @compile/fail/ref=T6558548_6.out -source 6 -Xlint:-options -XDrawDiagnostics T6558548.java
  */
 
 class T6558548 {
@@ -12,7 +12,7 @@
     void checked() throws InterruptedException {}
     void runtime() throws IllegalArgumentException {}
 
-    void m1() {
+    void m1a() {
         try {
             throw new java.io.FileNotFoundException();
         }
@@ -20,7 +20,7 @@
         catch(java.io.IOException exc) { } // 6: ok; latest: unreachable
     }
 
-    void m1a() {
+    void m1b() {
         try {
             throw new java.io.IOException();
         }
@@ -28,11 +28,20 @@
         catch(java.io.IOException exc) { } //ok
     }
 
-    void m2() {
+    void m1c() {
         try {
-            nothing();
+            throw new java.io.FileNotFoundException();
         }
-        catch(Exception exc) { } // ok
+        catch(java.io.FileNotFoundException exc) { }
+        catch(Exception ex) { } //ok (Exception/Throwable always allowed)
+    }
+
+    void m1d() {
+        try {
+            throw new java.io.FileNotFoundException();
+        }
+        catch(java.io.FileNotFoundException exc) { }
+        catch(Throwable ex) { } //ok (Exception/Throwable always allowed)
     }
 
     void m3() {
@@ -131,7 +140,7 @@
             runtime();
         }
         catch(RuntimeException exc) { }
-        catch(Exception exc) { } //6: ok; latest: unreachable
+        catch(Exception exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m17() {
@@ -139,7 +148,7 @@
             nothing();
         }
         catch(RuntimeException exc) { }
-        catch(Exception exc) { } //6: ok; latest: unreachable
+        catch(Exception exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m18() {
@@ -148,7 +157,7 @@
         }
         catch(RuntimeException exc) { }
         catch(InterruptedException exc) { }
-        catch(Exception exc) { } //6: ok; latest: unreachable
+        catch(Exception exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m19() {
@@ -157,7 +166,7 @@
         }
         catch(RuntimeException exc) { }
         catch(InterruptedException exc) { } //never thrown in try
-        catch(Exception exc) { } //6: ok; latest: unreachable
+        catch(Exception exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m20() {
@@ -166,7 +175,7 @@
         }
         catch(RuntimeException exc) { }
         catch(InterruptedException exc) { } //never thrown in try
-        catch(Exception exc) { } //6: ok; latest: unreachable
+        catch(Exception exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m21() {
@@ -182,7 +191,7 @@
             runtime();
         }
         catch(RuntimeException exc) { }
-        catch(Exception exc) { } // 6: ok; latest: unreachable
+        catch(Exception exc) { } // 6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m23() {
@@ -190,7 +199,7 @@
             nothing();
         }
         catch(RuntimeException exc) { }
-        catch(Exception exc) { } // 6: ok; latest: unreachable
+        catch(Exception exc) { } // 6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m24() {
@@ -208,7 +217,7 @@
         }
         catch(RuntimeException exc) { }
         catch(Error exc) { }
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m26() {
@@ -217,7 +226,7 @@
         }
         catch(RuntimeException exc) { }
         catch(Error exc) { }
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m27() {
@@ -227,7 +236,7 @@
         catch(RuntimeException exc) { }
         catch(Error exc) { }
         catch(InterruptedException exc) { }
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m28() {
@@ -237,7 +246,7 @@
         catch(RuntimeException exc) { }
         catch(Error exc) { }
         catch(InterruptedException exc) { } //never thrown in try
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m29() {
@@ -247,7 +256,7 @@
         catch(RuntimeException exc) { }
         catch(Error exc) { }
         catch(InterruptedException exc) { } //never thrown in try
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m30() {
@@ -265,7 +274,7 @@
         }
         catch(RuntimeException exc) { }
         catch(Error exc) { }
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m32() {
@@ -274,7 +283,7 @@
         }
         catch(RuntimeException exc) { }
         catch(Error exc) { }
-        catch(Throwable exc) { } //6: ok; latest: unreachable
+        catch(Throwable exc) { } //6: ok; latest: ok (Exception/Throwable always allowed)
     }
 
     void m33() {
--- a/test/tools/javac/6558548/T6558548_6.out	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/6558548/T6558548_6.out	Tue May 24 11:12:40 2011 -0700
@@ -1,9 +1,7 @@
-- compiler.warn.source.no.bootclasspath: 1.6
-T6558548.java:159:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
 T6558548.java:168:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:239:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:249:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:291:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:298:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:177:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:248:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:258:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:300:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:307:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
 6 errors
-1 warning
--- a/test/tools/javac/6558548/T6558548_latest.out	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/6558548/T6558548_latest.out	Tue May 24 11:12:40 2011 -0700
@@ -1,23 +1,9 @@
 T6558548.java:20:9: compiler.warn.unreachable.catch: java.io.FileNotFoundException
-T6558548.java:134:9: compiler.warn.unreachable.catch: java.lang.RuntimeException
-T6558548.java:142:9: compiler.warn.unreachable.catch: java.lang.RuntimeException
-T6558548.java:151:9: compiler.warn.unreachable.catch.1: java.lang.InterruptedException,java.lang.RuntimeException
-T6558548.java:159:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:160:9: compiler.warn.unreachable.catch: java.lang.RuntimeException
 T6558548.java:168:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:169:9: compiler.warn.unreachable.catch: java.lang.RuntimeException
-T6558548.java:185:9: compiler.warn.unreachable.catch: java.lang.RuntimeException
-T6558548.java:193:9: compiler.warn.unreachable.catch: java.lang.RuntimeException
-T6558548.java:211:9: compiler.warn.unreachable.catch.1: java.lang.RuntimeException,java.lang.Error
-T6558548.java:220:9: compiler.warn.unreachable.catch.1: java.lang.RuntimeException,java.lang.Error
-T6558548.java:230:9: compiler.warn.unreachable.catch.1: java.lang.InterruptedException,java.lang.RuntimeException,java.lang.Error
-T6558548.java:239:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:240:9: compiler.warn.unreachable.catch.1: java.lang.RuntimeException,java.lang.Error
-T6558548.java:249:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:250:9: compiler.warn.unreachable.catch.1: java.lang.RuntimeException,java.lang.Error
-T6558548.java:268:9: compiler.warn.unreachable.catch.1: java.lang.RuntimeException,java.lang.Error
-T6558548.java:277:9: compiler.warn.unreachable.catch.1: java.lang.RuntimeException,java.lang.Error
-T6558548.java:291:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
-T6558548.java:298:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:177:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:248:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:258:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:300:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
+T6558548.java:307:9: compiler.err.except.never.thrown.in.try: java.lang.InterruptedException
 6 errors
-15 warnings
+1 warning
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/T7040104.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,72 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7040104
+ * @summary javac NPE on Object a[]; Object o = (a=null)[0];
+ */
+
+public class T7040104 {
+    public static void main(String[] args) {
+        T7040104 t = new T7040104();
+        t.test1();
+        t.test2();
+        t.test3();
+        if (t.npeCount != 3) {
+            throw new AssertionError();
+        }
+    }
+
+    int npeCount = 0;
+
+    void test1() {
+        Object a[];
+        try {
+            Object o = (a = null)[0];
+        }
+        catch (NullPointerException npe) {
+            npeCount++;
+        }
+    }
+
+    void test2() {
+        Object a[][];
+        try {
+            Object o = (a = null)[0][0];
+        }
+        catch (NullPointerException npe) {
+            npeCount++;
+        }
+    }
+
+    void test3() {
+        Object a[][][];
+        try {
+            Object o = (a = null)[0][0][0];
+        }
+        catch (NullPointerException npe) {
+            npeCount++;
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/annotations/6550655/T6550655.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,191 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * @test
+ * @bug     6550655
+ * @summary javac crashes when compiling against an annotated class
+ */
+
+import java.io.File;
+import java.net.URI;
+import java.util.Arrays;
+
+import javax.tools.Diagnostic;
+import javax.tools.DiagnosticListener;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaCompiler.CompilationTask;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+public class T6550655 {
+
+    JavaCompiler javacTool;
+    File testDir;
+    TestKind testKind;
+    EnumActionKind actionKind;
+
+    String testSource = "enum E { NORTH, SOUTH, WEST, EAST; }\n" +
+                        "@I(val = E.NORTH)class A {}\n" +
+                        "@interface I { E val(); }";
+
+    T6550655(JavaCompiler javacTool, File testDir, TestKind testKind, EnumActionKind actionKind) {
+        this.javacTool = javacTool;
+        this.testDir = testDir;
+        this.testKind = testKind;
+        this.actionKind = actionKind;
+    }
+
+    void test() {
+        testDir.mkdirs();
+        compile(null, new JavaSource("Test.java", testSource));
+        actionKind.doAction(this);
+        compile(new DiagnosticChecker(), testKind.source);
+    }
+
+    void compile(DiagnosticChecker dc, JavaSource... sources) {
+        try {
+            CompilationTask ct = javacTool.getTask(null, null, dc,
+                    Arrays.asList("-d", testDir.getAbsolutePath(), "-cp", testDir.getAbsolutePath()),
+                    null, Arrays.asList(sources));
+            ct.call();
+        }
+        catch (Exception e) {
+            error("Internal compilation error");
+        }
+    }
+
+    void replaceEnum(String newSource) {
+        compile(null, new JavaSource("Replace.java", newSource));
+    };
+
+    void removeEnum() {
+        File enumClass = new File(testDir, "E.class");
+        if (!enumClass.exists()) {
+            error("Expected file E.class does not exists in folder " + testDir);
+        }
+        enumClass.delete();
+    };
+
+    void error(String msg) {
+        System.err.println(msg);
+        nerrors++;
+    }
+
+    class DiagnosticChecker implements DiagnosticListener<JavaFileObject> {
+
+        String[][] expectedKeys = new String[][] {
+         //             DIRECT,                                         INDIRECT
+        {/*REPLACE1*/   "compiler.err.cant.resolve.location"     ,      "compiler.warn.unknown.enum.constant" },
+        {/*REPLACE2*/   "compiler.err.cant.resolve.location.args",      "compiler.warn.annotation.method.not.found" },
+        {/*REMOVE*/     "compiler.err.cant.resolve"              ,      "compiler.warn.unknown.enum.constant.reason" } };
+
+        String keyToIgnore = "compiler.err.attribute.value.must.be.constant";
+
+        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+            String expectedCode = expectedKeys[actionKind.ordinal()][testKind.ordinal()];
+            if (!diagnostic.getCode().equals(keyToIgnore) &&
+                    !diagnostic.getCode().equals(expectedCode)) {
+                error("Unexpected diagnostic" +
+                      "\nfound " + diagnostic.getCode() +
+                      "\nexpected " + expectedCode +
+                      "\ntestKind " + testKind +
+                      "\nactionKind " + actionKind);
+            }
+        }
+    }
+
+    //global declarations
+
+    enum EnumActionKind {
+        REPLACE1("enum E { SOUTH, WEST, EAST; }") {
+            @Override
+            void doAction(T6550655 test) {
+                test.replaceEnum(optionalSource);
+            }
+        },
+        REPLACE2("@interface I { E valNew() default E.EAST; }") {
+            @Override
+            void doAction(T6550655 test) {
+                test.replaceEnum(optionalSource);
+            }
+        },
+        REMOVE(null) {
+            @Override
+            void doAction(T6550655 test) { test.removeEnum(); }
+        };
+
+        String optionalSource;
+
+        private EnumActionKind(String optionalSource) {
+            this.optionalSource = optionalSource;
+        }
+
+        abstract void doAction(T6550655 test);
+    }
+
+    enum TestKind {
+        DIRECT("@I(val = E.NORTH)class C1 {}"),
+        INDIRECT("class C2 { A a; }");
+
+        JavaSource source;
+
+        private TestKind(final String code) {
+            this.source = new JavaSource("Test.java", code);
+        }
+    }
+
+    public static void main(String[] args) throws Exception {
+        String SCRATCH_DIR = System.getProperty("user.dir");
+        JavaCompiler javacTool = ToolProvider.getSystemJavaCompiler();
+        int n = 0;
+        for (TestKind testKind : TestKind.values()) {
+            for (EnumActionKind actionKind : EnumActionKind.values()) {
+                File testDir = new File(SCRATCH_DIR, "test"+n);
+                new T6550655(javacTool, testDir, testKind, actionKind).test();
+                n++;
+            }
+        }
+        if (nerrors > 0) {
+            throw new AssertionError("Some errors have been detected");
+        }
+    }
+
+    static class JavaSource extends SimpleJavaFileObject {
+
+        String source;
+
+        public JavaSource(String filename, String source) {
+            super(URI.create("myfo:/" + filename), JavaFileObject.Kind.SOURCE);
+            this.source = source;
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+    }
+
+    static int nerrors = 0;
+}
--- a/test/tools/javac/diags/examples.not-yet.txt	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/diags/examples.not-yet.txt	Tue May 24 11:12:40 2011 -0700
@@ -41,7 +41,6 @@
 compiler.err.type.var.more.than.once.in.result          # UNUSED
 compiler.err.undetermined.type
 compiler.err.unexpected.type
-compiler.err.unknown.enum.constant                      # in bad class file
 compiler.err.unsupported.cross.fp.lit                   # Scanner: host system dependent
 compiler.err.wrong.target.for.polymorphic.signature.definition     # Transitional 292
 compiler.misc.assignment.from.super-bound
@@ -112,3 +111,5 @@
 compiler.warn.unchecked.assign                          # DEAD, replaced by compiler.misc.unchecked.assign
 compiler.warn.unchecked.cast.to.type                    # DEAD, replaced by compiler.misc.unchecked.cast.to.type
 compiler.warn.unexpected.archive.file                   # Paths: zip file with unknown extn
+compiler.warn.unknown.enum.constant                     # in bad class file
+compiler.warn.unknown.enum.constant.reason              # in bad class file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/diags/examples/DiamondAndExplicitParams.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,34 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+// key: compiler.misc.diamond.and.explicit.params
+// key: compiler.err.cant.apply.diamond.1
+
+class DiamondAndAnonClass {
+    static class Foo<X> {
+        <Z> Foo() {}
+    }
+    void m() {
+        Foo<String> foo = new <Integer> Foo<>();
+    }
+}
--- a/test/tools/javac/diags/examples/UnreachableCatch1.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/diags/examples/UnreachableCatch1.java	Tue May 24 11:12:40 2011 -0700
@@ -23,14 +23,21 @@
 
 // key: compiler.warn.unreachable.catch.1
 
+import java.io.*;
+
 class UnreachableCatch1 {
 
     void test() {
         try {
-            throw new IllegalArgumentException();
+            if (true) {
+                throw new FileNotFoundException();
+            }
+            else {
+                throw new EOFException();
+            }
         }
-        catch(Error err) { }
-        catch(RuntimeException rex) { }
-        catch(Throwable t) { } //unreachable
+        catch(FileNotFoundException fnf) { }
+        catch(EOFException eof) { }
+        catch(IOException ex) { } //unreachable
     }
 }
--- a/test/tools/javac/generics/7034511/T7034511a.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/generics/7034511/T7034511a.java	Tue May 24 11:12:40 2011 -0700
@@ -1,6 +1,7 @@
 /*
  * @test /nodynamiccopyright/
- * @bug     7034511
+ * @ignore backing out 7034511, see 7040883
+ * @bug     7034511 7040883
  * @summary Loophole in typesafety
  * @compile/fail/ref=T7034511a.out -XDrawDiagnostics T7034511a.java
  */
--- a/test/tools/javac/generics/7034511/T7034511b.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/generics/7034511/T7034511b.java	Tue May 24 11:12:40 2011 -0700
@@ -1,6 +1,7 @@
 /*
  * @test /nodynamiccopyright/
- * @bug     7034511
+ * @ignore backing out 7034511, see 7040883
+ * @bug     7034511 7040883
  * @summary Loophole in typesafety
  * @compile/fail/ref=T7034511b.out -XDrawDiagnostics T7034511b.java
  */
--- a/test/tools/javac/generics/diamond/7030150/GenericConstructorAndDiamondTest.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/generics/diamond/7030150/GenericConstructorAndDiamondTest.java	Tue May 24 11:12:40 2011 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7030150
+ * @bug 7030150 7039931
  * @summary Type inference for generic instance creation failed for formal type parameter
  */
 
@@ -125,6 +125,14 @@
                 default: return false;
             }
         }
+
+        boolean matches(TypeArgumentKind other) {
+            switch (other) {
+                case STRING: return this != INTEGER;
+                case INTEGER: return this != STRING;
+                default: return true;
+            }
+        }
     }
 
     enum ArgumentKind {
@@ -149,9 +157,11 @@
                 for (TypeArgumentKind declArgKind : TypeArgumentKind.values()) {
                     for (TypeArgArity arity : TypeArgArity.values()) {
                         for (TypeArgumentKind useArgKind : TypeArgumentKind.values()) {
-                            for (ArgumentKind argKind : ArgumentKind.values()) {
-                                new GenericConstructorAndDiamondTest(boundKind, constructorKind,
-                                        declArgKind, arity, useArgKind, argKind).run(comp, fm);
+                            for (TypeArgumentKind diamondArgKind : TypeArgumentKind.values()) {
+                                for (ArgumentKind argKind : ArgumentKind.values()) {
+                                    new GenericConstructorAndDiamondTest(boundKind, constructorKind,
+                                            declArgKind, arity, useArgKind, diamondArgKind, argKind).run(comp, fm);
+                                }
                             }
                         }
                     }
@@ -165,18 +175,21 @@
     TypeArgumentKind declTypeArgumentKind;
     TypeArgArity useTypeArgArity;
     TypeArgumentKind useTypeArgumentKind;
+    TypeArgumentKind diamondTypeArgumentKind;
     ArgumentKind argumentKind;
     JavaSource source;
     DiagnosticChecker diagChecker;
 
     GenericConstructorAndDiamondTest(BoundKind boundKind, ConstructorKind constructorKind,
             TypeArgumentKind declTypeArgumentKind, TypeArgArity useTypeArgArity,
-            TypeArgumentKind useTypeArgumentKind, ArgumentKind argumentKind) {
+            TypeArgumentKind useTypeArgumentKind, TypeArgumentKind diamondTypeArgumentKind,
+            ArgumentKind argumentKind) {
         this.boundKind = boundKind;
         this.constructorKind = constructorKind;
         this.declTypeArgumentKind = declTypeArgumentKind;
         this.useTypeArgArity = useTypeArgArity;
         this.useTypeArgumentKind = useTypeArgumentKind;
+        this.diamondTypeArgumentKind = diamondTypeArgumentKind;
         this.argumentKind = argumentKind;
         this.source = new JavaSource();
         this.diagChecker = new DiagnosticChecker();
@@ -189,7 +202,7 @@
                           "}\n" +
                           "class Test {\n" +
                               "void test() {\n" +
-                                 "Foo#TA1 f = new #TA2 Foo<>(#A);\n" +
+                                 "Foo#TA1 f = new #TA2 Foo<#TA3>(#A);\n" +
                               "}\n" +
                           "}\n";
 
@@ -201,6 +214,7 @@
                     replace("#CK", constructorKind.constrStr)
                     .replace("#TA1", declTypeArgumentKind.getArgs(TypeArgArity.ONE))
                     .replace("#TA2", useTypeArgumentKind.getArgs(useTypeArgArity))
+                    .replace("#TA3", diamondTypeArgumentKind.typeargStr)
                     .replace("#A", argumentKind.argStr);
         }
 
@@ -227,9 +241,15 @@
         boolean badMethodTypeArg = constructorKind != ConstructorKind.NON_GENERIC &&
                 !useTypeArgumentKind.matches(argumentKind);
 
-        boolean badGenericType = !boundKind.matches(declTypeArgumentKind);
+        boolean badExplicitParams = (useTypeArgumentKind != TypeArgumentKind.NONE &&
+                diamondTypeArgumentKind == TypeArgumentKind.NONE) ||
+                !boundKind.matches(diamondTypeArgumentKind);
 
-        boolean shouldFail = badActual || badArity || badMethodTypeArg || badGenericType;
+        boolean badGenericType = !boundKind.matches(declTypeArgumentKind) ||
+                !diamondTypeArgumentKind.matches(declTypeArgumentKind);
+
+        boolean shouldFail = badActual || badArity ||
+                badMethodTypeArg || badExplicitParams || badGenericType;
 
         if (shouldFail != diagChecker.errorFound) {
             throw new Error("invalid diagnostics for source:\n" +
--- a/test/tools/javac/generics/diamond/7030150/Neg01.java	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 7030150
- * @summary Type inference for generic instance creation failed for formal type parameter
- *          check that explicit type-argument that causes resolution failure is rejected
- * @compile/fail/ref=Neg01.out -XDrawDiagnostics Neg01.java
- */
-
-class Neg01 {
-
-    static class Foo<X> {
-        <T> Foo(T t) {}
-    }
-
-    Foo<Integer> fi1 = new <String> Foo<>(1);
-    Foo<Integer> fi2 = new <String> Foo<Integer>(1);
-}
--- a/test/tools/javac/generics/diamond/7030150/Neg01.out	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-Neg01.java:15:24: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg01.Foo), (compiler.misc.infer.no.conforming.assignment.exists: X, int, java.lang.String)
-Neg01.java:16:24: compiler.err.cant.apply.symbol.1: kindname.constructor, Foo, T, int, kindname.class, Neg01.Foo<X>, (compiler.misc.no.conforming.assignment.exists: int, java.lang.String)
-2 errors
--- a/test/tools/javac/generics/diamond/7030150/Neg02.java	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 7030150
- * @summary Type inference for generic instance creation failed for formal type parameter
- *          check that compiler rejects bad number of explicit type-arguments
- * @compile/fail/ref=Neg02.out -XDrawDiagnostics Neg02.java
- */
-
-class Neg02 {
-
-    static class Foo<X> {
-        <T> Foo(T t) {}
-    }
-
-    Foo<Integer> fi1 = new <String, Integer> Foo<>("");
-    Foo<Integer> fi2 = new <String, Integer> Foo<Integer>("");
-}
--- a/test/tools/javac/generics/diamond/7030150/Neg02.out	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-Neg02.java:15:24: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg02.Foo), (compiler.misc.arg.length.mismatch)
-Neg02.java:16:24: compiler.err.cant.apply.symbol.1: kindname.constructor, Foo, T, java.lang.String, kindname.class, Neg02.Foo<X>, (compiler.misc.arg.length.mismatch)
-2 errors
--- a/test/tools/javac/generics/diamond/7030150/Neg03.java	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,17 +0,0 @@
-/*
- * @test /nodynamiccopyright/
- * @bug 7030150
- * @summary Type inference for generic instance creation failed for formal type parameter
- *          check that explicit type-argument that does not conform to bound is rejected
- * @compile/fail/ref=Neg03.out -XDrawDiagnostics Neg03.java
- */
-
-class Neg03 {
-
-    static class Foo<X> {
-        <T extends Integer> Foo(T t) {}
-    }
-
-    Foo<Integer> fi1 = new <String> Foo<>(1);
-    Foo<Integer> fi2 = new <String> Foo<Integer>(1);
-}
--- a/test/tools/javac/generics/diamond/7030150/Neg03.out	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,3 +0,0 @@
-Neg03.java:15:24: compiler.err.cant.apply.diamond.1: (compiler.misc.diamond: Neg03.Foo), (compiler.misc.explicit.param.do.not.conform.to.bounds: java.lang.String, java.lang.Integer)
-Neg03.java:16:24: compiler.err.cant.apply.symbol.1: kindname.constructor, Foo, T, int, kindname.class, Neg03.Foo<X>, (compiler.misc.explicit.param.do.not.conform.to.bounds: java.lang.String, java.lang.Integer)
-2 errors
--- a/test/tools/javac/generics/diamond/7030150/Pos01.java	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,44 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 7030150
- * @summary Type inference for generic instance creation failed for formal type parameter
- *          check that redundant type-arguments on non-generic constructor are accepted
- * @compile Pos01.java
- */
-
-class Pos01 {
-
-    static class Foo<X> {
-        Foo(X t) {}
-    }
-
-    Foo<Integer> fi1 = new Foo<>(1);
-    Foo<Integer> fi2 = new Foo<Integer>(1);
-    Foo<Integer> fi3 = new <String> Foo<>(1);
-    Foo<Integer> fi4 = new <String> Foo<Integer>(1);
-    Foo<Integer> fi5 = new <String, String> Foo<>(1);
-    Foo<Integer> fi6 = new <String, String> Foo<Integer>(1);
-}
--- a/test/tools/javac/generics/diamond/7030150/Pos02.java	Thu May 05 22:30:15 2011 -0700
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,40 +0,0 @@
-/*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
- * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
- *
- * This code is free software; you can redistribute it and/or modify it
- * under the terms of the GNU General Public License version 2 only, as
- * published by the Free Software Foundation.
- *
- * This code is distributed in the hope that it will be useful, but WITHOUT
- * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
- * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
- * version 2 for more details (a copy is included in the LICENSE file that
- * accompanied this code).
- *
- * You should have received a copy of the GNU General Public License version
- * 2 along with this work; if not, write to the Free Software Foundation,
- * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
- *
- * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
- * or visit www.oracle.com if you need additional information or have any
- * questions.
- */
-
-/*
- * @test
- * @bug 7030150
- * @summary Type inference for generic instance creation failed for formal type parameter
- *          check that diamond in return context works w/o problems
- * @compile Pos02.java
- */
-
-class Pos02<X> {
-
-    Pos02(X x) {}
-
-
-    Pos02<X> test(X x) {
-        return new Pos02<>(x);
-    }
-}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/typevars/T7040883.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7040883 7034511
+ * @summary Compilation error: "length in Array is defined in an inaccessible class or interface"
+ * @compile T7040883.java
+ */
+
+public class T7040883 {
+
+    <Z> Z[] getListeners(Class<Z> z) { return null; }
+
+    void test(String s) {
+        int i = getListeners(s.getClass()).length;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/7034495/T7034495.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,42 @@
+/*
+ * Copyright (c) 2008, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7034495
+ * @summary Javac asserts on usage of wildcards in bounds
+ * @compile/fail/ref=T7034495.out -XDrawDiagnostics T7034495.java
+ */
+class T7034495 {
+
+    interface A<T> {
+        T foo();
+    }
+
+    interface B<T> {
+        T foo();
+    }
+
+    interface C<T extends A<?> & B<?>> { }
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/generics/wildcards/7034495/T7034495.out	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,2 @@
+T7034495.java:40:17: compiler.err.types.incompatible.diff.ret: T7034495.B<?>, T7034495.A<?>, foo()
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/multicatch/Neg07.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,50 @@
+/*
+ * @test  /nodynamiccopyright/
+ * @bug 7039822
+ * @summary Verify typing of lub of exception parameter w.r.t getClass
+ * @author Joseph D. Darcy
+ * @compile/fail/ref=Neg07.out -XDrawDiagnostics Neg07.java
+ */
+
+public class Neg07 {
+    private static void test(int i) {
+        try {
+            thrower(i);
+        } catch (SonException | DaughterException e) {
+            Class<? extends HasFoo> clazz2 = e.getClass(); // Rejected!
+            HasFoo m = e;
+            e.foo();
+        }
+    }
+
+    private static interface HasFoo {
+        void foo();
+    }
+
+    static void thrower(int i) throws SonException, DaughterException {
+        if (i == 0)
+            throw new SonException();
+        else
+            throw new DaughterException();
+    }
+
+    private static class ParentException extends RuntimeException {}
+
+    private static class SonException
+        extends ParentException
+        implements HasFoo {
+
+        public void foo() {
+            System.out.println("SonException.foo");
+        }
+    }
+
+    private static class DaughterException
+        extends ParentException
+        implements HasFoo {
+
+        public void foo() {
+            System.out.println("DaughterException.foo");
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/multicatch/Neg07.out	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,2 @@
+Neg07.java:14:56: compiler.err.prob.found.req: (compiler.misc.incompatible.types), java.lang.Class<compiler.misc.type.captureof: 1, ? extends Neg07.ParentException>, java.lang.Class<? extends Neg07.HasFoo>
+1 error
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/multicatch/Pos10.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,103 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7039822
+ * @summary Verify lub of an exception parameter can be an intersection type
+ * @author Joseph D. Darcy
+ */
+
+public class Pos10 {
+    public static void main(String... args) {
+        test(0);
+        test(1);
+
+        if (record != 0b11)
+            throw new RuntimeException("Unexpected exception execution: " +
+                                       record);
+        if (closeRecord != 0b11)
+            throw new RuntimeException("Unexpected close execution: " +
+                                       closeRecord);
+    }
+
+    private static int record = 0;
+    private static int closeRecord = 0;
+
+    private static void test(int i) {
+        try {
+            thrower(i);
+        } catch (SonException | DaughterException e) {
+            Class<? extends ParentException> clazz = e.getClass();
+            HasFoo m = e;
+            e.foo();
+
+            try (AutoCloseable ac = e) {
+                e.toString();
+            } catch(Exception except) {
+                throw new RuntimeException(except);
+            }
+        }
+    }
+
+    private static interface HasFoo {
+        void foo();
+    }
+
+    private static void thrower(int i) throws SonException, DaughterException {
+        if (i == 0)
+            throw new SonException();
+        else
+            throw new DaughterException();
+    }
+
+    private static class ParentException extends RuntimeException {}
+
+    private static class SonException
+        extends ParentException
+        implements HasFoo, AutoCloseable {
+
+        public void foo() {
+            record |= 0b01;
+        }
+
+        @Override
+        public void close() {
+            closeRecord |= 0b01;
+        }
+    }
+
+    private static class DaughterException
+        extends ParentException
+        implements HasFoo, AutoCloseable {
+
+        public void foo() {
+            record |= 0b10;
+        }
+
+        @Override
+        public  void close() {
+            closeRecord |= 0b10;
+        }
+    }
+}
--- a/test/tools/javac/multicatch/model/Model01.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/multicatch/model/Model01.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,6 +43,6 @@
             else
                 throw new B2();
         }
-        catch(B1 | B2 ex) { }
+        catch(@UnionTypeInfo({"Test.B1", "Test.B2"}) B1 | B2 ex) { }
     }
 }
--- a/test/tools/javac/multicatch/model/ModelChecker.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/multicatch/model/ModelChecker.java	Tue May 24 11:12:40 2011 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2011 Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -30,7 +30,7 @@
  * @compile -processor ModelChecker Model01.java
  */
 
-import com.sun.source.tree.VariableTree;
+import com.sun.source.tree.CatchTree;
 import com.sun.source.util.TreePathScanner;
 import com.sun.source.util.Trees;
 import com.sun.source.util.TreePath;
@@ -41,6 +41,12 @@
 import javax.lang.model.element.Element;
 import javax.lang.model.element.ElementKind;
 import javax.lang.model.element.TypeElement;
+import javax.lang.model.type.TypeMirror;
+import javax.lang.model.type.TypeKind;
+import javax.lang.model.type.UnionType;
+import javax.lang.model.type.UnknownTypeException;
+import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 
 @SupportedAnnotationTypes("Check")
 public class ModelChecker extends JavacTestingAbstractProcessor {
@@ -69,22 +75,61 @@
         }
 
         @Override
-        public Void visitVariable(VariableTree node, Void p) {
-            Element ex = trees.getElement(getCurrentPath());
+        public Void visitCatch(CatchTree node, Void p) {
+            TreePath param = new TreePath(getCurrentPath(), node.getParameter());
+            Element ex = trees.getElement(param);
+            validateUnionTypeInfo(ex);
             if (ex.getSimpleName().contentEquals("ex")) {
                 assertTrue(ex.getKind() == ElementKind.EXCEPTION_PARAMETER, "Expected EXCEPTION_PARAMETER - found " + ex.getKind());
-                for (Element e : types.asElement(ex.asType()).getEnclosedElements()) {
+                for (Element e : types.asElement(trees.getLub(node)).getEnclosedElements()) {
                     Member m = e.getAnnotation(Member.class);
                     if (m != null) {
                         assertTrue(e.getKind() == m.value(), "Expected " + m.value() + " - found " + e.getKind());
                     }
                 }
-                assertTrue(assertionCount == 3, "Expected 3 assertions - found " + assertionCount);
+                assertTrue(assertionCount == 9, "Expected 9 assertions - found " + assertionCount);
             }
-            return super.visitVariable(node, p);
+            return super.visitCatch(node, p);
         }
     }
 
+    private void validateUnionTypeInfo(Element ex) {
+        UnionTypeInfo ut = ex.getAnnotation(UnionTypeInfo.class);
+        assertTrue(ut != null, "UnionType annotation must be present");
+
+        TypeMirror expectedUnionType = ex.asType();
+        assertTrue(expectedUnionType.getKind() == TypeKind.UNION, "UNION kind expected");
+
+        try {
+            new SimpleTypeVisitor6<Void, Void>(){}.visit(expectedUnionType);
+            throw new RuntimeException("Expected UnknownTypeException not thrown.");
+        } catch (UnknownTypeException ute) {
+            ; // Expected
+        }
+
+        UnionType unionType = new SimpleTypeVisitor7<UnionType, Void>(){
+            @Override
+            protected UnionType defaultAction(TypeMirror e, Void p) {return null;}
+
+            @Override
+            public UnionType visitUnion(UnionType t, Void p) {return t;}
+        }.visit(expectedUnionType);
+        assertTrue(unionType != null, "Must get a non-null union type.");
+
+        assertTrue(ut.value().length == unionType.getAlternatives().size(), "Cardinalities do not match");
+
+        String[] typeNames = ut.value();
+        for(int i = 0; i < typeNames.length; i++) {
+            TypeMirror typeFromAnnotation = nameToType(typeNames[i]);
+            assertTrue(types.isSameType(typeFromAnnotation, unionType.getAlternatives().get(i)),
+                       "Types were not equal.");
+        }
+    }
+
+    private TypeMirror nameToType(String name) {
+        return elements.getTypeElement(name).asType();
+    }
+
     private static void assertTrue(boolean cond, String msg) {
         assertionCount++;
         if (!cond)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/multicatch/model/UnionTypeInfo.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/**
+ * Used by ModelChecker to validate the modeling information of a union type.
+ */
+@interface UnionTypeInfo {
+    String[] value();
+}
--- a/test/tools/javac/processing/model/TestSymtabItems.java	Thu May 05 22:30:15 2011 -0700
+++ b/test/tools/javac/processing/model/TestSymtabItems.java	Tue May 24 11:12:40 2011 -0700
@@ -44,6 +44,7 @@
 import com.sun.tools.javac.code.Symbol.ClassSymbol;
 import com.sun.tools.javac.code.Symtab;
 import com.sun.tools.javac.file.JavacFileManager;
+import com.sun.tools.javac.main.JavaCompiler;
 import com.sun.tools.javac.model.JavacTypes;
 import com.sun.tools.javac.util.Context;
 
@@ -62,6 +63,7 @@
         JavacFileManager.preRegister(c);
         Symtab syms = Symtab.instance(c);
         JavacTypes types = JavacTypes.instance(c);
+        JavaCompiler.instance(c);  // will init ClassReader.sourceCompleter
 
 //        print("noSymbol", syms.noSymbol);
 //        print("errSymbol", syms.errSymbol);
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/processing/model/type/TestUnionType.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,208 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug     7029150
+ * @summary Test support for union types
+ * @library ../../../lib
+ */
+
+import java.net.URI;
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.element.*;
+import javax.lang.model.type.*;
+import javax.lang.model.util.*;
+import javax.tools.*;
+
+import com.sun.source.tree.*;
+import com.sun.source.util.*;
+
+
+public class TestUnionType extends JavacTestingAbstractProcessor {
+    enum TestKind {
+        SingleType("E1", "E1",
+                "VariableTree: E1 e",
+                "VariableTree: elem EXCEPTION_PARAMETER e",
+                "VariableTree: elem.type DECLARED",
+                "VariableTree: elem.type.elem CLASS E1",
+                "VariableTree: type DECLARED",
+                "VariableTree: type.elem CLASS E1",
+                "VariableTree: type.elem.type DECLARED"),
+
+        ValidTypes("E1, E2", "E1 | E2",
+                "VariableTree: E1 | E2 e",
+                "VariableTree: elem EXCEPTION_PARAMETER e",
+                "VariableTree: elem.type UNION Test.E1,Test.E2",
+                "VariableTree: elem.type.elem null",
+                "VariableTree: type UNION Test.E1,Test.E2",
+                "VariableTree: type.elem null"),
+
+        InvalidTypes("E1, E2", "E1 | EMissing",
+                "VariableTree: E1 | EMissing e",
+                "VariableTree: elem EXCEPTION_PARAMETER e",
+                "VariableTree: elem.type UNION Test.E1,EMissing",
+                "VariableTree: elem.type.elem null",
+                "VariableTree: type UNION Test.E1,EMissing",
+                "VariableTree: type.elem null"),
+
+        Uncaught("E1", "E1 | E2",
+                "VariableTree: E1 | E2 e",
+                "VariableTree: elem EXCEPTION_PARAMETER e",
+                "VariableTree: elem.type UNION Test.E1,Test.E2",
+                "VariableTree: elem.type.elem null",
+                "VariableTree: type UNION Test.E1,Test.E2",
+                "VariableTree: type.elem null");
+
+        TestKind(String throwsTypes, String catchTypes, String... gold) {
+            this.throwsTypes = throwsTypes;
+            this.catchTypes = catchTypes;
+            this.gold = Arrays.asList(gold);
+        }
+
+        final String throwsTypes;
+        final String catchTypes;
+        final List<String> gold;
+    }
+
+    static class TestFileObject extends SimpleJavaFileObject {
+        public static final String template =
+                  "class Test {\n"
+                + "    class E1 extends Exception { }\n"
+                + "    class E2 extends Exception { }\n"
+                + "    void doSomething() throws #T { }\n"
+                + "    void test() {\n"
+                + "        try {\n"
+                + "            doSomething();\n"
+                + "        } catch (#C e) {\n"
+                + "        }\n"
+                + "    }\n"
+                + "}\n";
+
+        public TestFileObject(TestKind tk) {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            this.tk = tk;
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return template
+                    .replace("#T", tk.throwsTypes)
+                    .replace("#C", tk.catchTypes);
+        }
+        final TestKind tk;
+    }
+
+    public static void main(String... args) throws Exception {
+        JavaCompiler comp = ToolProvider.getSystemJavaCompiler();
+        List<String> options = Arrays.asList("-proc:only");
+        for (TestKind tk: TestKind.values()) {
+            System.err.println("Test: " + tk);
+            TestUnionType p = new TestUnionType();
+            JavaFileObject fo = new TestFileObject(tk);
+            JavaCompiler.CompilationTask task = comp.getTask(null, null, null, options, null, Arrays.asList(fo));
+            task.setProcessors(Arrays.asList(p));
+            boolean ok = task.call();
+            System.err.println("compilation " + (ok ? "passed" : "failed"));
+            if (!ok)
+                throw new Exception("compilation failed unexpectedly");
+            if (!p.log.equals(tk.gold)) {
+                System.err.println("Expected output:");
+                for (String g: tk.gold)
+                    System.err.println(g);
+                throw new Exception("unexpected output from test");
+            }
+            System.err.println();
+        }
+    }
+
+    Trees trees;
+    List<String> log;
+
+    @Override
+    public void init(ProcessingEnvironment env) {
+        super.init(env);
+        trees = Trees.instance(env);
+        log = new ArrayList<String>();
+    }
+
+    @Override
+    public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            for (Element e: roundEnv.getRootElements()) {
+                scan(trees.getPath(e));
+            }
+        }
+        return true;
+    }
+
+    void scan(TreePath path) {
+        new Scanner().scan(path, null);
+    }
+
+    class Scanner extends TreePathScanner<Void,Void> {
+        @Override
+        public Void visitVariable(VariableTree tree, Void ignore) {
+            TreePath p = getCurrentPath();
+            Element e = trees.getElement(p);
+            if (e.getKind() == ElementKind.EXCEPTION_PARAMETER) {
+                log("VariableTree: " + tree);
+                log("VariableTree: elem " + print(e));
+                log("VariableTree: elem.type " + print(e.asType()));
+                log("VariableTree: elem.type.elem " + print(types.asElement(e.asType())));
+                TypeMirror tm = trees.getTypeMirror(p);
+                log("VariableTree: type " + print(tm));
+                log("VariableTree: type.elem " + print(types.asElement(tm)));
+                if (types.asElement(tm) != null)
+                    log("VariableTree: type.elem.type " + print(types.asElement(tm).asType()));
+            }
+            return super.visitVariable(tree, null);
+        }
+
+        String print(TypeMirror tm) {
+            return (tm == null) ? null : new TypePrinter().visit(tm);
+        }
+
+        String print(Element e) {
+            return (e == null) ? null : (e.getKind() + " " + e.getSimpleName());
+        }
+
+        void log(String msg) {
+            System.err.println(msg);
+            log.add(msg);
+        }
+    }
+
+    class TypePrinter extends SimpleTypeVisitor7<String, Void> {
+        @Override
+        protected String defaultAction(TypeMirror tm, Void ignore) {
+            return String.valueOf(tm.getKind());
+        }
+
+        @Override
+        public String visitUnion(UnionType t, Void ignore) {
+            return (t.getKind() + " " + t.getAlternatives());
+        }
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/types/CastObjectToPrimitiveTest.java	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 7038363
+ * @summary cast from object to primitive should be for source >= 1.7
+ * @compile/fail/ref=CastObjectToPrimitiveTest.out -XDrawDiagnostics -Xlint:-options -source 5 CastObjectToPrimitiveTest.java
+ * @compile/fail/ref=CastObjectToPrimitiveTest.out -XDrawDiagnostics -Xlint:-options -source 6 CastObjectToPrimitiveTest.java
+ * @compile CastObjectToPrimitiveTest.java
+ */
+
+class CastObjectToPrimitiveTest {
+    void m() {
+        Object o = 42;
+        int i = (int) o;
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/types/CastObjectToPrimitiveTest.out	Tue May 24 11:12:40 2011 -0700
@@ -0,0 +1,2 @@
+CastObjectToPrimitiveTest.java:36:23: compiler.err.prob.found.req: (compiler.misc.inconvertible.types), java.lang.Object, int
+1 error