Merge
diff --git a/langtools/.hgtags b/langtools/.hgtags
index ab6c57d..52164bd 100644
--- a/langtools/.hgtags
+++ b/langtools/.hgtags
@@ -73,3 +73,4 @@
 89cd267c216751bdacf8629bb07a40c0950fc4f2 jdk7-b96
 c0a41294297ed397098dd92b647f481f0e1bb8fa jdk7-b97
 3b38f3aa3dc388eef0737a9fba99f54a1602ee3b jdk7-b98
+005bec70ca27239bdd4e6169b9b078507401aa72 jdk7-b99
diff --git a/langtools/make/Makefile b/langtools/make/Makefile
index 37875e8..1ee4270 100644
--- a/langtools/make/Makefile
+++ b/langtools/make/Makefile
@@ -26,9 +26,9 @@
 # Makefile for langtools: wrapper around Ant build.xml file
 
 #
-# On Solaris, the 'make' utility from Sun will not work with these makefiles.
-#    This little rule is only understood by Sun's make, and is harmless
-#    when seen by the GNU make tool. If using Sun's make, this causes the
+# On Solaris, the standard 'make' utility will not work with these makefiles.
+#    This little rule is only understood by Solaris make, and is harmless
+#    when seen by the GNU make tool. If using Solaris make, this causes the
 #    make command to fail.
 #
 SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
@@ -40,15 +40,16 @@
 
 SYSTEM_UNAME := $(shell uname)
 
+# Where is unwanted output to be delivered?
+# On Windows, MKS uses the special file "NUL", cygwin uses the customary unix file.
 ifeq ($(SYSTEM_UNAME), Windows_NT)
 DEV_NULL = NUL
 else
+DEV_NULL = /dev/null 
+endif
+
 ifneq (,$(findstring CYGWIN,$(SYSTEM_UNAME)))
-DEV_NULL = NUL
 USING_CYGWIN = true
-else
-DEV_NULL = /dev/null
-endif 
 endif
 
 ifdef USING_CYGWIN
@@ -202,7 +203,7 @@
 
 #-------------------------------------------------------------------
 #
-# Targets for Sun's internal JPRT build system
+# Targets for Oracle's internal JPRT build system
 
 CD = cd
 ZIP = zip
diff --git a/langtools/make/Makefile-classic b/langtools/make/Makefile-classic
index b99373f..90926d4 100644
--- a/langtools/make/Makefile-classic
+++ b/langtools/make/Makefile-classic
@@ -28,9 +28,9 @@
 #
 
 #
-# On Solaris, the 'make' utility from Sun will not work with these makefiles.
-#    This little rule is only understood by Sun's make, and is harmless
-#    when seen by the GNU make tool. If using Sun's make, this causes the
+# On Solaris, the standard 'make' utility will not work with these makefiles.
+#    This little rule is only understood by Solaris make, and is harmless
+#    when seen by the GNU make tool. If using Solaris make, this causes the
 #    make command to fail.
 #
 SUN_MAKE_TEST:sh = @echo "ERROR: PLEASE USE GNU VERSION OF MAKE"; exit 33
diff --git a/langtools/make/build.properties b/langtools/make/build.properties
index 3138ebe..f9a87321 100644
--- a/langtools/make/build.properties
+++ b/langtools/make/build.properties
@@ -76,17 +76,27 @@
 javadoc.jls3.option=-tag "jls3:a:See <cite>${javadoc.jls3.cite}</cite>:"
 
 # jtreg, used to run the JDK regression tests
+# See http://openjdk.java.net/jtreg/
 # Override this path as needed, either on the command line or in
 # one of the standard user build.properties files (see build.xml)
 
-# jtreg.home = /opt/jtreg/3.2.2_02
+# jtreg.home = /opt/jtreg/4.1
 
 # findbugs
+# See http://findbugs.sourceforge.net/
 # Override this path as needed, either on the command line or in
 # one of the standard user build.properties files (see build.xml)
 
 # findbugs.home = /opt/findbugs/1.2.1
 
+# vizant (graph visualization tool for Ant)
+# See http://vizant.sourceforge.net/
+# Override this path as needed, either on the command line or in
+# one of the standard user build.properties files (see build.xml)
+
+# vizant.jar = /opt/vizant/0.1.2/vizant-0.1.2.jar
+# dot = dot
+
 #------------------------------------------------------------
 
 # The following properties define the packages for each of the tools.
@@ -148,12 +158,14 @@
 
 #
 
-# The following files require the import JDK to be available
-require.import.jdk.files = \
+# The following files require the latest JDK to be available.
+# The API can be provided by using a suitable boot.java.home
+# or by setting import.jdk
+require.latest.jdk.files = \
     com/sun/tools/javac/nio/*.java
 
 # The following files in the import jdk source directory are required
-# in order to compile the files defined in ${require.import.jdk.files}
+# in order to compile the files defined in ${require.latest.jdk.files}
 #
 # For NIO, the list of stub files is defined by the contents of the primary
 # API packages, together with such types that may be required in order to
diff --git a/langtools/make/build.xml b/langtools/make/build.xml
index 9e442d7..1abad67 100644
--- a/langtools/make/build.xml
+++ b/langtools/make/build.xml
@@ -25,12 +25,79 @@
 -->
 
 <!--
- This is the main build file for the complete langtools workspace.
- It is used both when working on the tools in NetBeans, and when building
- JDK itself, in which case it is invoked from the wrapper Makefile.
+ This is the main build file for the complete langtools repository.
+ It is used when building JDK (in which case it is invoked from the
+ Makefile), and it can be used when working on the tools themselves,
+ in an IDE such as NetBeans.
+
+ External dependencies are specified via properties. These can be given
+ on the command line, or by providing a local build.properties file.
+ (They can also be edited into make/build.properties, although that is not
+ recommended.)  At a minimum, boot.java.home must be set to the installed
+ location of the version of JDK used to build this repository. Additional
+ properties may be required, depending on the targets that are built.
+ For example, to run any of the jtreg tests you must set jtreg.home,
+ to run findbugs on the code you must set findbugs.home, and so on.
+
+ For the most part, javac can be built using the previous version of JDK.
+ However, a small number of javac files require access to the latest JDK,
+ which may not yet have been compiled. To compile these files, you can do
+ one of the following:
+ - Set boot.java.home to a recent build of the latest version of JDK.
+ - Set import.jdk to either a recent build (containing jre/lib/rt.jar)
+   or to jdk source repository.  In the latter case, stub files will
+   automatically be generated and used for the required API, to avoid
+   unnecessary compilation of the source repository.
+ If you do neither, the relevant files will not be built.
+
+ The main build happens in two phases:
+ - First, javac and other tools as needed are built using ${boot.java.home}.
+   (This implies a constraint on the source code that they can be compiled
+   with the previous version of JDK.
+ - Second, all required classes are compiled with the latest javac, created
+   in the previous step.
+ The first phase is called the bootstrap phase. All targets, properties and
+ tasks that are specific to that phase have "bootstrap" in their name.
+
+ For more details on the JDK build, see
+    http://blogs.sun.com/kto/entry/anatomy_of_the_jdk_build
+    http://openjdk.java.net/groups/build/
+ For more details on the stub generator, see
+    http://blogs.sun.com/jjg/entry/building_javac_for_jdk7
+
+ Internal details ...
+
+ Interim build products are created in the build/ directory.
+ Final build products are created in the dist/ directory.
+ When building JDK, the dist/directory will contain:
+ - A bootstrap compiler suitable for running with ${boot.java.home}
+   suitable for compiling downstream parts of JDK
+ - Source files and class files for inclusion in the JDK being built
+ When building standalone, the dist/directory will contain:
+ - Separate jar files for each of the separate langtools components
+ - Simple scripts to invoke the tools by executing the corresponding
+   jar files.
+ These jar files and scripts are "for developer use only".
+
+ This file is organized into sections as follows:
+ - global property definitions
+ - general top level targets
+ - general diagnostic/debugging targets
+ - groups of targets for each tool: javac, javadoc, doclets, javah, javap, apt
+    Within each group, the following targets are provided, where applicable
+      build-bootstrap-TOOL      build the bootstrap version of the tool
+      build-classes-TOOL        build the classes for the tool
+      build-TOOL                build the jar file and script for the tool
+      jtreg-TOOL                build the tool and run the appropriate tests
+      findbugs-TOOL             run findbugs on the tool's source oode
+      TOOL                      build the tool, run the tests, and run findbugs
+ - utility definitions
  -->
 
 <project name="langtools" default="build" basedir="..">
+    <!--
+    **** Global property definitions.
+    -->
 
     <!-- Force full debuginfo for javac if the debug.classfiles
     property is set.  This must be BEFORE the include of
@@ -107,35 +174,55 @@
         ignoresystemclasses="true"
         classpath="${import.jdk}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
 
-    <!-- Set the default value of the sourcepath used for javac. -->
-    <condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
-        <isset property="import.jdk.src.dir"/>
-    </condition>
-
-    <!-- Set the default value of the classpath used for javac. -->
-    <property name="javac.classpath" value=""/>
-
-    <!-- Set the default bootclasspath option used for javac. 
-	Note that different variants of the option are used, meaning we can't just 
-	define the value for the option.
-	Note the explicit use of the standard property ${path.separator} in the following.
-	This is because Ant is not clever enough to handle direct use of : or ; -->
+    <!-- Set the default bootclasspath option used for javac.
+        Note that different variants of the option are used, meaning we can't just
+        define the value for the option.
+        Note the explicit use of the standard property ${path.separator} in the following.
+        This is because Ant is not clever enough to handle direct use of : or ; -->
     <condition property="javac.bootclasspath.opt"
             value="-Xbootclasspath:${build.classes.dir}${path.separator}${import.jdk.jar}"
             else="-Xbootclasspath/p:${build.classes.dir}">
         <isset property="import.jdk.jar"/>
     </condition>
 
-    <condition property="exclude.files" value="" else="${require.import.jdk.files}">
-        <isset property="import.jdk"/>
+    <condition property="boot.java.provides.latest.jdk">
+        <available
+            ignoresystemclasses="true"
+            classpath="${boot.java.home}/jre/lib/rt.jar" classname="java.nio.file.Path"/>
     </condition>
 
-    <!-- for debugging -->
-    <target name="check-import.jdk">
-        <echo message="import.jdk: ${import.jdk}"/>
-        <echo message="import.jdk.jar: ${import.jdk.jar}"/>
-        <echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
-    </target>
+    <condition property="bootstrap.exclude.files" value="" else="${require.latest.jdk.files}">
+        <isset property="boot.java.provides.latest.jdk"/>
+    </condition>
+
+    <condition property="exclude.files" value="" else="${require.latest.jdk.files}">
+        <or>
+            <isset property="boot.java.provides.latest.jdk"/>
+            <isset property="import.jdk"/>
+        </or>
+    </condition>
+
+    <condition property="require.import.jdk.stubs">
+        <and>
+            <not>
+                <isset property="boot.java.provides.latest.jdk"/>
+            </not>
+            <isset property="import.jdk.src.dir"/>
+        </and>
+    </condition>
+
+    <!-- Set the default value of the sourcepath used for javac. -->
+    <condition property="javac.sourcepath" value="${build.genstubs.dir}" else="">
+        <isset property="require.import.jdk.stubs"/>
+    </condition>
+
+    <!-- Set the default value of the classpath used for javac. -->
+    <property name="javac.classpath" value=""/>
+
+
+    <!--
+    **** General top level targets.
+    -->
 
     <!-- Standard target to build deliverables for JDK build. -->
 
@@ -235,7 +322,61 @@
             datafile="${build.coverage.dir}/cobertura.ser"/>
     </target>
 
-    <!-- javac targets -->
+
+    <!--
+    **** Debugging/diagnostic targets.
+    -->
+
+    <!-- standard JDK target -->
+    <target name="sanity"
+        description="display settings of configuration values">
+        <echo level="info">ant.home = ${ant.home}</echo>
+        <echo level="info">boot.java.home = ${boot.java.home}</echo>
+        <echo level="info">target.java.home = ${target.java.home}</echo>
+        <echo level="info">jtreg.home = ${jtreg.home}</echo>
+        <echo level="info">findbugs.home = ${findbugs.home}</echo>
+    </target>
+
+    <target name="post-sanity" depends="-def-jtreg,sanity,build"
+        description="perform basic validation after a standard build">
+        <jtreg
+            dir="make/test"
+            workDir="${build.jtreg.dir}/post-sanity/work"
+            reportDir="${build.jtreg.dir}/post-sanity/report"
+            jdk="${target.java.home}"
+            verbose="summary"
+            failonerror="false" resultproperty="jtreg.post-sanity.result">
+        </jtreg>
+    </target>
+
+    <!-- use vizant tool to generate graphical image of this Ant file.-->
+    <target name="vizant" depends="-def-vizant">
+        <mkdir dir="${build.dir}"/>
+        <echo message="Generating ${build.dir}/build.dot"/>
+        <vizant antfile="${make.dir}/build.xml" outfile="${build.dir}/build.dot"/>
+        <echo message="Generating ${build.dir}/build.png"/>
+        <exec executable="${dot}" >
+            <arg value="-Tpng"/>
+            <arg value="-o"/>
+            <arg file="${build.dir}/build.png"/>
+            <arg file="${build.dir}/build.dot"/>
+        </exec>
+    </target>
+
+    <target name="check-import.jdk">
+        <echo message="import.jdk: ${import.jdk}"/>
+        <echo message="import.jdk.jar: ${import.jdk.jar}"/>
+        <echo message="import.jdk.src.dir: ${import.jdk.src.dir}"/>
+    </target>
+
+    <target name="diagnostics">
+        <diagnostics/>
+    </target>
+
+
+    <!--
+    **** javac targets.
+    -->
 
     <target name="build-bootstrap-javac"
             depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
@@ -267,7 +408,10 @@
 
     <target name="javac" depends="build-javac,jtreg-javac,findbugs-javac"/>
 
-    <!-- javadoc targets -->
+
+    <!--
+    **** javadoc targets.
+    -->
 
     <target name="build-bootstrap-javadoc" depends="build-bootstrap-javac">
         <build-bootstrap-classes includes="${javadoc.includes}"/>
@@ -300,7 +444,10 @@
 
     <target name="javadoc" depends="build-javadoc,jtreg-javadoc,findbugs-javadoc"/>
 
-    <!-- doclets targets -->
+
+    <!--
+    **** doclets targets.
+    -->
 
     <target name="build-bootstrap-doclets" depends="build-bootstrap-javadoc,-def-build-bootstrap-jar">
         <build-bootstrap-classes includes="${doclets.includes}"/>
@@ -330,7 +477,10 @@
 
     <target name="doclets" depends="build-doclets,jtreg-doclets,findbugs-doclets"/>
 
-    <!-- javah targets -->
+
+    <!--
+    **** javah targets.
+    -->
 
     <target name="build-bootstrap-javah" depends="build-bootstrap-javadoc">
         <build-bootstrap-classes includes="${javah.includes}"/>
@@ -360,7 +510,10 @@
 
     <target name="javah" depends="build-javah,jtreg-javah,findbugs-javah"/>
 
-    <!-- javap targets -->
+
+    <!--
+    **** javap targets.
+    -->
 
     <target name="build-bootstrap-javap"
             depends="-def-build-bootstrap-classes,-def-build-bootstrap-jar,-def-build-bootstrap-tool">
@@ -393,7 +546,10 @@
 
     <target name="javap" depends="build-javap,jtreg-javap,findbugs-javap"/>
 
-    <!-- apt targets -->
+
+    <!--
+    **** apt targets.
+    -->
 
     <target name="build-bootstrap-apt" depends="build-bootstrap-javac">
         <build-bootstrap-classes includes="${apt.includes}"/>
@@ -426,9 +582,12 @@
 
     <target name="apt" depends="build-apt,jtreg-apt,findbugs-apt"/>
 
-    <!-- Create import JDK stubs -->
 
-    <target name="-create-import-jdk-stubs" depends="-def-genstubs" if="import.jdk.src.dir">
+    <!--
+    **** Create import JDK stubs.
+    -->
+
+    <target name="-create-import-jdk-stubs" depends="-def-genstubs" if="require.import.jdk.stubs">
         <mkdir dir="${build.genstubs.dir}"/>
         <genstubs
             srcdir="${import.jdk.src.dir}" destdir="${build.genstubs.dir}"
@@ -437,7 +596,12 @@
         />
     </target>
 
-    <!-- Check targets -->
+
+    <!--
+    **** Check targets.
+    **** "-check-*" targets check that a required property is set, and set to a reasonable value.
+    **** A user friendly message is generated if not, and the build exits.
+    -->
 
     <target name="-check-boot.java.home" depends="-def-check">
         <check name="bootstrap java" property="boot.java.home" marker="${java.marker}"/>
@@ -459,7 +623,15 @@
         <check name="jtreg" property="jtreg.home" marker="lib/jtreg.jar"/>
     </target>
 
-    <!-- Ant macro and preset defs -->
+    <target name="-check-vizant" depends="-def-check">
+        <check name="vizant" property="vizant.jar"/>
+        <check name="dot" property="dot"/>
+    </target>
+
+
+    <!--
+    **** Targets for Ant macro and task definitions.
+    -->
 
     <target name="-def-build-tool">
         <macrodef name="build-tool">
@@ -599,7 +771,7 @@
                 sourcepath=""
                 release="${bootstrap.release}"
                 full.version="${bootstrap.full.version}"
-                excludes="${require.import.jdk.files} **/package-info.java"/>
+                excludes="${bootstrap.exclude.files} **/package-info.java"/>
         </presetdef>
     </target>
 
@@ -617,7 +789,7 @@
                  classpath="${build.toolclasses.dir}/"/>
     </target>
 
-    <target name="-def-genstubs" depends="build-bootstrap-javac">
+    <target name="-def-genstubs" depends="build-bootstrap-javac" if="require.import.jdk.stubs">
         <mkdir dir="${build.toolclasses.dir}"/>
         <javac fork="true"
                source="${boot.javac.source}"
@@ -640,7 +812,7 @@
             <sequential>
                 <property name="javadoc.options" value=""/> <!-- default, can be overridden per user or per project -->
                 <!-- Note: even with this default value, includes
-         from src.classes.dir get javadoc'd; see packageset below -->
+                from src.classes.dir get javadoc'd; see packageset below -->
                 <property name="javadoc.packagenames" value="none"/> <!-- default, can be overridden per user or per project -->
                 <javadoc
                     executable="${target.java.home}/bin/javadoc"
@@ -691,13 +863,15 @@
             <attribute name="tests"/>
             <attribute name="jdk" default="${target.java.home}"/>
             <attribute name="samevm" default="true"/>
-            <attribute name="verbose" default="summary"/>
-            <attribute name="options" default=""/>
+            <attribute name="verbose" default="${default.jtreg.verbose}"/>
+            <attribute name="options" default="${other.jtreg.options}"/>
             <attribute name="keywords" default="-keywords:!ignore"/>
             <attribute name="jpda.jvmargs" default=""/>
             <sequential>
-                <property name="coverage.options" value=""/>    <!-- default -->
-                <property name="coverage.classpath" value=""/>    <!-- default -->
+                <property name="coverage.options" value=""/>              <!-- default -->
+                <property name="coverage.classpath" value=""/>            <!-- default -->
+                <property name="default.jtreg.verbose" value="summary"/>  <!-- default -->
+                <property name="other.jtreg.options" value=""/>           <!-- default -->
                 <jtreg
                     dir="${test.dir}"
                     workDir="${build.jtreg.dir}/@{name}/work"
@@ -766,11 +940,16 @@
         <property name="findbugs.defined" value="true"/>
     </target>
 
+    <target name="-def-vizant" unless="vizant.defined" depends="-check-vizant">
+        <taskdef name="vizant" classname="net.sourceforge.vizant.Vizant" classpath="${vizant.jar}"/>
+        <property name="vizant.defined" value="true"/>
+    </target>
+
     <target name="-def-check">
         <macrodef name="check">
             <attribute name="name"/>
             <attribute name="property"/>
-            <attribute name="marker"/>
+            <attribute name="marker" default=""/>
             <sequential>
                 <fail message="Cannot locate @{name}: please set @{property} to its location">
                     <condition>
@@ -781,41 +960,19 @@
                 </fail>
                 <fail message="@{name} is not installed in ${@{property}}">
                     <condition>
-                        <not>
-                            <available file="${@{property}}/@{marker}"/>
-                        </not>
+                        <and>
+                            <not>
+                                <equals arg1="@{marker}" arg2=""/>
+                            </not>
+                            <not>
+                                <available file="${@{property}}/@{marker}"/>
+                            </not>
+                        </and>
                     </condition>
                 </fail>
             </sequential>
         </macrodef>
     </target>
 
-    <!-- standard JDK target -->
-    <target name="sanity"
-        description="display settings of configuration values">
-        <echo level="info">ant.home = ${ant.home}</echo>
-        <echo level="info">boot.java.home = ${boot.java.home}</echo>
-        <echo level="info">target.java.home = ${target.java.home}</echo>
-        <echo level="info">jtreg.home = ${jtreg.home}</echo>
-        <echo level="info">findbugs.home = ${findbugs.home}</echo>
-    </target>
-
-    <!-- useful debugging targets -->
-    <target name="diagnostics">
-        <diagnostics/>
-    </target>
-
-    <target name="post-sanity" depends="-def-jtreg,sanity,build"
-        description="perform basic validation after a standard build">
-        <jtreg
-            dir="make/test"
-            workDir="${build.jtreg.dir}/post-sanity/work"
-            reportDir="${build.jtreg.dir}/post-sanity/report"
-            jdk="${target.java.home}"
-            verbose="summary"
-            failonerror="false" resultproperty="jtreg.post-sanity.result">
-        </jtreg>
-
-    </target>
 </project>
 
diff --git a/langtools/src/share/classes/com/sun/source/tree/Tree.java b/langtools/src/share/classes/com/sun/source/tree/Tree.java
index 8582ef9..8d5a6dd 100644
--- a/langtools/src/share/classes/com/sun/source/tree/Tree.java
+++ b/langtools/src/share/classes/com/sun/source/tree/Tree.java
@@ -30,7 +30,7 @@
  *
  * <p><b>WARNING:</b> This interface and its sub-interfaces are
  * subject to change as the Java&trade; programming language evolves.
- * These interfaces are implemented by Sun's Java compiler (javac)
+ * These interfaces are implemented by the JDK Java compiler (javac)
  * and should not be implemented either directly or indirectly by
  * other applications.
  *
diff --git a/langtools/src/share/classes/com/sun/source/util/JavacTask.java b/langtools/src/share/classes/com/sun/source/util/JavacTask.java
index 33f1667..2f2038f 100644
--- a/langtools/src/share/classes/com/sun/source/util/JavacTask.java
+++ b/langtools/src/share/classes/com/sun/source/util/JavacTask.java
@@ -36,7 +36,7 @@
 import javax.tools.JavaFileObject;
 
 /**
- * Provides access to functionality specific to the Sun Java Compiler, javac.
+ * Provides access to functionality specific to the JDK Java Compiler, javac.
  *
  * @author Peter von der Ah&eacute;
  * @author Jonathan Gibbons
diff --git a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
index 2356f40..7f45149 100644
--- a/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
+++ b/langtools/src/share/classes/com/sun/source/util/TaskEvent.java
@@ -30,7 +30,7 @@
 import javax.tools.JavaFileObject;
 
 /**
- * Provides details about work that has been done by the Sun Java Compiler, javac.
+ * Provides details about work that has been done by the JDK Java Compiler, javac.
  *
  * @author Jonathan Gibbons
  * @since 1.6
diff --git a/langtools/src/share/classes/com/sun/source/util/TaskListener.java b/langtools/src/share/classes/com/sun/source/util/TaskListener.java
index 18e3d05..602ccbf 100644
--- a/langtools/src/share/classes/com/sun/source/util/TaskListener.java
+++ b/langtools/src/share/classes/com/sun/source/util/TaskListener.java
@@ -27,7 +27,7 @@
 
 
 /**
- * Provides a listener to monitor the activity of the Sun Java Compiler, javac.
+ * Provides a listener to monitor the activity of the JDK Java Compiler, javac.
  *
  * @author Jonathan Gibbons
  * @since 1.6
diff --git a/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java b/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java
index 25755bb..07184df 100644
--- a/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java
+++ b/langtools/src/share/classes/com/sun/tools/apt/comp/Apt.java
@@ -60,7 +60,7 @@
 /**
  * Apt compiler phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own
  *  risk.  This code and its internal interfaces are subject to change
  *  or deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/apt/main/CommandLine.java b/langtools/src/share/classes/com/sun/tools/apt/main/CommandLine.java
index 7788e68..63aa98b 100644
--- a/langtools/src/share/classes/com/sun/tools/apt/main/CommandLine.java
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/CommandLine.java
@@ -35,8 +35,8 @@
 /**
  * Various utility methods for processing Java tool command line arguments.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java
index bbb496b..8d94954 100644
--- a/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/JavaCompiler.java
@@ -45,7 +45,7 @@
 import com.sun.tools.javac.parser.DocCommentScanner;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own
  *  risk.  This code and its internal interfaces are subject to change
  *  or deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/apt/main/Main.java b/langtools/src/share/classes/com/sun/tools/apt/main/Main.java
index e0f964a..4f2ce9b 100644
--- a/langtools/src/share/classes/com/sun/tools/apt/main/Main.java
+++ b/langtools/src/share/classes/com/sun/tools/apt/main/Main.java
@@ -61,7 +61,7 @@
 /** This class provides a commandline interface to the apt build-time
  *  tool.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.
+ *  <p><b>This is NOT part of any supported API.
  *  If you write code that depends on this, you do so at your own
  *  risk.  This code and its internal interfaces are subject to change
  *  or deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/apt/util/Bark.java b/langtools/src/share/classes/com/sun/tools/apt/util/Bark.java
index 4a9c2d7..ceb9453 100644
--- a/langtools/src/share/classes/com/sun/tools/apt/util/Bark.java
+++ b/langtools/src/share/classes/com/sun/tools/apt/util/Bark.java
@@ -34,8 +34,8 @@
 
 /** A subtype of Log for use in APT.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java b/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java
index 6bdeaa7..e7ab896 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/AccessFlags.java
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, sections 4.2, 4.6, 4.7.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java b/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java
index fa59fa9..98eadc6 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Annotation.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.16.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java
index c65ef39..091a8fa 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/AnnotationDefault_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.15.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java
index 33f24b3..0c6e43d 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Attribute.java
@@ -31,8 +31,8 @@
 import java.util.Map;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java b/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java
index 7406cfa..a4682c0 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/AttributeException.java
@@ -26,8 +26,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java b/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java
index 7b09ecc..d86c39e 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Attributes.java
@@ -32,8 +32,8 @@
 import java.util.Map;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java
index 0e98690d..0223d58 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/CharacterRangeTable_attribute.java
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java
index 02f0d75..affcad0 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassFile.java
@@ -35,8 +35,8 @@
 /**
  * See JVMS3, section 4.2.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java
index ecd86bb..ad67c6b 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassReader.java
@@ -32,8 +32,8 @@
 import java.io.InputStream;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java
index 5d4462c..bcb9288 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassTranslator.java
@@ -42,8 +42,8 @@
 /**
  * Rewrites a class file using a map of translations.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java
index 188582d..12f56a0 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ClassWriter.java
@@ -41,8 +41,8 @@
 /**
  * Write a ClassFile data structure to a file or stream.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java
index da8c985..bc21154 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Code_attribute.java
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, section 4.8.3.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java
index 1fd6ead..22ef158 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/CompilationID_attribute.java
@@ -27,8 +27,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java
index 59ab4be..b994b6d 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPool.java
@@ -33,8 +33,8 @@
 /**
  * See JVMS3, section 4.5.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java
index d82b5e8..15b5298 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantPoolException.java
@@ -27,8 +27,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java
index c0642f4..94a88cb 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ConstantValue_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.2.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java b/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java
index d147a3e..fba1700 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/DefaultAttribute.java
@@ -26,8 +26,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java
index 7051501..646ed3d 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Deprecated_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.15.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java b/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java
index 0f6dd38..ff194c9 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Descriptor.java
@@ -31,8 +31,8 @@
 /**
  * See JVMS3, section 4.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java b/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java
index f907967..9249436 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/DescriptorException.java
@@ -27,8 +27,8 @@
 package com.sun.tools.classfile;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java
index 66f8976..2296810 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/EnclosingMethod_attribute.java
@@ -31,8 +31,8 @@
 /**
  * See JVMS3, section 4.8.7.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java
index 4779196..05c301b 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Exceptions_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.5.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java
index 348eb4f..5f8f921 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/ExtendedAnnotation.java
@@ -36,8 +36,8 @@
 /**
  * See JSR 308 specification, section 4.1
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Field.java b/langtools/src/share/classes/com/sun/tools/classfile/Field.java
index 5591302..89e313f 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Field.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Field.java
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java
index f608552..2033a9e 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/InnerClasses_attribute.java
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, section 4.8.6.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java b/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java
index b00f4af..d6ca812 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Instruction.java
@@ -28,8 +28,8 @@
 /**
  * See JVMS3, chapter 6.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  *
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java
index 33344f4..e07c9ec 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LineNumberTable_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.12.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java
index eabcd9b..9aa060a 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTable_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.13.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java
index 9a43d52..b917b0f 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/LocalVariableTypeTable_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.14.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Method.java b/langtools/src/share/classes/com/sun/tools/classfile/Method.java
index 29ea17e..5345d54 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Method.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Method.java
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /*
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java b/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java
index 607ded4..b5a0086 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Opcode.java
@@ -34,8 +34,8 @@
  * <p>In addition to providing all the standard opcodes defined in JVMS,
  * this class also provides legacy support for the PicoJava extensions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java
index cc8c5a7..c0ec09d 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.16 and 4.8.17.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java
index 9a08a8e..b1a2e65 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.17.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java
index 9555afe..340383c 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleParameterAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.18.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.java
index 5fc5409..01b14a8 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeInvisibleTypeAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JSR 308 specification, section 4.1
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java
index f7a3e72..2258438 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeParameterAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.18 and 4.8.19.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.java
index bfe6057..803fbd7 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeTypeAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JSR 308 specification, section 4
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java
index 2b2f9ee..51075d6 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.16.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java
index 202b037..649fe85 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleParameterAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.18.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.java
index 9cd1c76..1cee8b5 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/RuntimeVisibleTypeAnnotations_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JSR 308 specification, section 4.1
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Signature.java b/langtools/src/share/classes/com/sun/tools/classfile/Signature.java
index 2b4f899..ccc17ba 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Signature.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Signature.java
@@ -32,8 +32,8 @@
 /**
  * See JVMS3 4.4.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java
index 3c023f4..89c4893 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Signature_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.9.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java
index 643e519..6ed4f01 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceDebugExtension_attribute.java
@@ -32,8 +32,8 @@
 /**
  * See JVMS3, section 4.8.15.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java
index a345ece..168a447 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceFile_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.10.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java
index 7b213c2..8b00ffe 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/SourceID_attribute.java
@@ -27,8 +27,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java
index 4c2f595..bdb39a9 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/StackMapTable_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java
index a80448d..e57a24b 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/StackMap_attribute.java
@@ -28,8 +28,8 @@
 import java.io.IOException;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java b/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java
index d1a14ea..f1995d2 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Synthetic_attribute.java
@@ -30,8 +30,8 @@
 /**
  * See JVMS3, section 4.8.8.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/classfile/Type.java b/langtools/src/share/classes/com/sun/tools/classfile/Type.java
index 0386f24..ded095b 100644
--- a/langtools/src/share/classes/com/sun/tools/classfile/Type.java
+++ b/langtools/src/share/classes/com/sun/tools/classfile/Type.java
@@ -34,8 +34,8 @@
  *  Family of classes used to represent the parsed form of a {@link Descriptor}
  *  or {@link Signature}.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/package.html b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/package.html
index 0e01452..ef2bcd2 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/package.html
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/package.html
@@ -28,8 +28,7 @@
 <title>com.sun.tools.doclets.formats.html package</title>
 </head>
 <body bgcolor="white">
-        This is the default doclet provided by doclet provided by 
-        Sun<font size="-2"><sup>TM</sup></font> that produces Javadoc's 
+        This is the default doclet provided with JDK that produces Javadoc's 
         default HTML-formatted API output.  For more documentation
         on this doclet, please refer to the link below.
         
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
index 82e7e7e..4145af7 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractBuilder.java
@@ -92,44 +92,42 @@
     public abstract void build() throws IOException;
 
     /**
-     * Build the documentation, as specified by the given XML elements.
+     * Build the documentation, as specified by the given XML element.
      *
-     * @param elements the XML elements that specify which components to
-     *                 document.
+     * @param node the XML element that specifies which component to document.
      */
-    protected void build(List<?> elements) {
-        for (int i = 0; i < elements.size(); i++ ) {
-            Object element = elements.get(i);
-            String component = (String)
-                ((element instanceof String) ?
-                     element :
-                    ((List<?>) element).get(0));
-            try {
-                invokeMethod("build" + component,
-                    element instanceof String ?
-                        new Class<?>[] {} :
-                        new Class<?>[] {List.class},
-                    element instanceof String ?
-                        new Object[] {} :
-                        new Object[] {((List<?>) element).subList(1,
-                            ((List<?>) element).size())});
-            } catch (NoSuchMethodException e) {
-                e.printStackTrace();
-                configuration.root.printError("Unknown element: " + component);
-                throw new DocletAbortException();
-            } catch (InvocationTargetException e) {
-                e.getCause().printStackTrace();
-            } catch (Exception e) {
-                e.printStackTrace();
-                configuration.root.printError("Exception " +
-                    e.getClass().getName() +
-                    " thrown while processing element: " + component);
-                throw new DocletAbortException();
-            }
+    protected void build(XMLNode node) {
+        String component = node.name;
+        try {
+            invokeMethod("build" + component,
+                    new Class<?>[] { XMLNode.class },
+                    new Object[] { node });
+        } catch (NoSuchMethodException e) {
+            e.printStackTrace();
+            configuration.root.printError("Unknown element: " + component);
+            throw new DocletAbortException();
+        } catch (InvocationTargetException e) {
+            e.getCause().printStackTrace();
+        } catch (Exception e) {
+            e.printStackTrace();
+            configuration.root.printError("Exception " +
+                e.getClass().getName() +
+                " thrown while processing element: " + component);
+            throw new DocletAbortException();
         }
     }
 
     /**
+     * Build the documentation, as specified by the children of the given XML element.
+     *
+     * @param node the XML element that specifies which components to document.
+     */
+    protected void buildChildren(XMLNode node) {
+        for (XMLNode child: node.children)
+            build(child);
+    }
+
+    /**
      * Given the name and parameters, invoke the method in the builder.  This
      * method is required to invoke the appropriate build method as instructed
      * by the builder XML file.
@@ -138,7 +136,14 @@
      * @param paramClasses the types for each parameter.
      * @param params       the parameters of the method.
      */
-    protected abstract void invokeMethod(String methodName, Class<?>[] paramClasses,
+    protected void invokeMethod(String methodName, Class<?>[] paramClasses,
             Object[] params)
-    throws Exception;
+    throws Exception {
+        if (DEBUG) {
+            configuration.root.printError("DEBUG: " + this.getClass().getName()
+                + "." + methodName);
+        }
+        Method method = this.getClass().getMethod(methodName, paramClasses);
+        method.invoke(this, params);
+    }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
index 0d5b77d..f91fbd6 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AbstractMemberBuilder.java
@@ -27,7 +27,6 @@
 
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.*;
-import java.util.*;
 
 /**
  * The superclass for all member builders.  Member builders are only executed
@@ -69,9 +68,10 @@
      *
      * @param elements {@inheritDoc}
      */
-    public void build(List<?> elements) {
+    @Override
+    public void build(XMLNode node) {
         if (hasMembersToDocument()) {
-            super.build(elements);
+            super.build(node);
         }
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
index aa8d73f..8df1198 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java
@@ -30,7 +30,6 @@
 import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the summary for a given annotation type.
@@ -92,20 +91,6 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void build() throws IOException {
         build(LayoutParser.getInstance(configuration).parseXML(ROOT));
     }
@@ -122,8 +107,8 @@
       *
       * @param elements the XML elements that specify how to document a class.
       */
-     public void buildAnnotationTypeDoc(List<?> elements) throws Exception {
-        build(elements);
+     public void buildAnnotationTypeDoc(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
         copyDocFiles();
      }
@@ -154,7 +139,7 @@
     /**
      * Build the header of the page.
      */
-    public void buildAnnotationTypeHeader() {
+    public void buildAnnotationTypeHeader(XMLNode node) {
         writer.writeHeader(configuration.getText("doclet.AnnotationType") +
             " " + annotationTypeDoc.name());
     }
@@ -162,14 +147,14 @@
     /**
      * If this class is deprecated, print the appropriate information.
      */
-    public void buildDeprecationInfo () {
+    public void buildDeprecationInfo (XMLNode node) {
         writer.writeAnnotationTypeDeprecationInfo();
     }
 
     /**
      * Build the signature of the current annotation type.
      */
-    public void buildAnnotationTypeSignature() {
+    public void buildAnnotationTypeSignature(XMLNode node) {
         StringBuffer modifiers = new StringBuffer(
             annotationTypeDoc.modifiers() + " ");
         writer.writeAnnotationTypeSignature(
@@ -180,14 +165,14 @@
     /**
      * Build the class description.
      */
-    public void buildAnnotationTypeDescription() {
+    public void buildAnnotationTypeDescription(XMLNode node) {
        writer.writeAnnotationTypeDescription();
     }
 
     /**
      * Build the tag information for the current class.
      */
-    public void buildAnnotationTypeTagInfo() {
+    public void buildAnnotationTypeTagInfo(XMLNode node) {
        writer.writeAnnotationTypeTagInfo();
     }
 
@@ -197,9 +182,9 @@
      * @param elements the XML elements that specify how a member summary is
      *                 documented.
      */
-    public void buildMemberSummary(List<?> elements) throws Exception {
+    public void buildMemberSummary(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getMemberSummaryBuilder(writer).build(elements);
+            getMemberSummaryBuilder(writer).buildChildren(node);
         writer.completeMemberSummaryBuild();
     }
 
@@ -209,10 +194,10 @@
      * @param elements the XML elements that specify how a annotation type
      *                 members are documented.
      */
-    public void buildAnnotationTypeOptionalMemberDetails(List<?> elements)
+    public void buildAnnotationTypeOptionalMemberDetails(XMLNode node)
     throws Exception {
         configuration.getBuilderFactory().
-            getAnnotationTypeOptionalMemberBuilder(writer).build(elements);
+            getAnnotationTypeOptionalMemberBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -221,17 +206,17 @@
      * @param elements the XML elements that specify how a annotation type
      *                 members are documented.
      */
-    public void buildAnnotationTypeRequiredMemberDetails(List<?> elements)
+    public void buildAnnotationTypeRequiredMemberDetails(XMLNode node)
     throws Exception {
         configuration.getBuilderFactory().
-            getAnnotationTypeRequiredMemberBuilder(writer).build(elements);
+            getAnnotationTypeRequiredMemberBuilder(writer).buildChildren(node);
     }
 
 
     /**
      * Build the footer of the page.
      */
-    public void buildAnnotationTypeFooter() {
+    public void buildAnnotationTypeFooter(XMLNode node) {
         writer.writeFooter();
     }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
index 9cc8522..632f26a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeOptionalMemberBuilder.java
@@ -30,7 +30,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for optional annotation type members.
@@ -85,6 +84,7 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     public String getName() {
         return "AnnotationTypeOptionalMemberDetails";
     }
@@ -95,34 +95,20 @@
      * @param elements the XML elements that specify how to construct this
      *                documentation.
      */
-    public void buildAnnotationTypeOptionalMember(List<?> elements) {
+    public void buildAnnotationTypeOptionalMember(XMLNode node) {
         if (writer == null) {
             return;
         }
         for (currentMemberIndex = 0; currentMemberIndex < members.size();
             currentMemberIndex++) {
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
      * Document the default value for this optional member.
      */
-    public void buildDefaultValueInfo() {
+    public void buildDefaultValueInfo(XMLNode node) {
         ((AnnotationTypeOptionalMemberWriter) writer).writeDefaultValueInfo(
             (MemberDoc) members.get(currentMemberIndex));
     }
@@ -130,6 +116,7 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     public AnnotationTypeRequiredMemberWriter getWriter() {
         return writer;
     }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
index add03d1..f278e69 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java
@@ -30,7 +30,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for required annotation type members.
@@ -114,20 +113,6 @@
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
      * Returns a list of members that will be documented for the given class.
      * This information can be used for doclet specific documentation
      * generation.
@@ -161,20 +146,20 @@
      * @param elements the XML elements that specify how to construct this
      *                documentation.
      */
-    public void buildAnnotationTypeRequiredMember(List<?> elements) {
+    public void buildAnnotationTypeRequiredMember(XMLNode node) {
         if (writer == null) {
             return;
         }
         for (currentMemberIndex = 0; currentMemberIndex < members.size();
             currentMemberIndex++) {
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
      * Build the overall header.
      */
-    public void buildHeader() {
+    public void buildHeader(XMLNode node) {
         writer.writeHeader(classDoc,
             configuration.getText("doclet.Annotation_Type_Member_Detail"));
     }
@@ -182,7 +167,7 @@
     /**
      * Build the header for the individual members.
      */
-    public void buildMemberHeader() {
+    public void buildMemberHeader(XMLNode node) {
         writer.writeMemberHeader((MemberDoc) members.get(
                 currentMemberIndex),
             currentMemberIndex == 0);
@@ -191,14 +176,14 @@
     /**
      * Build the signature.
      */
-    public void buildSignature() {
+    public void buildSignature(XMLNode node) {
         writer.writeSignature((MemberDoc) members.get(currentMemberIndex));
     }
 
     /**
      * Build the deprecation information.
      */
-    public void buildDeprecationInfo() {
+    public void buildDeprecationInfo(XMLNode node) {
         writer.writeDeprecated((MemberDoc) members.get(currentMemberIndex));
     }
 
@@ -206,7 +191,7 @@
      * Build the comments for the member.  Do nothing if
      * {@link Configuration#nocomment} is set to true.
      */
-    public void buildMemberComments() {
+    public void buildMemberComments(XMLNode node) {
         if(! configuration.nocomment){
             writer.writeComments((MemberDoc) members.get(currentMemberIndex));
         }
@@ -215,21 +200,21 @@
     /**
      * Build the tag information.
      */
-    public void buildTagInfo() {
+    public void buildTagInfo(XMLNode node) {
         writer.writeTags((MemberDoc) members.get(currentMemberIndex));
     }
 
     /**
      * Build the footer for the individual member.
      */
-    public void buildMemberFooter() {
+    public void buildMemberFooter(XMLNode node) {
         writer.writeMemberFooter();
     }
 
     /**
      * Build the overall footer.
      */
-    public void buildFooter() {
+    public void buildFooter(XMLNode node) {
         writer.writeFooter(classDoc);
     }
 
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
index 6ff14c6..15a5341 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ClassBuilder.java
@@ -30,7 +30,6 @@
 import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the summary for a given class.
@@ -108,20 +107,6 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void build() throws IOException {
         build(LayoutParser.getInstance(configuration).parseXML(ROOT));
     }
@@ -138,8 +123,8 @@
       *
       * @param elements the XML elements that specify how to document a class.
       */
-     public void buildClassDoc(List<?> elements) throws Exception {
-        build(elements);
+     public void buildClassDoc(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
         copyDocFiles();
      }
@@ -169,7 +154,7 @@
     /**
      * Build the header of the page.
      */
-    public void buildClassHeader() {
+    public void buildClassHeader(XMLNode node) {
         String key;
         if (isInterface) {
             key =  "doclet.Interface";
@@ -185,7 +170,7 @@
     /**
      * Build the class tree documentation.
      */
-    public void buildClassTree() {
+    public void buildClassTree(XMLNode node) {
         writer.writeClassTree();
     }
 
@@ -193,42 +178,42 @@
      * If this is a class, list all interfaces
      * implemented by this class.
      */
-    public void buildImplementedInterfacesInfo() {
+    public void buildImplementedInterfacesInfo(XMLNode node) {
         writer.writeImplementedInterfacesInfo();
     }
 
     /**
      * If this is an interface, list all super interfaces.
      */
-    public void buildSuperInterfacesInfo() {
+    public void buildSuperInterfacesInfo(XMLNode node) {
         writer.writeSuperInterfacesInfo();
     }
 
     /**
      * List the parameters of this class.
      */
-    public void buildTypeParamInfo() {
+    public void buildTypeParamInfo(XMLNode node) {
         writer.writeTypeParamInfo();
     }
 
     /**
      * List all the classes extend this one.
      */
-    public void buildSubClassInfo() {
+    public void buildSubClassInfo(XMLNode node) {
         writer.writeSubClassInfo();
     }
 
     /**
      * List all the interfaces that extend this one.
      */
-    public void buildSubInterfacesInfo() {
+    public void buildSubInterfacesInfo(XMLNode node) {
         writer.writeSubInterfacesInfo();
     }
 
     /**
      * If this is an interface, list all classes that implement this interface.
      */
-    public void buildInterfaceUsageInfo () {
+    public void buildInterfaceUsageInfo (XMLNode node) {
         writer.writeInterfaceUsageInfo();
     }
 
@@ -236,21 +221,21 @@
      * If this is an inner class or interface, list the enclosing class or
      * interface.
      */
-    public void buildNestedClassInfo () {
+    public void buildNestedClassInfo (XMLNode node) {
         writer.writeNestedClassInfo();
     }
 
     /**
      * If this class is deprecated, print the appropriate information.
      */
-    public void buildDeprecationInfo () {
+    public void buildDeprecationInfo (XMLNode node) {
         writer.writeClassDeprecationInfo();
     }
 
     /**
      * Build the signature of the current class.
      */
-    public void buildClassSignature() {
+    public void buildClassSignature(XMLNode node) {
         StringBuffer modifiers = new StringBuffer(classDoc.modifiers() + " ");
         if (isEnum) {
             modifiers.append("enum ");
@@ -276,14 +261,14 @@
     /**
      * Build the class description.
      */
-    public void buildClassDescription() {
+    public void buildClassDescription(XMLNode node) {
        writer.writeClassDescription();
     }
 
     /**
      * Build the tag information for the current class.
      */
-    public void buildClassTagInfo() {
+    public void buildClassTagInfo(XMLNode node) {
        writer.writeClassTagInfo();
     }
 
@@ -293,9 +278,9 @@
      * @param elements the XML elements that specify how a member summary is
      *                 documented.
      */
-    public void buildMemberSummary(List<?> elements) throws Exception {
+    public void buildMemberSummary(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getMemberSummaryBuilder(writer).build(elements);
+            getMemberSummaryBuilder(writer).buildChildren(node);
         writer.completeMemberSummaryBuild();
     }
 
@@ -305,9 +290,9 @@
      * @param elements the XML elements that specify how a enum constants are
      *                 documented.
      */
-    public void buildEnumConstantsDetails(List<?> elements) throws Exception {
+    public void buildEnumConstantsDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getEnumConstantsBuilder(writer).build(elements);
+            getEnumConstantsBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -315,9 +300,9 @@
      *
      * @param elements the XML elements that specify how a field is documented.
      */
-    public void buildFieldDetails(List<?> elements) throws Exception {
+    public void buildFieldDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getFieldBuilder(writer).build(elements);
+            getFieldBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -326,9 +311,9 @@
      * @param elements the XML elements that specify how to document a
      * constructor.
      */
-    public void buildConstructorDetails(List<?> elements) throws Exception {
+    public void buildConstructorDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-            getConstructorBuilder(writer).build(elements);
+            getConstructorBuilder(writer).buildChildren(node);
     }
 
     /**
@@ -336,15 +321,15 @@
      *
      * @param elements the XML elements that specify how a method is documented.
      */
-    public void buildMethodDetails(List<?> elements) throws Exception {
+    public void buildMethodDetails(XMLNode node) throws Exception {
         configuration.getBuilderFactory().
-                getMethodBuilder(writer).build(elements);
+                getMethodBuilder(writer).buildChildren(node);
     }
 
     /**
      * Build the footer of the page.
      */
-    public void buildClassFooter() {
+    public void buildClassFooter(XMLNode node) {
         writer.writeFooter();
     }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
index 61971b0..2126b61 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstantsSummaryBuilder.java
@@ -30,7 +30,6 @@
 import com.sun.javadoc.*;
 import java.io.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the Constants Summary Page.
@@ -109,20 +108,6 @@
     /**
      * {@inheritDoc}
      */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
-     * {@inheritDoc}
-     */
     public void build() throws IOException {
         if (writer == null) {
             //Doclet does not support this output.
@@ -144,29 +129,29 @@
      * @param elements the list of elements describing constant summary
      *                 documentation.
      */
-    public void buildConstantSummary(List<?> elements) throws Exception {
-        build(elements);
+    public void buildConstantSummary(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
     }
 
     /**
      * Build the header.
      */
-    public void buildHeader() {
+    public void buildHeader(XMLNode node) {
         writer.writeHeader();
     }
 
     /**
      * Build the footer.
      */
-    public void buildFooter() {
+    public void buildFooter(XMLNode node) {
         writer.writeFooter();
     }
 
     /**
      * Build the table of contents.
      */
-    public void buildContents() {
+    public void buildContents(XMLNode node) {
         writer.writeContentsHeader();
         PackageDoc[] packages = configuration.packages;
         printedPackageHeaders = new HashSet<String>();
@@ -186,14 +171,14 @@
      * @param elements the XML elements that represent the components
      *                 of documentation for each package.
      */
-    public void buildConstantSummaries(List<?> elements) {
+    public void buildConstantSummaries(XMLNode node) {
         PackageDoc[] packages = configuration.packages;
         printedPackageHeaders = new HashSet<String>();
         for (int i = 0; i < packages.length; i++) {
             if (hasConstantField(packages[i])) {
                 currentPackage = packages[i];
                 //Build the documentation for the current package.
-                build(elements);
+                buildChildren(node);
             }
         }
     }
@@ -204,8 +189,8 @@
      * @param elements the list of XML elements that make up package
      *                 documentation.
      */
-    public void buildPackageConstantSummary(List<?> elements) {
-        build(elements);
+    public void buildPackageConstantSummary(XMLNode node) {
+        buildChildren(node);
     }
 
     /**
@@ -214,7 +199,7 @@
      * @param elements the list of XML elements that make up the class
      *                 constant summary.
      */
-    public void buildClassConstantSummary(List<?> elements) {
+    public void buildClassConstantSummary(XMLNode node) {
         ClassDoc[] classes = currentPackage.name().length() > 0 ?
             currentPackage.allClasses() :
             configuration.classDocCatalog.allClasses(
@@ -227,14 +212,14 @@
             }
             currentClass = classes[i];
             //Build the documentation for the current class.
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
      * Build the header for the given class.
      */
-    public void buildPackageHeader() {
+    public void buildPackageHeader(XMLNode node) {
         String parsedPackageName = parsePackageName(currentPackage.name());
         if (! printedPackageHeaders.contains(parsedPackageName)) {
             writer.writePackageName(currentPackage,
@@ -246,7 +231,7 @@
     /**
      * Build the header for the given class.
      */
-    public void buildClassHeader() {
+    public void buildClassHeader(XMLNode node) {
         writer.writeConstantMembersHeader(currentClass);
     }
 
@@ -254,14 +239,14 @@
      * Print summary of constant members in the
      * class.
      */
-    public void buildConstantMembers() {
-        new ConstantFieldBuilder(currentClass).buildMembersSummary();
+    public void buildConstantMembers(XMLNode node) {
+        new ConstantFieldBuilder(currentClass).buildMembersSummary(node);
     }
 
     /**
      * Build the footer for the given class.
      */
-    public void buildClassFooter() {
+    public void buildClassFooter(XMLNode node) {
         writer.writeConstantMembersFooter(currentClass);
     }
 
@@ -362,7 +347,7 @@
         /**
          * Builds the table of constants for a given class.
          */
-        protected void buildMembersSummary() {
+        protected void buildMembersSummary(XMLNode node) {
             List<FieldDoc> members = new ArrayList<FieldDoc>(members());
             if (members.size() > 0) {
                 Collections.sort(members);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
index f5b4ae0..ea3b3be 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/ConstructorBuilder.java
@@ -28,7 +28,6 @@
 import com.sun.tools.doclets.internal.toolkit.util.*;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
-import java.lang.reflect.*;
 import java.util.*;
 
 /**
@@ -134,22 +133,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of constructors that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -175,21 +158,21 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildConstructorDoc(List<?> elements) {
+        public void buildConstructorDoc(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentMethodIndex = 0;
                         currentMethodIndex < constructors.size();
                         currentMethodIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Constructor_Detail"));
@@ -198,7 +181,7 @@
         /**
          * Build the header for the individual constructor.
          */
-        public void buildConstructorHeader() {
+        public void buildConstructorHeader(XMLNode node) {
                 writer.writeConstructorHeader(
                         (ConstructorDoc) constructors.get(currentMethodIndex),
                         currentMethodIndex == 0);
@@ -207,7 +190,7 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature(
                         (ConstructorDoc) constructors.get(currentMethodIndex));
         }
@@ -215,7 +198,7 @@
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated(
                         (ConstructorDoc) constructors.get(currentMethodIndex));
         }
@@ -224,7 +207,7 @@
          * Build the comments for the constructor.  Do nothing if
          * {@link Configuration#nocomment} is set to true.
          */
-        public void buildConstructorComments() {
+        public void buildConstructorComments(XMLNode node) {
                 if (!configuration.nocomment) {
                         writer.writeComments(
                                 (ConstructorDoc) constructors.get(currentMethodIndex));
@@ -234,21 +217,21 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags((ConstructorDoc) constructors.get(currentMethodIndex));
         }
 
         /**
          * Build the footer for the individual constructor.
          */
-        public void buildConstructorFooter() {
+        public void buildConstructorFooter(XMLNode node) {
                 writer.writeConstructorFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
index 038e03f..f0cff83 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/EnumConstantBuilder.java
@@ -29,7 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for a enum constants.
@@ -116,22 +115,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of enum constants that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -165,21 +148,21 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildEnumConstant(List<?> elements) {
+        public void buildEnumConstant(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentEnumConstantsIndex = 0;
                         currentEnumConstantsIndex < enumConstants.size();
                         currentEnumConstantsIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Enum_Constant_Detail"));
@@ -188,7 +171,7 @@
         /**
          * Build the header for the individual enum constants.
          */
-        public void buildEnumConstantHeader() {
+        public void buildEnumConstantHeader(XMLNode node) {
                 writer.writeEnumConstantHeader(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex),
                         currentEnumConstantsIndex == 0);
@@ -197,7 +180,7 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
         }
@@ -205,7 +188,7 @@
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
         }
@@ -214,7 +197,7 @@
          * Build the comments for the enum constant.  Do nothing if
          * {@link Configuration#nocomment} is set to true.
          */
-        public void buildEnumConstantComments() {
+        public void buildEnumConstantComments(XMLNode node) {
                 if (!configuration.nocomment) {
                         writer.writeComments(
                                 (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
@@ -224,7 +207,7 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags(
                         (FieldDoc) enumConstants.get(currentEnumConstantsIndex));
         }
@@ -232,14 +215,14 @@
         /**
          * Build the footer for the individual enum constants.
          */
-        public void buildEnumConstantFooter() {
+        public void buildEnumConstantFooter(XMLNode node) {
                 writer.writeEnumConstantFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
index 0c1d121..0e381f2 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/FieldBuilder.java
@@ -29,7 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds documentation for a field.
@@ -117,22 +116,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of fields that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -166,21 +149,21 @@
          * @param elements the XML elements that specify how to construct this
          *                documentation.
          */
-        public void buildFieldDoc(List<?> elements) {
+        public void buildFieldDoc(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentFieldIndex = 0;
                         currentFieldIndex < fields.size();
                         currentFieldIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Field_Detail"));
@@ -189,7 +172,7 @@
         /**
          * Build the header for the individual field.
          */
-        public void buildFieldHeader() {
+        public void buildFieldHeader(XMLNode node) {
                 writer.writeFieldHeader(
                         (FieldDoc) fields.get(currentFieldIndex),
                         currentFieldIndex == 0);
@@ -198,14 +181,14 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature((FieldDoc) fields.get(currentFieldIndex));
         }
 
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated((FieldDoc) fields.get(currentFieldIndex));
         }
 
@@ -213,7 +196,7 @@
          * Build the comments for the field.  Do nothing if
          * {@link Configuration#nocomment} is set to true.
          */
-        public void buildFieldComments() {
+        public void buildFieldComments(XMLNode node) {
                 if (!configuration.nocomment) {
                         writer.writeComments((FieldDoc) fields.get(currentFieldIndex));
                 }
@@ -222,21 +205,21 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags((FieldDoc) fields.get(currentFieldIndex));
         }
 
         /**
          * Build the footer for the individual field.
          */
-        public void buildFieldFooter() {
+        public void buildFieldFooter(XMLNode node) {
                 writer.writeFieldFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
index 321c42b..3b413e7b 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/LayoutParser.java
@@ -45,8 +45,8 @@
     /**
      * The map of XML elements that have been parsed.
      */
-    private Map<String,List<Object>> xmlElementsMap;
-
+    private Map<String,XMLNode> xmlElementsMap;
+    private XMLNode currentNode;
     private Configuration configuration;
     private static LayoutParser instance;
     private String currentRoot;
@@ -56,7 +56,7 @@
      * This class is a singleton.
      */
     private LayoutParser(Configuration configuration) {
-        xmlElementsMap = new HashMap<String,List<Object>>();
+        xmlElementsMap = new HashMap<String,XMLNode>();
         this.configuration = configuration;
     }
 
@@ -78,20 +78,18 @@
      *
      * @return List the list of XML elements parsed.
      */
-    public List<?> parseXML(String root) {
+    public XMLNode parseXML(String root) {
         if (xmlElementsMap.containsKey(root)) {
             return xmlElementsMap.get(root);
         }
         try {
-            List<Object> xmlElements = new ArrayList<Object>();
-            xmlElementsMap.put(root, xmlElements);
             currentRoot = root;
             isParsing = false;
             SAXParserFactory factory = SAXParserFactory.newInstance();
             SAXParser saxParser = factory.newSAXParser();
             InputStream in = configuration.getBuilderXML();
             saxParser.parse(in, this);
-            return xmlElements;
+            return xmlElementsMap.get(root);
         } catch (Throwable t) {
             t.printStackTrace();
             throw new DocletAbortException();
@@ -101,39 +99,30 @@
     /**
      * {@inheritDoc}
      */
+    @Override
     public void startElement(String namespaceURI, String sName, String qName,
         Attributes attrs)
     throws SAXException {
         if (isParsing || qName.equals(currentRoot)) {
             isParsing = true;
-            List<Object> xmlElements = xmlElementsMap.get(currentRoot);
-            xmlElements.add(qName);
+            currentNode = new XMLNode(currentNode, qName);
+            for (int i = 0; i < attrs.getLength(); i++)
+                currentNode.attrs.put(attrs.getLocalName(i), attrs.getValue(i));
+            if (qName.equals(currentRoot))
+                xmlElementsMap.put(qName, currentNode);
         }
     }
 
     /**
      * {@inheritDoc}
      */
+    @Override
     public void endElement(String namespaceURI, String sName, String qName)
     throws SAXException {
         if (! isParsing) {
-            isParsing = false;
             return;
         }
-        List<Object> xmlElements = xmlElementsMap.get(currentRoot);
-        if (xmlElements.get(xmlElements.size()-1).equals(qName)) {
-            return;
-        } else {
-            List<Object> subElements = new ArrayList<Object>();
-            int targetIndex = xmlElements.indexOf(qName);
-            int size = xmlElements.size();
-            for (int i = targetIndex; i < size; i++) {
-                subElements.add(xmlElements.get(targetIndex));
-                xmlElements.remove(targetIndex);
-            }
-            //Save the sub elements as a list.
-            xmlElements.add(subElements);
-        }
+        currentNode = currentNode.parent;
         isParsing = ! qName.equals(currentRoot);
     }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
index 0b4e6e7..404b2e6 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java
@@ -29,7 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the member summary.
@@ -175,22 +174,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Return true it there are any members to summarize.
          *
          * @return true if there are any members to summarize.
@@ -211,7 +194,7 @@
         /**
          * Build the summary for the enum constants.
          */
-        public void buildEnumConstantsSummary() {
+        public void buildEnumConstantsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.ENUM_CONSTANTS],
                         visibleMemberMaps[VisibleMemberMap.ENUM_CONSTANTS]);
@@ -220,7 +203,7 @@
     /**
      * Build the summary for the optional members.
      */
-    public void buildAnnotationTypeOptionalMemberSummary() {
+    public void buildAnnotationTypeOptionalMemberSummary(XMLNode node) {
         buildSummary(
             memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL],
                 visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL]);
@@ -229,7 +212,7 @@
     /**
      * Build the summary for the optional members.
      */
-    public void buildAnnotationTypeRequiredMemberSummary() {
+    public void buildAnnotationTypeRequiredMemberSummary(XMLNode node) {
         buildSummary(
             memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED],
                 visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED]);
@@ -238,7 +221,7 @@
         /**
          * Build the summary for the fields.
          */
-        public void buildFieldsSummary() {
+        public void buildFieldsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.FIELDS],
                         visibleMemberMaps[VisibleMemberMap.FIELDS]);
@@ -247,7 +230,7 @@
         /**
          * Build the inherited summary for the fields.
          */
-        public void buildFieldsInheritedSummary() {
+        public void buildFieldsInheritedSummary(XMLNode node) {
                 buildInheritedSummary(
                         memberSummaryWriters[VisibleMemberMap.FIELDS],
                         visibleMemberMaps[VisibleMemberMap.FIELDS]);
@@ -256,7 +239,7 @@
         /**
          * Build the summary for the nested classes.
          */
-        public void buildNestedClassesSummary() {
+        public void buildNestedClassesSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.INNERCLASSES],
                         visibleMemberMaps[VisibleMemberMap.INNERCLASSES]);
@@ -265,7 +248,7 @@
         /**
          * Build the inherited summary for the nested classes.
          */
-        public void buildNestedClassesInheritedSummary() {
+        public void buildNestedClassesInheritedSummary(XMLNode node) {
                 buildInheritedSummary(
                         memberSummaryWriters[VisibleMemberMap.INNERCLASSES],
                         visibleMemberMaps[VisibleMemberMap.INNERCLASSES]);
@@ -274,7 +257,7 @@
         /**
          * Build the method summary.
          */
-        public void buildMethodsSummary() {
+        public void buildMethodsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.METHODS],
                         visibleMemberMaps[VisibleMemberMap.METHODS]);
@@ -283,7 +266,7 @@
         /**
          * Build the inherited method summary.
          */
-        public void buildMethodsInheritedSummary() {
+        public void buildMethodsInheritedSummary(XMLNode node) {
                 buildInheritedSummary(
                         memberSummaryWriters[VisibleMemberMap.METHODS],
                         visibleMemberMaps[VisibleMemberMap.METHODS]);
@@ -292,7 +275,7 @@
         /**
          * Build the constructor summary.
          */
-        public void buildConstructorsSummary() {
+        public void buildConstructorsSummary(XMLNode node) {
                 buildSummary(
                         memberSummaryWriters[VisibleMemberMap.CONSTRUCTORS],
                         visibleMemberMaps[VisibleMemberMap.CONSTRUCTORS]);
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
index 18fa6e8..04816ac 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MethodBuilder.java
@@ -29,7 +29,7 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.util.*;
-import java.lang.reflect.*;
+
 /**
  * Builds documentation for a method.
  *
@@ -112,22 +112,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Returns a list of methods that will be documented for the given class.
          * This information can be used for doclet specific documentation
          * generation.
@@ -158,21 +142,21 @@
         /**
          * Build the method documentation.
          */
-        public void buildMethodDoc(List<?> elements) {
+        public void buildMethodDoc(XMLNode node) {
                 if (writer == null) {
                         return;
                 }
                 for (currentMethodIndex = 0;
                         currentMethodIndex < methods.size();
                         currentMethodIndex++) {
-                        build(elements);
+                        buildChildren(node);
                 }
         }
 
         /**
          * Build the overall header.
          */
-        public void buildHeader() {
+        public void buildHeader(XMLNode node) {
                 writer.writeHeader(
                         classDoc,
                         configuration.getText("doclet.Method_Detail"));
@@ -181,7 +165,7 @@
         /**
          * Build the header for the individual method.
          */
-        public void buildMethodHeader() {
+        public void buildMethodHeader(XMLNode node) {
                 writer.writeMethodHeader(
                         (MethodDoc) methods.get(currentMethodIndex),
                         currentMethodIndex == 0);
@@ -190,14 +174,14 @@
         /**
          * Build the signature.
          */
-        public void buildSignature() {
+        public void buildSignature(XMLNode node) {
                 writer.writeSignature((MethodDoc) methods.get(currentMethodIndex));
         }
 
         /**
          * Build the deprecation information.
          */
-        public void buildDeprecationInfo() {
+        public void buildDeprecationInfo(XMLNode node) {
                 writer.writeDeprecated((MethodDoc) methods.get(currentMethodIndex));
         }
 
@@ -205,7 +189,7 @@
          * Build the comments for the method.  Do nothing if
          * {@link Configuration#nocomment} is set to true.  If this method
          */
-        public void buildMethodComments() {
+        public void buildMethodComments(XMLNode node) {
                 if (!configuration.nocomment) {
             MethodDoc method = (MethodDoc) methods.get(currentMethodIndex);
 
@@ -228,21 +212,21 @@
         /**
          * Build the tag information.
          */
-        public void buildTagInfo() {
+        public void buildTagInfo(XMLNode node) {
                 writer.writeTags((MethodDoc) methods.get(currentMethodIndex));
         }
 
         /**
          * Build the footer of the method.
          */
-        public void buildMethodFooter() {
+        public void buildMethodFooter(XMLNode node) {
                 writer.writeMethodFooter();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildFooter() {
+        public void buildFooter(XMLNode node) {
                 writer.writeFooter(classDoc);
         }
 
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
index ac3b544..acd382d 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/PackageSummaryBuilder.java
@@ -29,8 +29,6 @@
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.javadoc.*;
 import java.io.*;
-import java.util.*;
-import java.lang.reflect.*;
 
 /**
  * Builds the summary for a given package.
@@ -85,22 +83,6 @@
         }
 
         /**
-         * {@inheritDoc}
-         */
-        public void invokeMethod(
-                String methodName,
-                Class<?>[] paramClasses,
-                Object[] params)
-                throws Exception {
-                if (DEBUG) {
-                        configuration.root.printError(
-                                "DEBUG: " + this.getClass().getName() + "." + methodName);
-                }
-                Method method = this.getClass().getMethod(methodName, paramClasses);
-                method.invoke(this, params);
-        }
-
-        /**
          * Build the package summary.
          */
         public void build() throws IOException {
@@ -121,8 +103,8 @@
         /**
          * Build the package documentation.
          */
-        public void buildPackageDoc(List<?> elements) throws Exception {
-                build(elements);
+        public void buildPackageDoc(XMLNode node) throws Exception {
+                buildChildren(node);
                 packageWriter.close();
                 Util.copyDocFiles(
                         configuration,
@@ -136,14 +118,14 @@
         /**
          * Build the header of the summary.
          */
-        public void buildPackageHeader() {
+        public void buildPackageHeader(XMLNode node) {
                 packageWriter.writePackageHeader(Util.getPackageName(packageDoc));
         }
 
         /**
          * Build the description of the summary.
          */
-        public void buildPackageDescription() {
+        public void buildPackageDescription(XMLNode node) {
                 if (configuration.nocomment) {
                         return;
                 }
@@ -153,7 +135,7 @@
         /**
          * Build the tags of the summary.
          */
-        public void buildPackageTags() {
+        public void buildPackageTags(XMLNode node) {
                 if (configuration.nocomment) {
                         return;
                 }
@@ -163,28 +145,28 @@
         /**
          * Build the package summary.
          */
-        public void buildSummary(List<?> elements) {
-                build(elements);
+        public void buildSummary(XMLNode node) {
+                buildChildren(node);
         }
 
         /**
          * Build the overall header.
          */
-        public void buildSummaryHeader() {
+        public void buildSummaryHeader(XMLNode node) {
                 packageWriter.writeSummaryHeader();
         }
 
         /**
          * Build the overall footer.
          */
-        public void buildSummaryFooter() {
+        public void buildSummaryFooter(XMLNode node) {
                 packageWriter.writeSummaryFooter();
         }
 
         /**
          * Build the summary for the classes in this package.
          */
-        public void buildClassSummary() {
+        public void buildClassSummary(XMLNode node) {
             String classTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Class_Summary"),
@@ -209,7 +191,7 @@
         /**
          * Build the summary for the interfaces in this package.
          */
-        public void buildInterfaceSummary() {
+        public void buildInterfaceSummary(XMLNode node) {
             String interfaceTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Interface_Summary"),
@@ -234,7 +216,7 @@
         /**
          * Build the summary for the enums in this package.
          */
-        public void buildAnnotationTypeSummary() {
+        public void buildAnnotationTypeSummary(XMLNode node) {
             String annotationtypeTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Annotation_Types_Summary"),
@@ -259,7 +241,7 @@
         /**
          * Build the summary for the enums in this package.
          */
-        public void buildEnumSummary() {
+        public void buildEnumSummary(XMLNode node) {
             String enumTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Enum_Summary"),
@@ -284,7 +266,7 @@
         /**
          * Build the summary for the exceptions in this package.
          */
-        public void buildExceptionSummary() {
+        public void buildExceptionSummary(XMLNode node) {
             String exceptionTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Exception_Summary"),
@@ -309,7 +291,7 @@
         /**
          * Build the summary for the errors in this package.
          */
-        public void buildErrorSummary() {
+        public void buildErrorSummary(XMLNode node) {
             String errorTableSummary =
                     configuration.getText("doclet.Member_Table_Summary",
                     configuration.getText("doclet.Error_Summary"),
@@ -334,7 +316,7 @@
         /**
          * Build the footer of the summary.
          */
-        public void buildPackageFooter() {
+        public void buildPackageFooter(XMLNode node) {
                 packageWriter.writePackageFooter();
         }
 }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
index 505b4d4..5cfc42a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java
@@ -26,7 +26,6 @@
 package com.sun.tools.doclets.internal.toolkit.builders;
 
 import java.io.*;
-import java.lang.reflect.*;
 import java.util.*;
 
 import com.sun.javadoc.*;
@@ -132,47 +131,33 @@
     /**
      * Build the serialized form.
      */
-    public void buildSerializedForm(List<?> elements) throws Exception {
-        build(elements);
+    public void buildSerializedForm(XMLNode node) throws Exception {
+        buildChildren(node);
         writer.close();
     }
 
     /**
-     * {@inheritDoc}
-     */
-    public void invokeMethod(String methodName, Class<?>[] paramClasses,
-            Object[] params)
-    throws Exception {
-        if (DEBUG) {
-            configuration.root.printError("DEBUG: " + this.getClass().getName()
-                + "." + methodName);
-        }
-        Method method = this.getClass().getMethod(methodName, paramClasses);
-        method.invoke(this, params);
-    }
-
-    /**
      * Build the header.
      */
-    public void buildHeader() {
+    public void buildHeader(XMLNode node) {
         writer.writeHeader(configuration.getText("doclet.Serialized_Form"));
     }
 
     /**
      * Build the contents.
      */
-    public void buildSerializedFormSummaries(List<?> elements) {
+    public void buildSerializedFormSummaries(XMLNode node) {
         PackageDoc[] packages = configuration.packages;
         for (int i = 0; i < packages.length; i++) {
             currentPackage = packages[i];
-            build(elements);
+            buildChildren(node);
         }
     }
 
     /**
      * Build the package serialized for for the current package being processed.
      */
-    public void buildPackageSerializedForm(List<?> elements) {
+    public void buildPackageSerializedForm(XMLNode node) {
         String foo = currentPackage.name();
         ClassDoc[] classes = currentPackage.allClasses(false);
         if (classes == null || classes.length == 0) {
@@ -184,14 +169,14 @@
         if (!serialClassFoundToDocument(classes)) {
             return;
         }
-        build(elements);
+        buildChildren(node);
     }
 
-    public void buildPackageHeader() {
+    public void buildPackageHeader(XMLNode node) {
         writer.writePackageHeader(Util.getPackageName(currentPackage));
     }
 
-    public void buildClassSerializedForm(List<?> elements) {
+    public void buildClassSerializedForm(XMLNode node) {
         ClassDoc[] classes = currentPackage.allClasses(false);
         Arrays.sort(classes);
         for (int j = 0; j < classes.length; j++) {
@@ -202,19 +187,19 @@
                 if(!serialClassInclude(currentClass)) {
                     continue;
                 }
-                build(elements);
+                buildChildren(node);
             }
         }
     }
 
-    public void buildClassHeader() {
+    public void buildClassHeader(XMLNode node) {
         writer.writeClassHeader(currentClass);
     }
 
     /**
      * Build the serial UID information for the given class.
      */
-    public void buildSerialUIDInfo() {
+    public void buildSerialUIDInfo(XMLNode node) {
         FieldDoc[] fields = currentClass.fields(false);
         for (int i = 0; i < fields.length; i++) {
             if (fields[i].name().equals("serialVersionUID") &&
@@ -229,7 +214,7 @@
     /**
      * Build the footer.
      */
-    public void buildFooter() {
+    public void buildFooter(XMLNode node) {
         writer.writeFooter();
     }
 
@@ -316,7 +301,7 @@
     /**
      * Build the method header.
      */
-    public void buildMethodHeader() {
+    public void buildMethodHeader(XMLNode node) {
         if (currentClass.serializationMethods().length > 0) {
             methodWriter.writeHeader(
                 configuration.getText("doclet.Serialized_Form_methods"));
@@ -333,28 +318,28 @@
     /**
      * Build the method sub header.
      */
-    public void buildMethodSubHeader()  {
+    public void buildMethodSubHeader(XMLNode node)  {
         methodWriter.writeMemberHeader((MethodDoc) currentMember);
     }
 
     /**
      * Build the deprecated method description.
      */
-    public void buildDeprecatedMethodInfo() {
+    public void buildDeprecatedMethodInfo(XMLNode node) {
         methodWriter.writeDeprecatedMemberInfo((MethodDoc) currentMember);
     }
 
     /**
      * Build method tags.
      */
-    public void buildMethodDescription() {
+    public void buildMethodDescription(XMLNode node) {
         methodWriter.writeMemberDescription((MethodDoc) currentMember);
     }
 
     /**
      * Build the method tags.
      */
-    public void buildMethodTags() {
+    public void buildMethodTags(XMLNode node) {
         methodWriter.writeMemberTags((MethodDoc) currentMember);
         MethodDoc method = (MethodDoc)currentMember;
         if (method.name().compareTo("writeExternal") == 0
@@ -370,24 +355,24 @@
     /**
      * build the information for the method.
      */
-    public void buildMethodInfo(List<?> elements)  {
+    public void buildMethodInfo(XMLNode node)  {
         if(configuration.nocomment){
             return;
         }
-        build(elements);
+        buildChildren(node);
     }
 
     /**
      * Build the method footer.
      */
-    public void buildMethodFooter() {
+    public void buildMethodFooter(XMLNode node) {
         methodWriter.writeMemberFooter();
     }
 
     /**
      * Build the field header.
      */
-    public void buildFieldHeader() {
+    public void buildFieldHeader(XMLNode node) {
         if (currentClass.serializableFields().length > 0) {
             buildFieldSerializationOverview(currentClass);
             fieldWriter.writeHeader(configuration.getText(
@@ -426,7 +411,7 @@
     /**
      * Build the field sub header.
      */
-    public void buildFieldSubHeader() {
+    public void buildFieldSubHeader(XMLNode node) {
         if (! currentClass.definesSerializableFields() ){
             FieldDoc field = (FieldDoc) currentMember;
             fieldWriter.writeMemberHeader(field.type().asClassDoc(),
@@ -437,7 +422,7 @@
     /**
      * Build the field deprecation information.
      */
-    public void buildFieldDeprecationInfo() {
+    public void buildFieldDeprecationInfo(XMLNode node) {
         if (!currentClass.definesSerializableFields()) {
             FieldDoc field = (FieldDoc)currentMember;
             fieldWriter.writeMemberDeprecatedInfo(field);
@@ -447,7 +432,7 @@
     /**
      * Build the field information.
      */
-    public void buildFieldInfo() {
+    public void buildFieldInfo(XMLNode node) {
         if(configuration.nocomment){
             return;
         }
@@ -483,7 +468,7 @@
     /**
      * Build the field sub footer.
      */
-    public void buildFieldSubFooter() {
+    public void buildFieldSubFooter(XMLNode node) {
         if (! currentClass.definesSerializableFields()) {
             fieldWriter.writeMemberFooter();
         }
@@ -493,12 +478,12 @@
      * Build the summaries for the methods that belong to the given
      * class.
      */
-    public void buildSerializableMethods(List<?> elements) {
+    public void buildSerializableMethods(XMLNode node) {
         MemberDoc[] members = currentClass.serializationMethods();
         if (members.length > 0) {
             for (int i = 0; i < members.length; i++) {
                 currentMember = members[i];
-                build(elements);
+                buildChildren(node);
             }
         }
     }
@@ -507,12 +492,12 @@
      * Build the summaries for the fields that belong to the given
      * class.
      */
-    public void buildSerializableFields(List<?> elements) {
+    public void buildSerializableFields(XMLNode node) {
         MemberDoc[] members = currentClass.serializableFields();
         if (members.length > 0) {
             for (int i = 0; i < members.length; i++) {
                 currentMember = members[i];
-                build(elements);
+                buildChildren(node);
             }
         }
     }
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java
new file mode 100644
index 0000000..4b414da
--- /dev/null
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/XMLNode.java
@@ -0,0 +1,69 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 com.sun.tools.doclets.internal.toolkit.builders;
+
+import java.util.ArrayList;
+import java.util.HashMap;
+import java.util.List;
+import java.util.Map;
+
+/**
+ * Simple class to represent the attribute and elements of an XML node.
+ */
+public class XMLNode {
+    XMLNode(XMLNode parent, String qname) {
+        this.parent = parent;
+        name = qname;
+        attrs = new HashMap<String,String>();
+        children = new ArrayList<XMLNode>();
+
+        if (parent != null)
+            parent.children.add(this);
+    }
+
+    @Override
+    public String toString() {
+        StringBuilder sb = new StringBuilder();
+        sb.append("<");
+        sb.append(name);
+        for (Map.Entry<String,String> e: attrs.entrySet())
+            sb.append(" " + e.getKey() + "=\"" + e.getValue() + "\"");
+        if (children.size() == 0)
+            sb.append("/>");
+        else {
+            sb.append(">");
+            for (XMLNode c: children)
+                sb.append(c.toString());
+            sb.append("</" + name + ">");
+        }
+        return sb.toString();
+    }
+
+    final XMLNode parent;
+    final String name;
+    final Map<String,String> attrs;
+    final List<XMLNode> children;
+}
diff --git a/langtools/src/share/classes/com/sun/tools/javac/Launcher.java b/langtools/src/share/classes/com/sun/tools/javac/Launcher.java
index 66549c8..f36d577 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/Launcher.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/Launcher.java
@@ -41,7 +41,7 @@
  * of a <em>project</em>).  Simply ensure that this class is added to
  * the project and make it the main class of the project.</p>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/Server.java b/langtools/src/share/classes/com/sun/tools/javac/Server.java
index 016823a..fcb2127 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/Server.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/Server.java
@@ -36,7 +36,7 @@
  * Java Compiler Server.  Can be used to speed up a set of (small)
  * compilation tasks by caching jar files between compilations.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java
index 51512c8..18aafee 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/DiagnosticFormatter.java
@@ -33,7 +33,7 @@
  * Provides simple functionalities for javac diagnostic formatting.
  * @param <D> type of diagnostic handled by this formatter
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java b/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java
index 635c1f5..bb2bd92 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/Formattable.java
@@ -31,7 +31,7 @@
  * This interface must be implemented by any javac class that has non-trivial
  * formatting needs (e.g. where toString() does not apply because of localization).
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacScope.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacScope.java
index 0869daa..5aa4c0c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacScope.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacScope.java
@@ -38,7 +38,7 @@
 /**
  * Provides an implementation of Scope.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
index dbc97e7..1e98ec9 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java
@@ -54,9 +54,9 @@
 import com.sun.tools.javac.main.JavaCompiler;
 
 /**
- * Provides access to functionality specific to the Sun Java Compiler, javac.
+ * Provides access to functionality specific to the JDK Java Compiler, javac.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
@@ -502,7 +502,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public Context getContext() {
@@ -510,7 +510,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public void updateContext(Context newContext) {
@@ -518,7 +518,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public Type parseType(String expr, TypeElement scope) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
index debb0e4..5c76c39 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTool.java
@@ -57,7 +57,7 @@
 /**
  * TODO: describe com.sun.tools.javac.api.Tool
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java
index 24d0fe8..76f9d3c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/JavacTrees.java
@@ -71,7 +71,7 @@
 /**
  * Provides an implementation of Trees.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java b/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java
index 532b4c3..c1caa09 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/Messages.java
@@ -32,7 +32,7 @@
  * This interface defines the minimum requirements in order to provide support
  * for localized formatted strings.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java
index c09c55f..41d9874 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/api/WrappingJavaFileManager.java
@@ -42,7 +42,7 @@
  * <p>This class might be moved to {@link javax.tools} in a future
  * release.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java b/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java
index 6680484..381418e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java
@@ -38,8 +38,8 @@
 
 /** An annotation value.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java b/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java
index 3cef25a..d2c4e67 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/BoundKind.java
@@ -27,7 +27,7 @@
 
 /**
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java
index e4f6ed8..bb4956c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Flags.java
@@ -33,8 +33,8 @@
 
 /** Access flags and other modifiers for Java classes and members.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -226,7 +226,7 @@
     public static final long HYPOTHETICAL   = 1L<<37;
 
     /**
-     * Flag that marks a Sun proprietary class.
+     * Flag that marks an internal proprietary class.
      */
     public static final long PROPRIETARY = 1L<<38;
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
index a462d2f..282f315 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Kinds.java
@@ -38,8 +38,8 @@
  *  different subclasses of Symbol. Symbol kinds are organized so they can be
  *  or'ed to sets.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java b/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java
index 93cfc1c..c02c5bb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Lint.java
@@ -39,8 +39,8 @@
 /**
  * A class for handling -Xlint suboptions and @SuppresssWarnings.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -196,14 +196,19 @@
         RAW("rawtypes"),
 
         /**
-         * Warn about Sun proprietary API that may be removed in a future release.
+         * Warn about proprietary API that may be removed in a future release.
          */
         SUNAPI("sunapi", true),
 
         /**
          * Warn about issues relating to use of statics
          */
-        STATIC("static");
+        STATIC("static"),
+
+        /**
+         * Warn about potentially unsafe vararg methods
+         */
+        VARARGS("varargs");
 
         LintCategory(String option) {
             this(option, false);
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
index d330bcd..b2443a4 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Printer.java
@@ -41,7 +41,7 @@
  * A combined type/symbol visitor for generating non-trivial localized string
  * representation of types and symbols.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java b/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java
index 37bea30..926bcc2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Scope.java
@@ -34,8 +34,8 @@
  *  as hash tables. Scopes can be nested; the next field of a scope points
  *  to its next outer scope. Nested scopes can share their hash tables.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
index 46432fb..bce1513 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Source.java
@@ -33,8 +33,8 @@
 
 /** The source language version accepted.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
index 6e6b22d..2c75a0c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symbol.java
@@ -49,8 +49,8 @@
  *  types, packages. Each subclass is represented as a static inner class
  *  inside Symbol.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
index db5037a..947691e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Symtab.java
@@ -42,8 +42,8 @@
  *  fields. This makes it possible to work in multiple concurrent
  *  projects, which might use different class files for library classes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -452,7 +452,7 @@
         synthesizeBoxTypeIfMissing(floatType);
         synthesizeBoxTypeIfMissing(voidType);
 
-        // Enter a synthetic class that is used to mark Sun
+        // Enter a synthetic class that is used to mark internal
         // proprietary classes in ct.sym.  This class does not have a
         // class file.
         ClassType proprietaryType = (ClassType)enterClass("sun.Proprietary+Annotation");
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java b/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java
index f16357c..6c24287 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TargetType.java
@@ -39,8 +39,8 @@
  * annotation targets a type argument in a local variable, method return type,
  * or a typecast).
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
index a33d4ed..b3fae7d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Type.java
@@ -56,8 +56,8 @@
  *  the error type (tag: ERROR, class: ErrorType).
  *  </pre>
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  *
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
index b4f3630..d3be7a5 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java
@@ -29,8 +29,8 @@
 
 /** A type annotation position.
 *
-*  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
-*  you write code that depends on this, you do so at your own risk.
+*  <p><b>This is NOT part of any supported API.
+*  If you write code that depends on this, you do so at your own risk.
 *  This code and its internal interfaces are subject to change or
 *  deletion without notice.</b>
 */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
index d6542f3..463def2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeTags.java
@@ -29,8 +29,8 @@
 /** An interface for type tag values, which distinguish between different
  *  sorts of types.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
index 21953f7..6354e5b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Types.java
@@ -58,7 +58,7 @@
  * <dd>A second list of types should be named ss.</dd>
  * </dl>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
index e0d0d77..4a5dccd 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Annotate.java
@@ -35,8 +35,8 @@
  *  which is processed at the top level of any set of recursive calls
  *  requesting it be processed.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
index c967694..ca63b46 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java
@@ -59,8 +59,8 @@
  *  @see ConstFold
  *  @see Infer
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -161,7 +161,7 @@
     boolean useBeforeDeclarationWarning;
 
     /**
-     * Switch: allow lint infrastructure to control Sun proprietary
+     * Switch: allow lint infrastructure to control proprietary
      * API warnings.
      */
     boolean enableSunApiLintControl;
@@ -652,6 +652,8 @@
                 attribStat(l.head, localEnv);
             }
 
+            chk.checkVarargMethodDecl(tree);
+
             // Check that type parameters are well-formed.
             chk.validate(tree.typarams, localEnv);
             if ((owner.flags() & ANNOTATION) != 0 &&
@@ -2635,10 +2637,11 @@
             }
             if (useVarargs) {
                 JCTree tree = env.tree;
+                Type argtype = owntype.getParameterTypes().last();
                 if (owntype.getReturnType().tag != FORALL || warned) {
-                    chk.checkVararg(env.tree.pos(), owntype.getParameterTypes());
+                    chk.checkVararg(env.tree.pos(), owntype.getParameterTypes(), sym, env);
                 }
-                Type elemtype = types.elemtype(owntype.getParameterTypes().last());
+                Type elemtype = types.elemtype(argtype);
                 switch (tree.getTag()) {
                 case JCTree.APPLY:
                     ((JCMethodInvocation) tree).varargsElement = elemtype;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java
index 93c565f..1589ccb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContext.java
@@ -31,8 +31,8 @@
 /** Contains information specific to the attribute and enter
  *  passes, to be used in place of the generic field in environments.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContextEnv.java b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContextEnv.java
index b70f2ee..3c55067 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContextEnv.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/AttrContextEnv.java
@@ -30,8 +30,8 @@
 
 /** {@code Env<A>} specialized as {@code Env<AttrContext>}
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
index 2a017f7..944ddc8 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java
@@ -47,8 +47,8 @@
 
 /** Type checking helper class for the attribution phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -64,6 +64,7 @@
     private final JCDiagnostic.Factory diags;
     private final boolean skipAnnotations;
     private boolean warnOnSyntheticConflicts;
+    private boolean suppressAbortOnBadClassFile;
     private final TreeInfo treeinfo;
 
     // The set of lint options currently in effect. It is initialized
@@ -98,12 +99,14 @@
         complexInference = options.get("-complexinference") != null;
         skipAnnotations = options.get("skipAnnotations") != null;
         warnOnSyntheticConflicts = options.get("warnOnSyntheticConflicts") != null;
+        suppressAbortOnBadClassFile = options.get("suppressAbortOnBadClassFile") != null;
 
         Target target = Target.instance(context);
         syntheticNameChar = target.syntheticNameChar();
 
         boolean verboseDeprecated = lint.isEnabled(LintCategory.DEPRECATION);
         boolean verboseUnchecked = lint.isEnabled(LintCategory.UNCHECKED);
+        boolean verboseVarargs = lint.isEnabled(LintCategory.VARARGS);
         boolean verboseSunApi = lint.isEnabled(LintCategory.SUNAPI);
         boolean enforceMandatoryWarnings = source.enforceMandatoryWarnings();
 
@@ -111,6 +114,8 @@
                 enforceMandatoryWarnings, "deprecated");
         uncheckedHandler = new MandatoryWarningHandler(log, verboseUnchecked,
                 enforceMandatoryWarnings, "unchecked");
+        unsafeVarargsHandler = new MandatoryWarningHandler(log, verboseVarargs,
+                enforceMandatoryWarnings, "varargs");
         sunApiHandler = new MandatoryWarningHandler(log, verboseSunApi,
                 enforceMandatoryWarnings, "sunapi");
     }
@@ -148,7 +153,11 @@
      */
     private MandatoryWarningHandler uncheckedHandler;
 
-    /** A handler for messages about using Sun proprietary API.
+    /** A handler for messages about unchecked or unsafe vararg method decl.
+     */
+    private MandatoryWarningHandler unsafeVarargsHandler;
+
+    /** A handler for messages about using proprietary API.
      */
     private MandatoryWarningHandler sunApiHandler;
 
@@ -180,7 +189,16 @@
             uncheckedHandler.report(pos, msg, args);
     }
 
-    /** Warn about using Sun proprietary API.
+    /** Warn about unsafe vararg method decl.
+     *  @param pos        Position to be used for error reporting.
+     *  @param sym        The deprecated symbol.
+     */
+    void warnUnsafeVararg(DiagnosticPosition pos, Type elemType) {
+        if (!lint.isSuppressed(LintCategory.VARARGS))
+            unsafeVarargsHandler.report(pos, "varargs.non.reifiable.type", elemType);
+    }
+
+    /** Warn about using proprietary API.
      *  @param pos        Position to be used for error reporting.
      *  @param msg        A string describing the problem.
      */
@@ -200,6 +218,7 @@
     public void reportDeferredDiagnostics() {
         deprecationHandler.reportDeferredDiagnostic();
         uncheckedHandler.reportDeferredDiagnostic();
+        unsafeVarargsHandler.reportDeferredDiagnostic();
         sunApiHandler.reportDeferredDiagnostic();
     }
 
@@ -210,7 +229,8 @@
      */
     public Type completionError(DiagnosticPosition pos, CompletionFailure ex) {
         log.error(pos, "cant.access", ex.sym, ex.getDetailValue());
-        if (ex instanceof ClassReader.BadClassFile) throw new Abort();
+        if (ex instanceof ClassReader.BadClassFile
+                && !suppressAbortOnBadClassFile) throw new Abort();
         else return syms.errType;
     }
 
@@ -677,17 +697,33 @@
         }
     }
 
+    void checkVarargMethodDecl(JCMethodDecl tree) {
+        MethodSymbol m = tree.sym;
+        //check the element type of the vararg
+        if (m.isVarArgs()) {
+            Type varargElemType = types.elemtype(tree.params.last().type);
+            if (!types.isReifiable(varargElemType)) {
+                warnUnsafeVararg(tree.params.head.pos(), varargElemType);
+            }
+        }
+    }
+
     /**
      * Check that vararg method call is sound
      * @param pos Position to be used for error reporting.
      * @param argtypes Actual arguments supplied to vararg method.
      */
-    void checkVararg(DiagnosticPosition pos, List<Type> argtypes) {
+    void checkVararg(DiagnosticPosition pos, List<Type> argtypes, Symbol msym, Env<AttrContext> env) {
+        Env<AttrContext> calleeLintEnv = env;
+        while (calleeLintEnv.info.lint == null)
+            calleeLintEnv = calleeLintEnv.next;
+        Lint calleeLint = calleeLintEnv.info.lint.augment(msym.attributes_field, msym.flags());
         Type argtype = argtypes.last();
-        if (!types.isReifiable(argtype))
+        if (!types.isReifiable(argtype) && !calleeLint.isSuppressed(Lint.LintCategory.VARARGS)) {
             warnUnchecked(pos,
                               "unchecked.generic.array.creation",
                               argtype);
+        }
     }
 
     /** Check that given modifiers are legal for given symbol and
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/ConstFold.java b/langtools/src/share/classes/com/sun/tools/javac/comp/ConstFold.java
index 2df7e3e..cd017d4 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/ConstFold.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/ConstFold.java
@@ -37,8 +37,8 @@
 /** Helper class for constant folding, used by the attribution phase.
  *  This class is marked strictfp as mandated by JLS 15.4.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Enter.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Enter.java
index e7c436f..94d62b3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Enter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Enter.java
@@ -82,8 +82,8 @@
  *                                              (only for toplevel classes)
  *  </pre>
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java
index 6cf1299..c46cafe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Env.java
@@ -36,8 +36,8 @@
  *  a generic component, represented as a type parameter, to carry further
  *  information specific to individual passes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
index b92c5f2..afec481 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
@@ -170,8 +170,8 @@
  *  allow unqualified forms only, parentheses optional, and phase out
  *  support for assigning to a final field via this.x.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
index 3e2b324..6951385 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Infer.java
@@ -37,8 +37,8 @@
 
 /** Helper class for type parameter inference, used by the attribution phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -290,6 +290,7 @@
     public Type instantiateMethod(final Env<AttrContext> env,
                                   List<Type> tvars,
                                   MethodType mt,
+                                  final Symbol msym,
                                   final List<Type> argtypes,
                                   final boolean allowBoxing,
                                   final boolean useVarargs,
@@ -418,7 +419,7 @@
                     checkWithinBounds(all_tvars,
                            types.subst(inferredTypes, tvars, inferred), warn);
                     if (useVarargs) {
-                        chk.checkVararg(env.tree.pos(), formals);
+                        chk.checkVararg(env.tree.pos(), formals, msym, env);
                     }
                     return super.inst(inferred, types);
             }};
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
index 98720a3..5e04da2 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Lower.java
@@ -48,8 +48,8 @@
 /** This pass translates away some syntactic sugar: inner classes,
  *  class literals, assertions, foreach loops, etc.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
index 615602e..1630b5b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java
@@ -48,8 +48,8 @@
  *  by entering their members into the class scope using
  *  MemberEnter.complete().  See Enter for an overview.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java
index 0021e0a..3c2f1d3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Resolve.java
@@ -47,8 +47,8 @@
 
 /** Helper class for name resolution, used mostly by the attribution phase.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -349,6 +349,7 @@
             infer.instantiateMethod(env,
                                     tvars,
                                     (MethodType)mt,
+                                    m,
                                     argtypes,
                                     allowBoxing,
                                     useVarargs,
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java b/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java
index b577ebc..ffea219 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Todo.java
@@ -36,8 +36,8 @@
 
 /** A queue of all as yet unattributed classes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
index 40f92e2..cab86ec 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/TransTypes.java
@@ -43,8 +43,8 @@
 
 /** This pass translates Generic Java to conventional Java.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java b/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java
index cd56c63..556f14c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/BaseFileObject.java
@@ -42,7 +42,7 @@
 import com.sun.tools.javac.util.BaseFileManager;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java b/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java
index 3cfa066..473664d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/CacheFSInfo.java
@@ -36,7 +36,7 @@
 /**
  * Caching implementation of FSInfo.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java b/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java
index cfe0dae..c8726a5 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/FSInfo.java
@@ -17,7 +17,7 @@
  * Get meta-info about files. Default direct (non-caching) implementation.
  * @see CacheFSInfo
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
index e44a8c0..77ea25e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/JavacFileManager.java
@@ -68,7 +68,7 @@
  * This class provides access to the source, class and other files
  * used by the compiler and related tools.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java b/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java
index 1de87cf..278baa6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/Paths.java
@@ -54,8 +54,8 @@
  *  into a boot class path, user class path, and source path (in
  *  Collection<String> form).
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
index 42a3181..4f6cf7e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java
@@ -44,7 +44,7 @@
 /**
  * A subclass of JavaFileObject representing regular files.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java b/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java
index f41474a..564ff17 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/RelativePath.java
@@ -35,7 +35,7 @@
  * container, such as a directory or zip file.
  * Internally, the file separator is always '/'.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java b/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java
index e6ad9e1..581527d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/SymbolArchive.java
@@ -36,7 +36,7 @@
 import com.sun.tools.javac.util.List;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java
index b8691d0..1a89c20 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipArchive.java
@@ -51,7 +51,7 @@
 import java.lang.ref.SoftReference;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
index 7c2ddee..1234bfc 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndex.java
@@ -69,7 +69,7 @@
  * checking to reindex the zip files if it is needed. In batch mode the timestamps are not checked
  * and the compiler uses the cached indexes.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java
index 2c5690d..66f08fe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/file/ZipFileIndexArchive.java
@@ -45,7 +45,7 @@
 import com.sun.tools.javac.util.List;
 
 /**
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java
index e8aacf8..81085cd 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ByteCodes.java
@@ -29,8 +29,8 @@
 /** Bytecode instruction codes, as well as typecodes used as
  *  instruction modifiers.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTFlags.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTFlags.java
index ec256a1..db09b60 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTFlags.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTFlags.java
@@ -28,8 +28,8 @@
 
 /** The CharacterRangeTable flags indicating type of an entry.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTable.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTable.java
index 86a8296..d49bf07 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTable.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/CRTable.java
@@ -36,8 +36,8 @@
  *  and the hashtable for mapping trees or lists of trees to their
  *  ending positions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
index 91208cf7..65b8bce 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassFile.java
@@ -59,8 +59,8 @@
  *  as routines to convert between internal ``.'' and external ``/''
  *  separators in class names.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b> */
 public class ClassFile {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
index 0d2128a..d16dc1d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java
@@ -62,8 +62,8 @@
  *  for all other definitions in the classfile. Top-level Classes themselves
  *  appear as members of the scopes of PackageSymbols.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
index 8d80322..687d534 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java
@@ -49,8 +49,8 @@
 /** This class provides operations to map an internal symbol table graph
  *  rooted in a ClassSymbol into a classfile.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java
index 06744ab..d96613f 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Code.java
@@ -39,8 +39,8 @@
  *  methods in a classfile. The class also provides some utility operations to
  *  generate bytecode instructions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
index f56848c..909a6c9 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java
@@ -49,8 +49,8 @@
 
 /** This pass maps flat Java (i.e. without inner classes) to bytecodes.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java
index 8385e33..d79df9c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Items.java
@@ -43,8 +43,8 @@
  *  special values this or super, etc. Individual items are represented as
  *  inner classes in class Items.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java
index c4f7de6..a22c3a7 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Pool.java
@@ -31,8 +31,8 @@
 
 /** An internal structure that corresponds to the constant pool of a classfile.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java
index cb8d57b..43b377b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Target.java
@@ -33,8 +33,8 @@
 
 /** The classfile version target.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/jvm/UninitializedType.java b/langtools/src/share/classes/com/sun/tools/javac/jvm/UninitializedType.java
index f61dea4..82ba522 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/UninitializedType.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/UninitializedType.java
@@ -31,8 +31,8 @@
 /** These pseudo-types appear in the generated verifier tables to
  *  indicate objects that have been allocated but not yet constructed.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/CommandLine.java b/langtools/src/share/classes/com/sun/tools/javac/main/CommandLine.java
index 809821e..45d1c7c 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/CommandLine.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/CommandLine.java
@@ -35,8 +35,8 @@
 /**
  * Various utility methods for processing Java tool command line arguments.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
index 4faf978..e136442 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java
@@ -73,8 +73,8 @@
  *  construct a new compiler, and to run a new compiler on a set of source
  *  files.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java b/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java
index b86550f..e39793d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/JavacOption.java
@@ -34,7 +34,7 @@
 /**
  * TODO: describe com.sun.tools.javac.main.JavacOption
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java
index 168a08a..4a9e6ae 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/Main.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/Main.java
@@ -47,8 +47,8 @@
 
 /** This class provides a commandline interface to the GJC compiler.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java b/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java
index ee6d6b2..4464845 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/OptionName.java
@@ -29,7 +29,7 @@
 /**
  * TODO: describe com.sun.tools.javac.main.OptionName
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java b/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java
index 42fa30c..d6b0248 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/main/RecognizedOptions.java
@@ -49,7 +49,7 @@
 /**
  * TODO: describe com.sun.tools.javac.main.RecognizedOptions
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
index 7ea67e7..b26f031 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/AnnotationProxyMaker.java
@@ -50,8 +50,8 @@
  * <p> The "dynamic proxy return form" of an annotation element value is
  * the form used by sun.reflect.annotation.AnnotationInvocationHandler.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- * you write code that depends on this, you do so at your own risk.
+ * <p><b>This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
  */
@@ -181,16 +181,16 @@
         }
 
         public void visitArray(Attribute.Array a) {
-            Name elemName = ((ArrayType) a.type).elemtype.tsym.name;
+            Name elemName = ((ArrayType) a.type).elemtype.tsym.getQualifiedName();
 
-            if (elemName == elemName.table.names.java_lang_Class) {   // Class[]
+            if (elemName.equals(elemName.table.names.java_lang_Class)) {   // Class[]
                 // Construct a proxy for a MirroredTypesException
-                List<TypeMirror> elems = List.nil();
+                ListBuffer<TypeMirror> elems = new ListBuffer<TypeMirror>();
                 for (Attribute value : a.values) {
                     Type elem = ((Attribute.Class) value).type;
-                    elems.add(elem);
+                    elems.append(elem);
                 }
-                value = new MirroredTypesExceptionProxy(elems);
+                value = new MirroredTypesExceptionProxy(elems.toList());
 
             } else {
                 int len = a.values.length;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/FilteredMemberList.java b/langtools/src/share/classes/com/sun/tools/javac/model/FilteredMemberList.java
index c8d7b8a..59b3e60 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/model/FilteredMemberList.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/FilteredMemberList.java
@@ -38,8 +38,8 @@
  * filtering out unwanted elements such as synthetic ones.
  * This view is most efficiently accessed through its iterator() method.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- * you write code that depends on this, you do so at your own risk.
+ * <p><b>This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java
index be69319..e56681a 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacElements.java
@@ -53,7 +53,7 @@
 /**
  * Utility methods for operating on program elements.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/JavacSourcePosition.java b/langtools/src/share/classes/com/sun/tools/javac/model/JavacSourcePosition.java
index 87eda1c..3cc1475 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacSourcePosition.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacSourcePosition.java
@@ -31,7 +31,7 @@
 /**
  * Implementation of model API SourcePosition based on javac internal state.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java b/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java
index 653abfb..87badfc 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/model/JavacTypes.java
@@ -37,7 +37,7 @@
 /**
  * Utility methods for operating on types.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java
index c5501fd..66fd4c9 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/JavacPathFileManager.java
@@ -101,8 +101,8 @@
  *  <p>To reduce confusion with Path objects, the locations such as "class path",
  *  "source path", etc, are generically referred to here as "search paths".
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
index 6fd9468..4aff561 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileManager.java
@@ -41,8 +41,8 @@
  *  getStandardFileManager}. However, would need to be handled carefully
  *  as another forward reference from langtools to jdk.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
index 0714348..b29a10e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/nio/PathFileObject.java
@@ -56,8 +56,8 @@
  *  different factory methods, which compute the binary name based on
  *  information available at the time the file object is created.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java b/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java
index d263ab8..d7803b8 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/DocCommentScanner.java
@@ -35,8 +35,8 @@
  *  translating Unicode escape sequences and by stripping the
  *  leading whitespace and starts from each line of the comment.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/EndPosParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/EndPosParser.java
index 9b7418a..715839b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/EndPosParser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/EndPosParser.java
@@ -36,7 +36,7 @@
  * This class is similar to Parser except that it stores ending
  * positions for the tree nodes.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
index 42ede48..01ab573 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/JavacParser.java
@@ -43,8 +43,8 @@
  *  operator precedence scheme is used for parsing binary operation
  *  expressions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Keywords.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Keywords.java
index 8b224b5..e1e4b57 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Keywords.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Keywords.java
@@ -35,7 +35,7 @@
 /**
  * Map from Name to Token and Token to String.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Lexer.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Lexer.java
index 5aca7fb..90f6afe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Lexer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Lexer.java
@@ -32,7 +32,7 @@
  * The lexical analyzer maps an input stream consisting of ASCII
  * characters and Unicode escapes into a token sequence.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Parser.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Parser.java
index 79fe20e..5b70ad0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Parser.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Parser.java
@@ -34,7 +34,7 @@
  * Reads syntactic units from source code.
  * Parsers are normally created from a ParserFactory.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java b/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java
index 533d906..9dc7941 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/ParserFactory.java
@@ -35,7 +35,7 @@
 /**
  * A factory for creating parsers.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java
index 4756ef1..8370605 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Scanner.java
@@ -38,8 +38,8 @@
 /** The lexical analyzer maps an input stream consisting of
  *  ASCII characters and Unicode escapes into a token sequence.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/parser/Token.java b/langtools/src/share/classes/com/sun/tools/javac/parser/Token.java
index a105356f..8fec6f8 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/parser/Token.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/parser/Token.java
@@ -33,8 +33,8 @@
 /** An interface that defines codes for Java source tokens
  *  returned from lexical analysis.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/AnnotationProcessingError.java b/langtools/src/share/classes/com/sun/tools/javac/processing/AnnotationProcessingError.java
index 12e280f..9382038 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/AnnotationProcessingError.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/AnnotationProcessingError.java
@@ -29,7 +29,7 @@
 /**
  * Error thrown for problems encountered during annotation processing.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java
index 1e8c1b2..8f331ee 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacFiler.java
@@ -87,7 +87,7 @@
  * class path can alter the behavior of the tool and any final
  * compile.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacMessager.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacMessager.java
index 88b67d5..d2bcf52 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacMessager.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacMessager.java
@@ -37,7 +37,7 @@
 /**
  * An implementation of the Messager built on top of log.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
index 7ffe419..2f605fd 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacProcessingEnvironment.java
@@ -81,7 +81,7 @@
  * Objects of this class hold and manage the state needed to support
  * annotation processing.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
@@ -745,7 +745,7 @@
      * Leave class public for external testing purposes.
      */
     public static class ComputeAnnotationSet extends
-        ElementScanner6<Set<TypeElement>, Set<TypeElement>> {
+        ElementScanner7<Set<TypeElement>, Set<TypeElement>> {
         final Elements elements;
 
         public ComputeAnnotationSet(Elements elements) {
@@ -1380,7 +1380,7 @@
     }
 
     /**
-     * For internal use by Sun Microsystems only.  This method will be
+     * For internal use only.  This method will be
      * removed without warning.
      */
     public Context getContext() {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
index 8fa6ae7..105f6f0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java
@@ -40,7 +40,7 @@
  * <p>The methods in this class do not take type annotations into account,
  * as target types, not java elements.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
@@ -125,7 +125,7 @@
         else
             throw new AssertionError("Bad implementation type for " + tm);
 
-        ElementScanner6<Set<Element>, DeclaredType> scanner =
+        ElementScanner7<Set<Element>, DeclaredType> scanner =
             new AnnotationSetScanner(result, typeUtil);
 
         for (Element element : rootElements)
@@ -136,7 +136,7 @@
 
     // Could be written as a local class inside getElementsAnnotatedWith
     private class AnnotationSetScanner extends
-        ElementScanner6<Set<Element>, DeclaredType> {
+        ElementScanner7<Set<Element>, DeclaredType> {
         // Insertion-order preserving set
         Set<Element> annotatedElements = new LinkedHashSet<Element>();
         Types typeUtil;
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java b/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
index b5e31f1..8e641eb 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/PrintingProcessor.java
@@ -42,7 +42,7 @@
  * -Xprint option; the included visitor class is used to implement
  * Elements.printElements.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
@@ -83,7 +83,7 @@
      * Used for the -Xprint option and called by Elements.printElements
      */
     public static class PrintingElementVisitor
-        extends SimpleElementVisitor6<PrintingElementVisitor, Boolean> {
+        extends SimpleElementVisitor7<PrintingElementVisitor, Boolean> {
         int indentation; // Indentation level;
         final PrintWriter writer;
         final Elements elementUtils;
@@ -117,7 +117,7 @@
                     enclosing != null &&
                     NestingKind.ANONYMOUS ==
                     // Use an anonymous class to determine anonymity!
-                    (new SimpleElementVisitor6<NestingKind, Void>() {
+                    (new SimpleElementVisitor7<NestingKind, Void>() {
                         @Override
                         public NestingKind visitType(TypeElement e, Void p) {
                             return e.getNestingKind();
diff --git a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
index be57c18..e3cd7ad 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/processing/ServiceProxy.java
@@ -37,7 +37,7 @@
  * Utility class to determine if a service can be found on the
  * path that might be used to create a class loader.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
index df93e51..86ad416 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties
@@ -593,18 +593,32 @@
 compiler.note.unchecked.plural.additional=\
     Some input files additionally use unchecked or unsafe operations.
 
+compiler.note.varargs.filename=\
+    {0} declares unsafe vararg methods.
+compiler.note.varargs.plural=\
+    Some input files declare unsafe vararg methods.
+# The following string may appear after one of the above unsafe varargs
+# messages.
+compiler.note.varargs.recompile=\
+    Recompile with -Xlint:varargs for details.
+
+compiler.note.varargs.filename.additional=\
+    {0} declares additional unsafe vararg methods.
+compiler.note.varargs.plural.additional=\
+    Some input files additionally declares unsafe vararg methods.
+
 compiler.note.sunapi.filename=\
-    {0} uses Sun proprietary API that may be removed in a future release.
+    {0} uses internal proprietary API that may be removed in a future release.
 compiler.note.sunapi.plural=\
-    Some input files use Sun proprietary API that may be removed in a future release.
+    Some input files use internal proprietary API that may be removed in a future release.
 # The following string may appear after one of the above sunapi messages.
 compiler.note.sunapi.recompile=\
     Recompile with -Xlint:sunapi for details.
 
 compiler.note.sunapi.filename.additional=\
-    {0} uses additional Sun proprietary API that may be removed in a future release.
+    {0} uses additional internal proprietary API that may be removed in a future release.
 compiler.note.sunapi.plural.additional=\
-    Some input files additionally use Sun proprietary API that may be removed in a future release.
+    Some input files additionally use internal proprietary API that may be removed in a future release.
 
 # Notes related to annotation processing
 
@@ -687,7 +701,7 @@
     [deprecation] {0} in {1} has been deprecated
 
 compiler.warn.sun.proprietary=\
-    {0} is Sun proprietary API and may be removed in a future release
+    {0} is internal proprietary API and may be removed in a future release
 
 compiler.warn.illegal.char.for.encoding=\
     unmappable character for encoding {0}
@@ -796,6 +810,9 @@
 compiler.warn.unchecked.generic.array.creation=\
     [unchecked] unchecked generic array creation for varargs parameter of type {0}
 
+compiler.warn.varargs.non.reifiable.type=\
+    [varargs] Possible heap pollution from parameterized vararg type {0}
+
 compiler.warn.missing.deprecated.annotation=\
     [dep-ann] deprecated item is not annotated with @Deprecated
 
diff --git a/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java b/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
index 5c751c7..9ee550e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/sym/CreateSymbols.java
@@ -77,7 +77,7 @@
  * <dd>Specifies the destination directory.</dd>
  * </dl>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
index dc61228..bf3f592 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/JCTree.java
@@ -66,7 +66,7 @@
  * <p>To avoid ambiguities with the Tree API in com.sun.source all sub
  * classes should, by convention, start with JC (javac).
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
index 4da5b67..34e221e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/Pretty.java
@@ -39,8 +39,8 @@
 
 /** Prints out a tree as an indented Java source program.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java
index a4e1c7e..e3977f6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java
@@ -34,8 +34,8 @@
  * Creates a copy of a tree, using a given TreeMaker.
  * Names, literal values, etc are shared with the original.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
index 7e888b0..6f185db 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeInfo.java
@@ -38,8 +38,8 @@
 
 /** Utility class containing inspector methods for trees.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java
index 7dcb3e6..5ef56c8 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java
@@ -39,8 +39,8 @@
 
 /** Factory class for trees.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java
index 35ebb31..d0bcfb9 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeScanner.java
@@ -36,8 +36,8 @@
  *  do some interesting work. The scanner class itself takes care of all
  *  navigational aspects.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java
index 7c212a6..e082382 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/tree/TreeTranslator.java
@@ -37,8 +37,8 @@
  *  do some interesting work. The translator class itself takes care of all
  *  navigational aspects.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Abort.java b/langtools/src/share/classes/com/sun/tools/javac/util/Abort.java
index 60b95bf..996f177 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Abort.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Abort.java
@@ -28,8 +28,8 @@
 /** Throwing an instance of
  *  this class causes (silent) termination of the main compiler method.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
index 2d5ad7e..f1dc8fe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java
@@ -57,7 +57,7 @@
  *  <li> Provides the formatting logic for rendering the arguments of a JCDiagnostic object.
  * <ul>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java
index 66f0f3a..aae9039 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/AbstractLog.java
@@ -37,8 +37,8 @@
  *  A base class for error logs. Reports errors and warnings, and
  *  keeps track of error numbers and positions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
index c00b489..95609a6 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java
@@ -58,7 +58,7 @@
  * <li>%_: space delimiter, useful for formatting purposes
  * </ul>
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java
index 1c15276..eff9e92 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Bits.java
@@ -27,8 +27,8 @@
 
 /** A class for extensible, mutable bit sets.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java b/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java
index de1ca49..509abac 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ByteBuffer.java
@@ -31,8 +31,8 @@
  *  appended. There are also methods to append names to byte buffers
  *  and to convert byte buffers to names.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ClientCodeException.java b/langtools/src/share/classes/com/sun/tools/javac/util/ClientCodeException.java
index 4cc92bc..e5a0079 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ClientCodeException.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ClientCodeException.java
@@ -29,8 +29,8 @@
  * An exception used for propogating exceptions found in client code
  * invoked from javac.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java b/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java
index 1594223..9072036 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/CloseableURLClassLoader.java
@@ -40,8 +40,8 @@
  * fragile. Caveat emptor.
  * @throws Error if the internal data structures are not as expected.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Constants.java b/langtools/src/share/classes/com/sun/tools/javac/util/Constants.java
index 2bdb422..36a473d 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Constants.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Constants.java
@@ -32,8 +32,8 @@
 /**
  * Utilities for operating on constant values.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- * you write code that depends on this, you do so at your own risk.
+ * <p><b>This is NOT part of any supported API.
+ * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java
index 36c0e4d..4fe3c45 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Context.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Context.java
@@ -91,8 +91,8 @@
  *     NewPhase.preRegister(context);
  * </pre>
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java b/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java
index d95f660..0c9f254 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Convert.java
@@ -28,8 +28,8 @@
 /** Utility class for static conversion methods between numbers
  *  and strings in various formats.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java b/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java
index 0d497f2..2f13717 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/DiagnosticSource.java
@@ -40,8 +40,8 @@
  * A simple abstraction of a source file, as needed for use in a diagnostic message.
  * Provides access to the line and position in a line for any given character offset.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/FatalError.java b/langtools/src/share/classes/com/sun/tools/javac/util/FatalError.java
index b08cc54..16bdd21 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/FatalError.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/FatalError.java
@@ -29,8 +29,8 @@
  *  of the main compiler method.  It is used when some non-recoverable
  *  error has been detected in the compiler environment at runtime.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java
index b36f029..eefb8f8 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ForwardingDiagnosticFormatter.java
@@ -38,7 +38,7 @@
  * A delegated diagnostic formatter delegates all formatting
  * actions to an underlying formatter (aka the delegated formatter).
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java b/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java
index 5d17710..e3aaf50 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/JCDiagnostic.java
@@ -38,8 +38,8 @@
 
 /** An abstraction of a diagnostic message generated by the compiler.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java b/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
index 1ee5be5..0ec0ffe 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/JavacMessages.java
@@ -37,8 +37,8 @@
 /**
  *  Support for formatted localized messages.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java b/langtools/src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java
index ac8d208..f8ace81 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/LayoutCharacters.java
@@ -28,8 +28,8 @@
 /** An interface containing layout character constants used in Java
  *  programs.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/List.java b/langtools/src/share/classes/com/sun/tools/javac/util/List.java
index 19665ac..89ff060 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/List.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/List.java
@@ -43,8 +43,8 @@
  *  <p>Lists are always trailed by a sentinel element, whose head and tail
  *  are both null.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -103,6 +103,7 @@
 
     /** Construct a list consisting of given elements.
      */
+    @SuppressWarnings("varargs")
     public static <A> List<A> of(A x1, A x2, A x3, A... rest) {
         return new List<A>(x1, new List<A>(x2, new List<A>(x3, from(rest))));
     }
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/ListBuffer.java b/langtools/src/share/classes/com/sun/tools/javac/util/ListBuffer.java
index 42b390a..9756b35 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/ListBuffer.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/ListBuffer.java
@@ -33,8 +33,8 @@
 /** A class for constructing lists by appending elements. Modelled after
  *  java.lang.StringBuffer.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java
index 4da7a74..6fcc4b0 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Log.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Log.java
@@ -41,8 +41,8 @@
 /** A class for error logs. Reports errors and warnings, and
  *  keeps track of error numbers and positions.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
@@ -125,8 +125,8 @@
         this.promptOnError = options.get("-prompt") != null;
         this.emitWarnings = options.get("-Xlint:none") == null;
         this.suppressNotes = options.get("suppressNotes") != null;
-        this.MaxErrors = getIntOption(options, "-Xmaxerrs", 100);
-        this.MaxWarnings = getIntOption(options, "-Xmaxwarns", 100);
+        this.MaxErrors = getIntOption(options, "-Xmaxerrs", getDefaultMaxErrors());
+        this.MaxWarnings = getIntOption(options, "-Xmaxwarns", getDefaultMaxWarnings());
 
         boolean rawDiagnostics = options.get("rawDiagnostics") != null;
         messages = JavacMessages.instance(context);
@@ -155,6 +155,18 @@
             return defaultValue;
         }
 
+        /** Default value for -Xmaxerrs.
+         */
+        protected int getDefaultMaxErrors() {
+            return 100;
+        }
+
+        /** Default value for -Xmaxwarns.
+         */
+        protected int getDefaultMaxWarnings() {
+            return 100;
+        }
+
     /** The default writer for diagnostics
      */
     static final PrintWriter defaultWriter(Context context) {
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java b/langtools/src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java
index c315f27..f53d04e 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/MandatoryWarningHandler.java
@@ -43,8 +43,8 @@
  * made on any API to generate a warning at all. In consequence, this handler only
  * gets to handle those warnings that JLS says must be generated.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Name.java b/langtools/src/share/classes/com/sun/tools/javac/util/Name.java
index bab7916..ddd9340 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Name.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Name.java
@@ -29,8 +29,8 @@
  *  Utf8 format. Names are stored in a Name.Table, and are unique within
  *  that table.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Names.java b/langtools/src/share/classes/com/sun/tools/javac/util/Names.java
index 06f3502..3bfa9a3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Names.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Names.java
@@ -29,8 +29,8 @@
  * Access to the compiler's name table.  STandard names are defined,
  * as well as methods to create new names.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Options.java b/langtools/src/share/classes/com/sun/tools/javac/util/Options.java
index 90632c4..23eb56f 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Options.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Options.java
@@ -32,8 +32,8 @@
  *  If an option has an argument, the option name is mapped to the argument.
  *  If a set option has no argument, it is mapped to itself.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java
index e6aa4f0..2f5d266 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Pair.java
@@ -27,8 +27,8 @@
 
 /** A generic class for pairs.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Position.java b/langtools/src/share/classes/com/sun/tools/javac/util/Position.java
index c58b714..d11afc1 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Position.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Position.java
@@ -36,8 +36,8 @@
  *  expansion is optional and no Unicode excape translation is considered.
  *  The first character is at location (1,1).
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/PropagatedException.java b/langtools/src/share/classes/com/sun/tools/javac/util/PropagatedException.java
index fb01c6f..1df2418 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/PropagatedException.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/PropagatedException.java
@@ -28,7 +28,7 @@
 /**
  * Used to propagate exceptions through to the user.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java
index 09e2659..21ee504 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java
@@ -41,7 +41,7 @@
  * or not the source name and position are set. This formatter provides a standardized, localize-independent
  * implementation of a diagnostic formatter; as such, this formatter is best suited for testing purposes.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
index a7f950e..44badbf 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/RichDiagnosticFormatter.java
@@ -59,7 +59,7 @@
  * to two different type-variables with the same name, their representation is
  * disambiguated by appending an index to the type variable name.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java b/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java
index 705c6ff..0314f8b 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/SharedNameTable.java
@@ -32,8 +32,8 @@
  * byte array, expanding it as needed. This avoids the overhead incurred
  * by using an array of bytes for each name.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java b/langtools/src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java
index 78f92f0..ca765e3 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/UnsharedNameTable.java
@@ -32,8 +32,8 @@
  * using weak references. It is recommended for use when a single shared
  * byte array is unsuitable.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java b/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java
index f5e713c..d51ab33 100644
--- a/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java
+++ b/langtools/src/share/classes/com/sun/tools/javac/util/Warner.java
@@ -31,7 +31,7 @@
  * An interface to support optional warnings, needed for support of
  * unchecked conversions and unchecked casts.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own risk.
  * This code and its internal interfaces are subject to change or
  * deletion without notice.</b>
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java b/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java
index a64bb64..e21d060 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/DocletInvoker.java
@@ -155,10 +155,8 @@
     public boolean start(RootDoc root) {
         Object retVal;
         String methodName = "start";
-        Class<?>[] paramTypes = new Class<?>[1];
-        Object[] params = new Object[1];
-        paramTypes[0] = RootDoc.class;
-        params[0] = root;
+        Class<?>[] paramTypes = { RootDoc.class };
+        Object[] params = { root };
         try {
             retVal = invoke(methodName, null, paramTypes, params);
         } catch (DocletInvokeException exc) {
@@ -181,10 +179,8 @@
     public int optionLength(String option) {
         Object retVal;
         String methodName = "optionLength";
-        Class<?>[] paramTypes = new Class<?>[1];
-        Object[] params = new Object[1];
-        paramTypes[0] = option.getClass();
-        params[0] = option;
+        Class<?>[] paramTypes = { String.class };
+        Object[] params = { option };
         try {
             retVal = invoke(methodName, new Integer(0), paramTypes, params);
         } catch (DocletInvokeException exc) {
@@ -208,12 +204,8 @@
         String options[][] = optlist.toArray(new String[optlist.length()][]);
         String methodName = "validOptions";
         DocErrorReporter reporter = messager;
-        Class<?>[] paramTypes = new Class<?>[2];
-        Object[] params = new Object[2];
-        paramTypes[0] = options.getClass();
-        paramTypes[1] = DocErrorReporter.class;
-        params[0] = options;
-        params[1] = reporter;
+        Class<?>[] paramTypes = { String[][].class, DocErrorReporter.class };
+        Object[] params = { options, reporter };
         try {
             retVal = invoke(methodName, Boolean.TRUE, paramTypes, params);
         } catch (DocletInvokeException exc) {
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/Messager.java b/langtools/src/share/classes/com/sun/tools/javadoc/Messager.java
index de61d7c..151c4cc 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Messager.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Messager.java
@@ -86,7 +86,7 @@
         private static final long serialVersionUID = 0;
     }
 
-    private final String programName;
+    final String programName;
 
     private ResourceBundle messageRB = null;
 
@@ -121,6 +121,16 @@
         this.programName = programName;
     }
 
+    @Override
+    protected int getDefaultMaxErrors() {
+        return Integer.MAX_VALUE;
+    }
+
+    @Override
+    protected int getDefaultMaxWarnings() {
+        return Integer.MAX_VALUE;
+    }
+
     /**
      * Reset resource bundle, eg. locale has changed.
      */
@@ -231,11 +241,13 @@
      * @param msg message to print
      */
     public void printError(SourcePosition pos, String msg) {
-        String prefix = (pos == null) ? programName : pos.toString();
-        errWriter.println(prefix + ": " + getText("javadoc.error") + " - " + msg);
-        errWriter.flush();
-        prompt();
-        nerrors++;
+        if (nerrors < MaxErrors) {
+            String prefix = (pos == null) ? programName : pos.toString();
+            errWriter.println(prefix + ": " + getText("javadoc.error") + " - " + msg);
+            errWriter.flush();
+            prompt();
+            nerrors++;
+        }
     }
 
     /**
@@ -256,10 +268,12 @@
      * @param msg message to print
      */
     public void printWarning(SourcePosition pos, String msg) {
-        String prefix = (pos == null) ? programName : pos.toString();
-        warnWriter.println(prefix +  ": " + getText("javadoc.warning") +" - " + msg);
-        warnWriter.flush();
-        nwarnings++;
+        if (nwarnings < MaxWarnings) {
+            String prefix = (pos == null) ? programName : pos.toString();
+            warnWriter.println(prefix +  ": " + getText("javadoc.warning") +" - " + msg);
+            warnWriter.flush();
+            nwarnings++;
+        }
     }
 
     /**
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/Start.java b/langtools/src/share/classes/com/sun/tools/javadoc/Start.java
index e584549..f32b235 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/Start.java
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/Start.java
@@ -51,8 +51,6 @@
  * @author Neal Gafter (rewrite)
  */
 class Start {
-    /** Context for this invocation. */
-    private final Context context;
 
     private final String defaultDocletClassName;
     private final ClassLoader docletParentClassLoader;
@@ -98,8 +96,8 @@
           PrintWriter noticeWriter,
           String defaultDocletClassName,
           ClassLoader docletParentClassLoader) {
-        context = new Context();
-        messager = new Messager(context, programName, errWriter, warnWriter, noticeWriter);
+        Context tempContext = new Context(); // interim context until option decoding completed
+        messager = new Messager(tempContext, programName, errWriter, warnWriter, noticeWriter);
         this.defaultDocletClassName = defaultDocletClassName;
         this.docletParentClassLoader = docletParentClassLoader;
     }
@@ -110,8 +108,8 @@
 
     Start(String programName, String defaultDocletClassName,
           ClassLoader docletParentClassLoader) {
-        context = new Context();
-        messager = new Messager(context, programName);
+        Context tempContext = new Context(); // interim context until option decoding completed
+        messager = new Messager(tempContext, programName);
         this.defaultDocletClassName = defaultDocletClassName;
         this.docletParentClassLoader = docletParentClassLoader;
     }
@@ -145,6 +143,13 @@
     }
 
     /**
+     * Usage
+     */
+    private void Xusage() {
+        messager.notice("main.Xusage");
+    }
+
+    /**
      * Exit
      */
     private void exit() {
@@ -213,6 +218,15 @@
         setDocletInvoker(argv);
         ListBuffer<String> subPackages = new ListBuffer<String>();
         ListBuffer<String> excludedPackages = new ListBuffer<String>();
+
+        Context context = new Context();
+        // Setup a new Messager, using the same initial parameters as the
+        // existing Messager, except that this one will be able to use any
+        // options that may be set up below.
+        Messager.preRegister(context,
+                messager.programName,
+                messager.errWriter, messager.warnWriter, messager.noticeWriter);
+
         Options compOpts = Options.instance(context);
         boolean docClasses = false;
 
@@ -310,6 +324,15 @@
                     usageError("main.locale_first");
                 oneArg(argv, i++);
                 docLocale = argv[i];
+            } else if (arg.equals("-Xmaxerrs") || arg.equals("-Xmaxwarns")) {
+                oneArg(argv, i++);
+                if (compOpts.get(arg) != null) {
+                    usageError("main.option.already.seen", arg);
+                }
+                compOpts.put(arg, argv[i]);
+            } else if (arg.equals("-X")) {
+                Xusage();
+                exit();
             } else if (arg.startsWith("-XD")) {
                 String s = arg.substring("-XD".length());
                 int eq = s.indexOf('=');
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
index 5c3998e..288489d 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc.properties
@@ -49,7 +49,13 @@
   -locale <name>            Locale to be used, e.g. en_US or en_US_WIN\n\
   -encoding <name>          Source file encoding name\n\
   -quiet                    Do not display status messages\n\
-  -J<flag>                  Pass <flag> directly to the runtime system\n
+  -J<flag>                  Pass <flag> directly to the runtime system\n\
+  -X                        Print a synopsis of nonstandard options\n
+main.Xusage=\
+  -Xmaxerrs <number>        Set the maximum number of errors to print\n\
+  -Xmaxwarns <number>       Set the maximum number of warnings to print\n\
+\n\
+These options are non-standard and subject to change without notice.
 main.option.already.seen=The {0} option may be specified no more than once.
 main.requires_argument=option {0} requires an argument.
 main.locale_first=option -locale must be first on the command line.
@@ -65,7 +71,7 @@
 main.fatal.error=fatal error
 main.fatal.exception=fatal exception
 main.out.of.memory=java.lang.OutOfMemoryError: Please increase memory.\n\
-For example, on the Sun Classic or HotSpot VMs, add the option -J-Xmx\n\
+For example, on the JDK Classic or HotSpot VMs, add the option -J-Xmx\n\
 such as -J-Xmx32m.
 main.done_in=[done in {0} ms]
 main.doclet_method_must_be_static=In doclet class {0}, method {1} must be static.
diff --git a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
index bfb6fa1..068ff75 100644
--- a/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
+++ b/langtools/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties
@@ -65,7 +65,7 @@
 main.fatal.error=\u81f4\u547d\u9519\u8bef
 main.fatal.exception=\u81f4\u547d\u5f02\u5e38
 main.out.of.memory=java.lang.OutOfMemoryError\uff1a\u8bf7\u589e\u52a0\u5185\u5b58\u3002\n\
-\u4f8b\u5982\uff0c\u5bf9\u4e8e Sun Classic \u6216 HotSpot VM\uff0c\u8bf7\u6dfb\u52a0\u9009\u9879 -J-Xmx\uff0c\n\
+\u4f8b\u5982\uff0c\u5bf9\u4e8e JDK Classic \u6216 HotSpot VM\uff0c\u8bf7\u6dfb\u52a0\u9009\u9879 -J-Xmx\uff0c\n\
 \u5982 -J-Xmx32m\u3002
 main.done_in=[\u5728{0} \u6beb\u79d2\u5185\u5b8c\u6210]
 main.doclet_method_must_be_static=\u5728 doclet \u7c7b {0} \u4e2d\uff0c\u65b9\u6cd5 {1} \u5fc5\u987b\u4e3a\u9759\u6001\u3002
diff --git a/langtools/src/share/classes/com/sun/tools/javah/Gen.java b/langtools/src/share/classes/com/sun/tools/javah/Gen.java
index a32c3e6..5682986 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/Gen.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/Gen.java
@@ -60,7 +60,7 @@
  * original writing, this interface is rich enough to support JNI and the
  * old 1.0-style native method interface.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javah/InternalError.java b/langtools/src/share/classes/com/sun/tools/javah/InternalError.java
index 448f2e3..d7d5f20 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/InternalError.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/InternalError.java
@@ -26,8 +26,8 @@
 package com.sun.tools.javah;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javah/JNI.java b/langtools/src/share/classes/com/sun/tools/javah/JNI.java
index 5704b84..f71d4d0 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/JNI.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/JNI.java
@@ -42,7 +42,7 @@
 /**
  * Header file generator for JNI.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javah/JavahFileManager.java b/langtools/src/share/classes/com/sun/tools/javah/JavahFileManager.java
index 00c5bee..72160c5 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahFileManager.java
@@ -36,8 +36,8 @@
 /**
  *  javah's implementation of JavaFileManager.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java
index 680130e..650460a 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTask.java
@@ -59,7 +59,7 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 import javax.lang.model.util.Types;
 
 import javax.tools.Diagnostic;
@@ -76,7 +76,7 @@
  * Javah generates support files for native methods.
  * Parse commandline options & Invokes javadoc to execute those commands.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
@@ -705,7 +705,7 @@
         }
 
         private TypeVisitor<Void,Types> checkMethodParametersVisitor =
-                new SimpleTypeVisitor6<Void,Types>() {
+                new SimpleTypeVisitor7<Void,Types>() {
             @Override
             public Void visitArray(ArrayType t, Types types) {
                 visit(t.getComponentType(), types);
diff --git a/langtools/src/share/classes/com/sun/tools/javah/JavahTool.java b/langtools/src/share/classes/com/sun/tools/javah/JavahTool.java
index de90119..09cbdb9 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/JavahTool.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/JavahTool.java
@@ -40,7 +40,7 @@
 import javax.tools.StandardJavaFileManager;
 
 /*
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java
index fa0262e..405eba9 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/LLNI.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/LLNI.java
@@ -45,10 +45,10 @@
 import javax.lang.model.type.TypeMirror;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.ElementFilter;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 
 /*
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
@@ -620,7 +620,7 @@
     }
 
     protected final boolean isLongOrDouble(TypeMirror t) {
-        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor6<Boolean,Void>() {
+        TypeVisitor<Boolean,Void> v = new SimpleTypeVisitor7<Boolean,Void>() {
             public Boolean defaultAction(TypeMirror t, Void p){
                 return false;
             }
diff --git a/langtools/src/share/classes/com/sun/tools/javah/Main.java b/langtools/src/share/classes/com/sun/tools/javah/Main.java
index 09b205f..6a247b1 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/Main.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/Main.java
@@ -30,8 +30,8 @@
 /**
  *  Main entry point.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javah/Mangle.java b/langtools/src/share/classes/com/sun/tools/javah/Mangle.java
index c640673..709b00b 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/Mangle.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/Mangle.java
@@ -37,7 +37,7 @@
  * this more fine grained and distribute the functionality to the
  * generators.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java b/langtools/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java
index 1f1377d..5107dd1 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/NativeHeaderTool.java
@@ -44,8 +44,8 @@
  * @see JavaFileManager
  * @since 1.7
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java
index b329b32..c0ef128 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/TypeSignature.java
@@ -38,12 +38,12 @@
 import javax.lang.model.type.TypeVariable;
 import javax.lang.model.type.TypeVisitor;
 import javax.lang.model.util.Elements;
-import javax.lang.model.util.SimpleTypeVisitor6;
+import javax.lang.model.util.SimpleTypeVisitor7;
 
 /**
  * Returns internal type signature.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
@@ -239,7 +239,7 @@
 
 
     String qualifiedTypeName(TypeMirror type) {
-        TypeVisitor<Name, Void> v = new SimpleTypeVisitor6<Name, Void>() {
+        TypeVisitor<Name, Void> v = new SimpleTypeVisitor7<Name, Void>() {
             @Override
             public Name visitArray(ArrayType t, Void p) {
                 return t.getComponentType().accept(this, p);
diff --git a/langtools/src/share/classes/com/sun/tools/javah/Util.java b/langtools/src/share/classes/com/sun/tools/javah/Util.java
index 98457f1..36dcf22 100644
--- a/langtools/src/share/classes/com/sun/tools/javah/Util.java
+++ b/langtools/src/share/classes/com/sun/tools/javah/Util.java
@@ -44,7 +44,7 @@
  *      bug   -- Bug has occurred in javah
  *      fatal -- We can't even find resources, so bail fast, don't localize
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java b/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java
index 91a41c5..198cbf8 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/AnnotationWriter.java
@@ -40,8 +40,8 @@
 /**
  *  A writer for writing annotations as text.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java
index 41bda2c..3074398 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/AttributeWriter.java
@@ -64,8 +64,8 @@
 /*
  *  A writer for writing Attributes as text.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java
index efeb6e7..4c2d920 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/BasicWriter.java
@@ -35,8 +35,8 @@
  *  A writer similar to a PrintWriter but which does not hide exceptions.
  *  The standard print calls are line-buffered; report calls write messages directly.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java
index 7fcf987..88a81c5 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/ClassWriter.java
@@ -54,8 +54,8 @@
 /*
  *  The main javap class to write the contents of a class file as text.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
index 7abed18..2276f3f 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/CodeWriter.java
@@ -40,8 +40,8 @@
 /*
  *  Write the contents of a Code attribute.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java b/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java
index eb40cfa..9f86ac8 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/ConstantWriter.java
@@ -34,8 +34,8 @@
 /*
  *  Write a constant pool entry.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/Context.java b/langtools/src/share/classes/com/sun/tools/javap/Context.java
index e9f0606..9d630e6 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/Context.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/Context.java
@@ -31,8 +31,8 @@
 /*
  *  Class from which to put/get shared resources.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java b/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java
index e98b843..356fc9a 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/DisassemblerTool.java
@@ -44,8 +44,8 @@
  * @see JavaFileManager
  * @since 1.7
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java b/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java
index 9395105..c863793 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/InstructionDetailWriter.java
@@ -31,8 +31,8 @@
 /*
  *  Write additional details for an instruction.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/InternalError.java b/langtools/src/share/classes/com/sun/tools/javap/InternalError.java
index e0c2211..4bc02e8 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/InternalError.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/InternalError.java
@@ -26,8 +26,8 @@
 package com.sun.tools.javap;
 
 /**
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java
index 6f419c7..8fa7579 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapFileManager.java
@@ -36,8 +36,8 @@
 /**
  *  javap's implementation of JavaFileManager.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java
index 8bf977c..6ef621c 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/JavapTask.java
@@ -69,8 +69,8 @@
  *  "Main" class for javap, normally accessed from the command line
  *  via Main, or from JSR199 via DisassemblerTool.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java
index cc0b6d0..396f281 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTableWriter.java
@@ -42,8 +42,8 @@
 /**
  * Annotate instructions with details about local variables.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java
index 9b0d1f9..bdc9e07 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/LocalVariableTypeTableWriter.java
@@ -43,8 +43,8 @@
 /**
  * Annotate instructions with details about local variables.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/Main.java b/langtools/src/share/classes/com/sun/tools/javap/Main.java
index 089eebf..20f1ab3 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/Main.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/Main.java
@@ -30,8 +30,8 @@
 /**
  *  Main entry point.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/Messages.java b/langtools/src/share/classes/com/sun/tools/javap/Messages.java
index de35c42..85d88ae 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/Messages.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/Messages.java
@@ -30,8 +30,8 @@
 /**
  *  Access to javap messages.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/Options.java b/langtools/src/share/classes/com/sun/tools/javap/Options.java
index 65309f9..0a05d3b 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/Options.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/Options.java
@@ -34,8 +34,8 @@
 /*
  *  Provides access to javap's options, set via the command line
  *  or JSR 199 API.
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java b/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java
index a83345f..81ef9cb 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/SourceWriter.java
@@ -52,8 +52,8 @@
 /**
  * Annotate instructions with source code.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java b/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java
index e50e821..aedcf31 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/StackMapWriter.java
@@ -45,8 +45,8 @@
 /**
  * Annotate instructions with stack map.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java b/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java
index 6e03d54..0500c2d 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/TryBlockWriter.java
@@ -37,8 +37,8 @@
 /**
  * Annotate instructions with details about try blocks.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java b/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java
index db8cc4f..3a1a86f 100644
--- a/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/javap/TypeAnnotationWriter.java
@@ -41,8 +41,8 @@
 /**
  * Annotate instructions with details about type annotations.
  *
- *  <p><b>This is NOT part of any API supported by Sun Microsystems.  If
- *  you write code that depends on this, you do so at your own risk.
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
  *  This code and its internal interfaces are subject to change or
  *  deletion without notice.</b>
  */
diff --git a/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java b/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java
index 15f7b1b..02a8702 100644
--- a/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java
+++ b/langtools/src/share/classes/javax/lang/model/element/ElementVisitor.java
@@ -62,6 +62,7 @@
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
  * @see AbstractElementVisitor6
+ * @see AbstractElementVisitor7
  * @since 1.6
  */
 public interface ElementVisitor<R, P> {
diff --git a/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java b/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java
index 0701126..5f72c4a 100644
--- a/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java
+++ b/langtools/src/share/classes/javax/lang/model/type/MirroredTypeException.java
@@ -42,7 +42,7 @@
  * @see Element#getAnnotation(Class)
  * @since 1.6
  */
-public class MirroredTypeException extends RuntimeException {
+public class MirroredTypeException extends MirroredTypesException {
 
     private static final long serialVersionUID = 269;
 
@@ -54,7 +54,7 @@
      * @param type  the type being accessed
      */
     public MirroredTypeException(TypeMirror type) {
-        super("Attempt to access Class object for TypeMirror " + type.toString());
+        super("Attempt to access Class object for TypeMirror " + type.toString(), type);
         this.type = type;
     }
 
@@ -76,5 +76,6 @@
         throws IOException, ClassNotFoundException {
         s.defaultReadObject();
         type = null;
+        types = null;
     }
 }
diff --git a/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java b/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
index fc977bb..5d547a9 100644
--- a/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
+++ b/langtools/src/share/classes/javax/lang/model/type/MirroredTypesException.java
@@ -49,7 +49,17 @@
 
     private static final long serialVersionUID = 269;
 
-    private transient List<? extends TypeMirror> types; // cannot be serialized
+    transient List<? extends TypeMirror> types; // cannot be serialized
+
+    /*
+     * Trusted constructor to be called by MirroredTypeException.
+     */
+    MirroredTypesException(String message, TypeMirror type) {
+        super(message);
+        List<TypeMirror> tmp = (new ArrayList<TypeMirror>());
+        tmp.add(type);
+        types = Collections.unmodifiableList(tmp);
+    }
 
     /**
      * Constructs a new MirroredTypesException for the specified types.
diff --git a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java
index 8ff4e0f..80c947b 100644
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor6.java
@@ -62,6 +62,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see AbstractAnnotationValueVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java
new file mode 100644
index 0000000..f728c1a
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractAnnotationValueVisitor7.java
@@ -0,0 +1,73 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A skeletal visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see AbstractAnnotationValueVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public abstract class AbstractAnnotationValueVisitor7<R, P> extends AbstractAnnotationValueVisitor6<R, P> {
+
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractAnnotationValueVisitor7() {
+        super();
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java
index bf82437..ab8c5ec 100644
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor6.java
@@ -65,6 +65,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see AbstractElementVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java
new file mode 100644
index 0000000..badcb58
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractElementVisitor7.java
@@ -0,0 +1,75 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+
+/**
+ * A skeletal visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractElementVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public abstract class AbstractElementVisitor7<R, P> extends AbstractElementVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractElementVisitor7(){
+        super();
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java
index bd3ed37..63fd14d 100644
--- a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor6.java
@@ -57,6 +57,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see AbstractTypeVisitor7
  * @since 1.6
  */
 public abstract class AbstractTypeVisitor6<R, P> implements TypeVisitor<R, P> {
diff --git a/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java
new file mode 100644
index 0000000..0b14c91
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/AbstractTypeVisitor7.java
@@ -0,0 +1,67 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.type.*;
+
+/**
+ * A skeletal visitor of types with default behavior appropriate for
+ * the version 7 language level.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see AbstractTypeVisitor6
+ * @since 1.7
+ */
+public abstract class AbstractTypeVisitor7<R, P> extends AbstractTypeVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses to call.
+     */
+    protected AbstractTypeVisitor7() {
+        super();
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java
index dc3daf9..e0f4b07 100644
--- a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor6.java
@@ -76,6 +76,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see ElementKindVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java
new file mode 100644
index 0000000..9b7c3a4
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementKindVisitor7.java
@@ -0,0 +1,97 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import static javax.lang.model.element.ElementKind.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of program elements based on their {@linkplain
+ * ElementKind kind} with default behavior appropriate for the {@link
+ * SourceVersion#RELEASE_6 RELEASE_6} source version.  For {@linkplain
+ * Element elements} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it or the
+ * {@code ElementKind} {@code enum} used in this case may have
+ * constants added to it in the future to accommodate new, currently
+ * unknown, language structures added to future versions of the
+ * Java&trade; programming language.  Therefore, methods whose names
+ * begin with {@code "visit"} may be added to this class in the
+ * future; to avoid incompatibilities, classes which extend this class
+ * should not declare any instance methods with names beginning with
+ * {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new abstract element kind
+ * visitor class will also be introduced to correspond to the new
+ * language level; this visitor will have different default behavior
+ * for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementKindVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class ElementKindVisitor7<R, P> extends ElementKindVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementKindVisitor7() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected ElementKindVisitor7(R defaultValue) {
+        super(defaultValue);
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java b/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java
index 3ddcd33..29d0aa9 100644
--- a/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner6.java
@@ -88,6 +88,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see ElementScanner7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java b/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java
new file mode 100644
index 0000000..c2dcf02
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/ElementScanner7.java
@@ -0,0 +1,108 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+
+/**
+ * A scanning visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.  The <tt>visit<i>XYZ</i></tt> methods in this
+ * class scan their component elements by calling {@code scan} on
+ * their {@linkplain Element#getEnclosedElements enclosed elements},
+ * {@linkplain ExecutableElement#getParameters parameters}, etc., as
+ * indicated in the individual method specifications.  A subclass can
+ * control the order elements are visited by overriding the
+ * <tt>visit<i>XYZ</i></tt> methods.  Note that clients of a scanner
+ * may get the desired behavior be invoking {@code v.scan(e, p)} rather
+ * than {@code v.visit(e, p)} on the root objects of interest.
+ *
+ * <p>When a subclass overrides a <tt>visit<i>XYZ</i></tt> method, the
+ * new method can cause the enclosed elements to be scanned in the
+ * default way by calling <tt>super.visit<i>XYZ</i></tt>.  In this
+ * fashion, the concrete visitor can control the ordering of traversal
+ * over the component elements with respect to the additional
+ * processing; for example, consistently calling
+ * <tt>super.visit<i>XYZ</i></tt> at the start of the overridden
+ * methods will yield a preorder traversal, etc.  If the component
+ * elements should be traversed in some other order, instead of
+ * calling <tt>super.visit<i>XYZ</i></tt>, an overriding visit method
+ * should call {@code scan} with the elements in the desired order.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new element scanner visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see ElementScanner6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class ElementScanner7<R, P> extends ElementScanner6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected ElementScanner7(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     */
+    protected ElementScanner7(R defaultValue){
+        super(defaultValue);
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java
index cf278fa..5ec3cde 100644
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor6.java
@@ -69,6 +69,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see SimpleAnnotationValueVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java
new file mode 100644
index 0000000..e4ba035
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleAnnotationValueVisitor7.java
@@ -0,0 +1,90 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import java.util.List;
+import javax.lang.model.element.*;
+
+import javax.lang.model.type.TypeMirror;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+import javax.annotation.processing.SupportedSourceVersion;
+
+/**
+ * A simple visitor for annotation values with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.  Visit methods call {@link
+ * #defaultAction} passing their arguments to {@code defaultAction}'s
+ * corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code AnnotationValueVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple annotation
+ * value visitor class will also be introduced to correspond to the
+ * new language level; this visitor will have different default
+ * behavior for the visit method in question.  When the new visitor is
+ * introduced, all or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods
+ * @param <P> the type of the additional parameter to this visitor's methods.
+ *
+ * @see SimpleAnnotationValueVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class SimpleAnnotationValueVisitor7<R, P> extends SimpleAnnotationValueVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleAnnotationValueVisitor7() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleAnnotationValueVisitor7(R defaultValue) {
+        super(defaultValue);
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java
index cac7232..9ec4fb7 100644
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor6.java
@@ -71,6 +71,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see SimpleElementVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java
new file mode 100644
index 0000000..abdd04e
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleElementVisitor7.java
@@ -0,0 +1,92 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.element.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of program elements with default behavior
+ * appropriate for the {@link SourceVersion#RELEASE_7 RELEASE_7}
+ * source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_7} language
+ * constructs call {@link #defaultAction}, passing their arguments to
+ * {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code ElementVisitor} interface
+ * implemented by this class may have methods added to it in the
+ * future to accommodate new, currently unknown, language structures
+ * added to future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple element visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@code Void}
+ *             for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's methods.  Use {@code Void}
+ *              for visitors that do not need an additional parameter.
+ *
+ * @see SimpleElementVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class SimpleElementVisitor7<R, P> extends SimpleElementVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleElementVisitor7(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleElementVisitor7(R defaultValue){
+        super(defaultValue);
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java
index c22adb3..248c964 100644
--- a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor6.java
@@ -70,6 +70,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see SimpleTypeVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java
new file mode 100644
index 0000000..48c8729
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/SimpleTypeVisitor7.java
@@ -0,0 +1,91 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import javax.lang.model.SourceVersion;
+import static javax.lang.model.SourceVersion.*;
+
+/**
+ * A simple visitor of types with default behavior appropriate for the
+ * {@link SourceVersion#RELEASE_7 RELEASE_7} source version.
+ *
+ * Visit methods corresponding to {@code RELEASE_7} language
+ * constructs call {@link #defaultAction}, passing their arguments to
+ * {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new simple type visitor
+ * class will also be introduced to correspond to the new language
+ * level; this visitor will have different default behavior for the
+ * visit method in question.  When the new visitor is introduced, all
+ * or portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see SimpleTypeVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class SimpleTypeVisitor7<R, P> extends SimpleTypeVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses; uses {@code null} for the
+     * default value.
+     */
+    protected SimpleTypeVisitor7(){
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses; uses the argument for the
+     * default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected SimpleTypeVisitor7(R defaultValue){
+        super(defaultValue);
+    }
+}
diff --git a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java
index 66be755..5ed7197 100644
--- a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor6.java
@@ -74,6 +74,8 @@
  * @author Joseph D. Darcy
  * @author Scott Seligman
  * @author Peter von der Ah&eacute;
+ *
+ * @see TypeKindVisitor7
  * @since 1.6
  */
 @SupportedSourceVersion(RELEASE_6)
diff --git a/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java
new file mode 100644
index 0000000..2020800
--- /dev/null
+++ b/langtools/src/share/classes/javax/lang/model/util/TypeKindVisitor7.java
@@ -0,0 +1,95 @@
+/*
+ * Copyright (c) 2010, 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.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * 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 javax.lang.model.util;
+
+import javax.lang.model.type.*;
+import javax.annotation.processing.SupportedSourceVersion;
+import static javax.lang.model.element.ElementKind.*;
+import static javax.lang.model.SourceVersion.*;
+import javax.lang.model.SourceVersion;
+
+/**
+ * A visitor of types based on their {@linkplain TypeKind kind} with
+ * default behavior appropriate for the {@link SourceVersion#RELEASE_7
+ * RELEASE_7} source version.  For {@linkplain
+ * TypeMirror types} <tt><i>XYZ</i></tt> that may have more than one
+ * kind, the <tt>visit<i>XYZ</i></tt> methods in this class delegate
+ * to the <tt>visit<i>XYZKind</i></tt> method corresponding to the
+ * first argument's kind.  The <tt>visit<i>XYZKind</i></tt> methods
+ * call {@link #defaultAction defaultAction}, passing their arguments
+ * to {@code defaultAction}'s corresponding parameters.
+ *
+ * <p> Methods in this class may be overridden subject to their
+ * general contract.  Note that annotating methods in concrete
+ * subclasses with {@link java.lang.Override @Override} will help
+ * ensure that methods are overridden as intended.
+ *
+ * <p> <b>WARNING:</b> The {@code TypeVisitor} interface implemented
+ * by this class may have methods added to it in the future to
+ * accommodate new, currently unknown, language structures added to
+ * future versions of the Java&trade; programming language.
+ * Therefore, methods whose names begin with {@code "visit"} may be
+ * added to this class in the future; to avoid incompatibilities,
+ * classes which extend this class should not declare any instance
+ * methods with names beginning with {@code "visit"}.
+ *
+ * <p>When such a new visit method is added, the default
+ * implementation in this class will be to call the {@link
+ * #visitUnknown visitUnknown} method.  A new type kind visitor class
+ * will also be introduced to correspond to the new language level;
+ * this visitor will have different default behavior for the visit
+ * method in question.  When the new visitor is introduced, all or
+ * portions of this visitor may be deprecated.
+ *
+ * @param <R> the return type of this visitor's methods.  Use {@link
+ *            Void} for visitors that do not need to return results.
+ * @param <P> the type of the additional parameter to this visitor's
+ *            methods.  Use {@code Void} for visitors that do not need an
+ *            additional parameter.
+ *
+ * @see TypeKindVisitor6
+ * @since 1.7
+ */
+@SupportedSourceVersion(RELEASE_7)
+public class TypeKindVisitor7<R, P> extends TypeKindVisitor6<R, P> {
+    /**
+     * Constructor for concrete subclasses to call; uses {@code null}
+     * for the default value.
+     */
+    protected TypeKindVisitor7() {
+        super(null);
+    }
+
+    /**
+     * Constructor for concrete subclasses to call; uses the argument
+     * for the default value.
+     *
+     * @param defaultValue the value to assign to {@link #DEFAULT_VALUE}
+     */
+    protected TypeKindVisitor7(R defaultValue) {
+        super(defaultValue);
+    }
+}
diff --git a/langtools/src/share/classes/javax/tools/JavaFileManager.java b/langtools/src/share/classes/javax/tools/JavaFileManager.java
index b82598d..f289d09 100644
--- a/langtools/src/share/classes/javax/tools/JavaFileManager.java
+++ b/langtools/src/share/classes/javax/tools/JavaFileManager.java
@@ -256,7 +256,7 @@
      *
      * <p>Optionally, this file manager might consider the sibling as
      * a hint for where to place the output.  The exact semantics of
-     * this hint is unspecified.  Sun's compiler, javac, for
+     * this hint is unspecified.  The JDK compiler, javac, for
      * example, will place class files in the same directories as
      * originating source files unless a class file output directory
      * is provided.  To facilitate this behavior, javac might provide
@@ -338,7 +338,7 @@
      *
      * <p>Optionally, this file manager might consider the sibling as
      * a hint for where to place the output.  The exact semantics of
-     * this hint is unspecified.  Sun's compiler, javac, for
+     * this hint is unspecified.  The JDK compiler, javac, for
      * example, will place class files in the same directories as
      * originating source files unless a class file output directory
      * is provided.  To facilitate this behavior, javac might provide
diff --git a/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java b/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java
index 1c7ff60..fb1d449 100644
--- a/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java
+++ b/langtools/src/share/sample/javac/processing/src/CheckNamesProcessor.java
@@ -138,7 +138,7 @@
     public SourceVersion getSupportedSourceVersion() {
         /*
          * Return latest source version instead of a fixed version
-         * like RELEASE_6.  To return a fixed version, this class
+         * like RELEASE_7.  To return a fixed version, this class
          * could be annotated with a SupportedSourceVersion
          * annotation.
          *
@@ -190,7 +190,7 @@
         /**
          * Visitor to implement name checks.
          */
-        private class NameCheckScanner extends ElementScanner6<Void, Void> {
+        private class NameCheckScanner extends ElementScanner7<Void, Void> {
             // The visitor could be enhanced to return true/false if
             // there were warnings reported or a count of the number
             // of warnings.  This could be facilitated by using
@@ -312,7 +312,7 @@
             @Override
             public Void visitUnknown(Element e, Void p) {
                 // This method will be called if a kind of element
-                // added after JDK 6 is visited.  Since as of this
+                // added after JDK 7 is visited.  Since as of this
                 // writing the conventions for such constructs aren't
                 // known, issue a warning.
                 messager.printMessage(WARNING,
diff --git a/langtools/test/tools/apt/mirror/declaration/pkg1/pkg2/package.html b/langtools/test/tools/apt/mirror/declaration/pkg1/pkg2/package.html
index 39bab30..f3a82a1 100644
--- a/langtools/test/tools/apt/mirror/declaration/pkg1/pkg2/package.html
+++ b/langtools/test/tools/apt/mirror/declaration/pkg1/pkg2/package.html
@@ -24,7 +24,6 @@
 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.
-
 -->
 
 </head>
diff --git a/langtools/test/tools/javac/6402516/CheckLocalElements.java b/langtools/test/tools/javac/6402516/CheckLocalElements.java
index f5cd63b..2e4f477 100644
--- a/langtools/test/tools/javac/6402516/CheckLocalElements.java
+++ b/langtools/test/tools/javac/6402516/CheckLocalElements.java
@@ -95,7 +95,7 @@
         return encl == null ? "" : encl.accept(qualNameVisitor, null);
     }
 
-    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor6<String,Void>() {
+    private ElementVisitor<String,Void> qualNameVisitor = new SimpleElementVisitor7<String,Void>() {
         protected String defaultAction(Element e, Void ignore) {
             return "";
         }
diff --git a/langtools/test/tools/javac/6948381/T6948381.java b/langtools/test/tools/javac/6948381/T6948381.java
index b16505c..ec5c8fe 100644
--- a/langtools/test/tools/javac/6948381/T6948381.java
+++ b/langtools/test/tools/javac/6948381/T6948381.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, 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
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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.
  */
 
 /**
diff --git a/langtools/test/tools/javac/6948381/npe/A.java b/langtools/test/tools/javac/6948381/npe/A.java
index 5545ff7..d299920 100644
--- a/langtools/test/tools/javac/6948381/npe/A.java
+++ b/langtools/test/tools/javac/6948381/npe/A.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, 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
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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 npe;
diff --git a/langtools/test/tools/javac/6948381/npe/B.java b/langtools/test/tools/javac/6948381/npe/B.java
index 7f2d5ec..32ffade 100644
--- a/langtools/test/tools/javac/6948381/npe/B.java
+++ b/langtools/test/tools/javac/6948381/npe/B.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, 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
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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 npe;
diff --git a/langtools/test/tools/javac/T6956638.java b/langtools/test/tools/javac/T6956638.java
new file mode 100644
index 0000000..98ed012
--- /dev/null
+++ b/langtools/test/tools/javac/T6956638.java
@@ -0,0 +1,156 @@
+/*
+ * Copyright (c) 2010, 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.io.BufferedWriter;
+import java.io.File;
+import java.io.FileWriter;
+import java.io.IOException;
+import java.io.StringWriter;
+import java.util.Arrays;
+import java.util.Iterator;
+import java.util.List;
+
+import javax.lang.model.element.Element;
+import javax.tools.DiagnosticCollector;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.StandardJavaFileManager;
+import javax.tools.ToolProvider;
+
+import com.sun.source.tree.CompilationUnitTree;
+import com.sun.source.util.JavacTask;
+
+/**
+ * @test
+ * @bug 6956638
+ * @summary JavacTask.generate does not generate all required files
+ */
+public class T6956638 {
+    public static void main(String[] args) throws Exception {
+        new T6956638().run();
+    }
+
+    void run() throws Exception {
+        File srcDir = new File("src");
+
+        File[] files = {
+            writeFile(new File(srcDir, "T1.java"),
+                "public class T1 extends T2 {}\n"),
+            writeFile(new File(srcDir, "T2.java"),
+                "public class T2 extends T3 {}\n"),
+            writeFile(new File(srcDir, "T3.java"),
+                "public class T3 { public static final int C = 1; }\n"),
+            writeFile(new File(srcDir, "Test.java"),
+                "public class Test { public static final int D = T1.C; }\n")
+        };
+
+        for (File f1: files) {
+            for (File f2: files) {
+                if (f2 == f1) continue;
+                for (File f3: files) {
+                    if (f3 == f2 || f3 == f1) continue;
+                    for (File f4: files) {
+                        if (f4 == f3 || f4 == f2 || f4 == f1) continue;
+                        try {
+                            test(f1, f2, f3, f4);
+                        } catch (Exception e) {
+                            error(e);
+                        }
+                    }
+                }
+            }
+        }
+
+        if (errors > 0)
+            throw new Exception(errors + " tests failed");
+    }
+
+    void test(File... sourceFiles) throws Exception {
+        System.err.println("Test " + (++count) + ": " + Arrays.asList(sourceFiles));
+
+        File classesDir = new File("classes" + count);
+        classesDir.mkdirs();
+
+        StringWriter compilerOutputStream = new StringWriter();
+
+        List<String> compileOptions = Arrays.asList("-d", classesDir.getPath());
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        DiagnosticCollector<JavaFileObject> diagnosticCollector = new DiagnosticCollector<JavaFileObject>();
+        StandardJavaFileManager fileManager = compiler.getStandardFileManager(diagnosticCollector, null, null);
+        Iterable<? extends JavaFileObject> sourceFileObjects = fileManager.getJavaFileObjects(sourceFiles);
+        System.err.println("1- javac given java source JavaFileObjects " + sourceFileObjects);
+        JavaCompiler.CompilationTask task = compiler.getTask(compilerOutputStream, fileManager, null, compileOptions, null, sourceFileObjects);
+        JavacTask javacTask = (JavacTask) task;
+
+        Iterable<? extends CompilationUnitTree> parsedTrees = javacTask.parse();
+        Iterable<? extends Element> analyzedTrees = javacTask.analyze();
+        Iterable<? extends JavaFileObject> generatedFiles = javacTask.generate();
+
+        System.err.println("2- parsed:" + size(parsedTrees) + " analysed:" + size(analyzedTrees) + " generated:" + size(generatedFiles));
+
+        System.err.print("3-");
+        for (JavaFileObject f : generatedFiles)
+            System.err.print(" " + f);
+        System.err.println("");
+
+        System.err.print("5-");
+        for (File f : classesDir.listFiles())
+            System.err.print(" " + f);
+        System.err.println("");
+
+        System.err.println("----");
+        System.err.println(compilerOutputStream.toString());
+
+        if (size(generatedFiles) != size(parsedTrees)) {
+            throw new Exception("wrong number of files generated: " + size(generatedFiles)
+                    + " expected: " + size(parsedTrees));
+        }
+    }
+
+    private void error(Throwable t) {
+        t.printStackTrace();
+        errors++;
+    }
+
+    int count;
+    int errors;
+
+    private static <E> int size(Iterable<E> x) {
+        int n = 0;
+        for (Iterator<E> iter = x.iterator(); iter.hasNext(); ++n)
+            iter.next();
+        return n;
+    }
+
+    private static File writeFile(File f, String str) throws IOException {
+        f.getParentFile().mkdirs();
+        BufferedWriter fout = new BufferedWriter(new FileWriter(f));
+        try {
+            fout.write(str);
+            fout.flush();
+        } finally {
+            fout.close();
+        }
+        return f;
+    }
+}
diff --git a/langtools/test/tools/javac/api/TestOperators.java b/langtools/test/tools/javac/api/TestOperators.java
index 3db59e0..fa11740 100644
--- a/langtools/test/tools/javac/api/TestOperators.java
+++ b/langtools/test/tools/javac/api/TestOperators.java
@@ -299,7 +299,7 @@
         final Trees trees = Trees.instance(processingEnv);
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
-        class Scan extends ElementScanner6<Void,Void> {
+        class Scan extends ElementScanner7<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 Object debug = e; // info for exception handler
diff --git a/langtools/test/tools/javac/api/evalexpr/ByteArrayClassLoader.java b/langtools/test/tools/javac/api/evalexpr/ByteArrayClassLoader.java
index e61bbd1..e0bd100 100644
--- a/langtools/test/tools/javac/api/evalexpr/ByteArrayClassLoader.java
+++ b/langtools/test/tools/javac/api/evalexpr/ByteArrayClassLoader.java
@@ -28,7 +28,7 @@
 /**
  * A class loader which loads classes from byte arrays.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/test/tools/javac/api/evalexpr/CompileFromString.java b/langtools/test/tools/javac/api/evalexpr/CompileFromString.java
index c9356e8..34a7242 100644
--- a/langtools/test/tools/javac/api/evalexpr/CompileFromString.java
+++ b/langtools/test/tools/javac/api/evalexpr/CompileFromString.java
@@ -32,7 +32,7 @@
 /**
  * JSR 199 Demo application: compile from a String.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/test/tools/javac/api/evalexpr/MemoryFileManager.java b/langtools/test/tools/javac/api/evalexpr/MemoryFileManager.java
index b0803f0..f3570c6 100644
--- a/langtools/test/tools/javac/api/evalexpr/MemoryFileManager.java
+++ b/langtools/test/tools/javac/api/evalexpr/MemoryFileManager.java
@@ -43,7 +43,7 @@
  * This file manager delegates to another file manager
  * to lookup classes on boot class path.
  *
- * <p><b>This is NOT part of any API supported by Sun Microsystems.
+ * <p><b>This is NOT part of any supported API.
  * If you write code that depends on this, you do so at your own
  * risk.  This code and its internal interfaces are subject to change
  * or deletion without notice.</b></p>
diff --git a/langtools/test/tools/javac/enum/6424358/T6424358.java b/langtools/test/tools/javac/enum/6424358/T6424358.java
index 26cf8a1..681a45c 100644
--- a/langtools/test/tools/javac/enum/6424358/T6424358.java
+++ b/langtools/test/tools/javac/enum/6424358/T6424358.java
@@ -48,7 +48,7 @@
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
         final TypeElement testMe = elements.getTypeElement("TestMe");
-        class Scan extends ElementScanner6<Void,Void> {
+        class Scan extends ElementScanner7<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 System.err.println("Looking at " + e);
diff --git a/langtools/test/tools/javac/generics/diamond/T6951833.java b/langtools/test/tools/javac/generics/diamond/T6951833.java
index f1bf51a..82729d9 100644
--- a/langtools/test/tools/javac/generics/diamond/T6951833.java
+++ b/langtools/test/tools/javac/generics/diamond/T6951833.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2010 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2010, 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
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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.
  */
 
 /*
diff --git a/langtools/test/tools/javac/generics/typevars/T6880344.java b/langtools/test/tools/javac/generics/typevars/T6880344.java
index 295721d..650ecb9 100644
--- a/langtools/test/tools/javac/generics/typevars/T6880344.java
+++ b/langtools/test/tools/javac/generics/typevars/T6880344.java
@@ -1,5 +1,5 @@
 /*
- * Copyright 2009 Sun Microsystems, Inc.  All Rights Reserved.
+ * Copyright (c) 2009, 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
@@ -16,9 +16,9 @@
  * 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara,
- * CA 95054 USA or visit www.sun.com if you need additional information or
- * have any questions.
+ * 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.
  */
 
 /*
diff --git a/langtools/test/tools/javac/processing/model/6194785/T6194785.java b/langtools/test/tools/javac/processing/model/6194785/T6194785.java
index 7646423..8b18b48 100644
--- a/langtools/test/tools/javac/processing/model/6194785/T6194785.java
+++ b/langtools/test/tools/javac/processing/model/6194785/T6194785.java
@@ -43,7 +43,7 @@
     {
         final Messager log = processingEnv.getMessager();
         final Elements elements = processingEnv.getElementUtils();
-        class Scan extends ElementScanner6<Void,Void> {
+        class Scan extends ElementScanner7<Void,Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void ignored) {
                 for (VariableElement p : e.getParameters())
diff --git a/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java b/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java
new file mode 100644
index 0000000..f7b6ca6
--- /dev/null
+++ b/langtools/test/tools/javac/processing/model/type/MirroredTypeEx/Plurality.java
@@ -0,0 +1,192 @@
+/*
+ * Copyright (c) 2010, 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     6519115
+ * @summary Verify MirroredTypeException vs MirroredTypesException is thrown
+ * @compile Plurality.java
+ * @compile -processor Plurality -proc:only Plurality.java
+ * @author  Joseph D. Darcy
+ */
+import java.lang.annotation.*;
+import java.math.BigDecimal;
+import java.util.*;
+import javax.annotation.processing.*;
+import javax.lang.model.*;
+import javax.lang.model.element.*;
+import javax.lang.model.type.*;
+import javax.lang.model.util.*;
+
+@SupportedAnnotationTypes("*")
+@P0
+@P1
+@P2
+@S1
+public class Plurality extends AbstractProcessor {
+    private boolean executed = false;
+
+    Elements elements;
+    Types types;
+
+    @Override
+    public void init(ProcessingEnvironment penv) {
+        super.init(penv);
+        elements = penv.getElementUtils();
+        types =  penv.getTypeUtils();
+    }
+
+
+    public boolean process(Set<? extends TypeElement> annotations,
+                           RoundEnvironment roundEnv) {
+        if (!roundEnv.processingOver()) {
+            executed = true;
+            // Processing just this type
+            Element e = elements.getTypeElement("Plurality");
+            Class[] classes = null;
+
+            P0 p0 = e.getAnnotation(P0.class);
+            try {
+                classes = p0.value();
+            } catch (MirroredTypesException mtse) {
+                if (mtse instanceof MirroredTypeException) {
+                    throw new RuntimeException("Wrong exception type!");
+                }
+
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 0)
+                    throw new RuntimeException("List size != 0: " +
+                                               types);
+            }
+
+            P1 p1 = e.getAnnotation(P1.class);
+            try {
+                classes = p1.value();
+            } catch (MirroredTypesException mtse) {
+                if (mtse instanceof MirroredTypeException) {
+                    throw new RuntimeException("Wrong exception type!");
+                }
+
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 1)
+                    throw new RuntimeException("List size != 1: " +
+                                               types);
+                checkTypeListMatchesClasses(types,
+                                            this.getClass().getAnnotation(P1.class).value());
+            }
+
+
+            P2 p2 = e.getAnnotation(P2.class);
+            try {
+                classes = p2.value();
+            } catch(MirroredTypesException mtse) {
+                if (mtse instanceof MirroredTypeException) {
+                    throw new RuntimeException("Wrong exception type!");
+                }
+
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 2)
+                    throw new RuntimeException("List size != 2: " +
+                                               types);
+                checkTypeListMatchesClasses(types,
+                                            this.getClass().getAnnotation(P2.class).value());
+            }
+
+            Class<?> clazz = null;
+            S1 s1 = e.getAnnotation(S1.class);
+            try {
+                clazz = s1.value();
+            } catch(MirroredTypesException mtse) {
+                List<? extends TypeMirror> types = mtse.getTypeMirrors();
+                if (types.size() != 1)
+                    throw new RuntimeException("List size != 1: " +
+                                               types);
+                Class<?>[] clazzes = new Class<?>[1];
+                clazzes[0] = this.getClass().getAnnotation(S1.class).value();
+                checkTypeListMatchesClasses(types,
+                                            clazzes);
+            }
+
+            try {
+                clazz = s1.value();
+            } catch(MirroredTypeException mte) {
+                TypeMirror type = mte.getTypeMirror();
+                if (type == null) {
+                    throw new RuntimeException("Expected null");
+                }
+                List<TypeMirror> types = new ArrayList<>();
+                types.add(type);
+                Class<?>[] clazzes = new Class<?>[1];
+                clazzes[0] = this.getClass().getAnnotation(S1.class).value();
+                checkTypeListMatchesClasses(types, clazzes);
+            }
+        } else {
+            if (!executed) {
+                throw new RuntimeException("Didn't seem to do anything!");
+            }
+        }
+        return true;
+    }
+
+    private static void checkTypeListMatchesClasses(List<? extends TypeMirror> types,
+                                               Class<?>[] classes) {
+        if (types.size() != classes.length)
+            throw new RuntimeException("Size mismatch:\n\t" + types +
+                                       "\n\t" + Arrays.toString(classes));
+        int i = -1;
+        for(Class<?> clazz : classes) {
+            i++;
+            String canonicalName = clazz.getCanonicalName();
+            String toStringName = types.get(i).toString();
+            if (!canonicalName.equals(toStringName))
+                throw new RuntimeException("Mismatched names: " +
+                                           canonicalName + "\t" +
+                                           toStringName);
+        }
+    }
+
+    @Override
+    public SourceVersion getSupportedSourceVersion() {
+        return SourceVersion.latest();
+    }
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface P0 {
+    Class[] value() default {};
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface P1 {
+    Class[] value() default {Integer.class};
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface P2 {
+    Class[] value() default {String.class, Number.class};
+}
+
+@Retention(RetentionPolicy.RUNTIME)
+@interface S1 {
+    Class value() default BigDecimal.class;
+}
diff --git a/langtools/test/tools/javac/processing/model/type/NoTypes.java b/langtools/test/tools/javac/processing/model/type/NoTypes.java
index ba67fc5..3e26d6f 100644
--- a/langtools/test/tools/javac/processing/model/type/NoTypes.java
+++ b/langtools/test/tools/javac/processing/model/type/NoTypes.java
@@ -89,7 +89,7 @@
         verifyKind(NONE, types.getNoType(NONE));
 
         // The return type of a constructor or void method is VOID.
-        class Scanner extends ElementScanner6<Void, Void> {
+        class Scanner extends ElementScanner7<Void, Void> {
             @Override
             public Void visitExecutable(ExecutableElement e, Void p) {
                 verifyKind(VOID, e.getReturnType());
@@ -104,10 +104,10 @@
 
     /**
      * Verify that a NoType instance is of a particular kind,
-     * and that TypeKindVisitor6 properly dispatches on it.
+     * and that TypeKindVisitor7 properly dispatches on it.
      */
     private void verifyKind(TypeKind kind, TypeMirror type) {
-        class Vis extends TypeKindVisitor6<TypeKind, Void> {
+        class Vis extends TypeKindVisitor7<TypeKind, Void> {
             @Override
             public TypeKind visitNoTypeAsVoid(NoType t, Void p) {
                 return VOID;
diff --git a/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java b/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java
index b3b7438..a7ff90b 100644
--- a/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java
+++ b/langtools/test/tools/javac/processing/model/util/deprecation/TestDeprecation.java
@@ -67,7 +67,7 @@
         return true;
     }
 
-    private class DeprecationChecker extends ElementScanner6<Boolean,Void> {
+    private class DeprecationChecker extends ElementScanner7<Boolean,Void> {
         private Elements elementUtils;
         private boolean failure;
         DeprecationChecker() {
diff --git a/langtools/test/tools/javac/varargs/6730476/T6730476a.java b/langtools/test/tools/javac/varargs/6730476/T6730476a.java
index b237f02..7eca3cb 100644
--- a/langtools/test/tools/javac/varargs/6730476/T6730476a.java
+++ b/langtools/test/tools/javac/varargs/6730476/T6730476a.java
@@ -27,7 +27,7 @@
  *
  * @summary invalid "unchecked generic array" warning
  * @author mcimadamore
- * @compile T6730476a.java -Xlint -Werror
+ * @compile T6730476a.java -Xlint:unchecked -Werror
  *
  */
 
diff --git a/langtools/test/tools/javac/varargs/6806876/T6806876.out b/langtools/test/tools/javac/varargs/6806876/T6806876.out
index 4ebb086..8d4ad3d 100644
--- a/langtools/test/tools/javac/varargs/6806876/T6806876.out
+++ b/langtools/test/tools/javac/varargs/6806876/T6806876.out
@@ -1,4 +1,6 @@
 T6806876.java:11:32: compiler.warn.unchecked.generic.array.creation: java.lang.Number&java.lang.Comparable<? extends java.lang.Number&java.lang.Comparable<?>>[]
 - compiler.err.warnings.and.werror
+- compiler.note.varargs.filename: T6806876.java
+- compiler.note.varargs.recompile
 1 error
 1 warning
diff --git a/langtools/test/tools/javac/varargs/warning/Warn4.java b/langtools/test/tools/javac/varargs/warning/Warn4.java
new file mode 100644
index 0000000..df63fdc
--- /dev/null
+++ b/langtools/test/tools/javac/varargs/warning/Warn4.java
@@ -0,0 +1,259 @@
+/*
+ * Copyright (c) 2010, 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     6945418
+ * @summary Project Coin: Simplified Varargs Method Invocation
+ * @author  mcimadamore
+ * @run main Warn4
+ */
+import com.sun.source.util.JavacTask;
+import java.net.URI;
+import java.util.Arrays;
+import java.util.Set;
+import java.util.HashSet;
+import javax.tools.Diagnostic;
+import javax.tools.JavaCompiler;
+import javax.tools.JavaFileObject;
+import javax.tools.SimpleJavaFileObject;
+import javax.tools.ToolProvider;
+
+public class Warn4 {
+
+    final static Warning[] error = null;
+    final static Warning[] none = new Warning[] {};
+    final static Warning[] vararg = new Warning[] { Warning.VARARGS };
+    final static Warning[] unchecked = new Warning[] { Warning.UNCHECKED };
+    final static Warning[] both = new Warning[] { Warning.VARARGS, Warning.UNCHECKED };
+
+    enum Warning {
+        UNCHECKED("unchecked"),
+        VARARGS("varargs");
+
+        String category;
+
+        Warning(String category) {
+            this.category = category;
+        }
+
+        boolean isEnabled(XlintOption xlint, SuppressLevel suppressLevel) {
+            return Arrays.asList(xlint.enabledWarnings).contains(this);
+        }
+
+        boolean isSuppressed(SuppressLevel suppressLevel) {
+            return Arrays.asList(suppressLevel.suppressedWarnings).contains(VARARGS);
+        }
+    }
+
+    enum XlintOption {
+        NONE(),
+        UNCHECKED(Warning.UNCHECKED),
+        VARARGS(Warning.VARARGS),
+        ALL(Warning.UNCHECKED, Warning.VARARGS);
+
+        Warning[] enabledWarnings;
+
+        XlintOption(Warning... enabledWarnings) {
+            this.enabledWarnings = enabledWarnings;
+        }
+
+        String getXlintOption() {
+            StringBuilder buf = new StringBuilder();
+            String sep = "";
+            for (Warning w : enabledWarnings) {
+                buf.append(sep);
+                buf.append(w.category);
+                sep=",";
+            }
+            return "-Xlint:" +
+                    (this == NONE ? "none" : buf.toString());
+        }
+    }
+
+    enum SuppressLevel {
+        NONE(),
+        UNCHECKED(Warning.UNCHECKED),
+        VARARGS(Warning.VARARGS),
+        ALL(Warning.UNCHECKED, Warning.VARARGS);
+
+        Warning[] suppressedWarnings;
+
+        SuppressLevel(Warning... suppressedWarnings) {
+            this.suppressedWarnings = suppressedWarnings;
+        }
+
+        String getSuppressAnnotation() {
+            StringBuilder buf = new StringBuilder();
+            String sep = "";
+            for (Warning w : suppressedWarnings) {
+                buf.append(sep);
+                buf.append("\"");
+                buf.append(w.category);
+                buf.append("\"");
+                sep=",";
+            }
+            return this == NONE ? "" :
+                "@SuppressWarnings({" + buf.toString() + "})";
+        }
+    }
+
+    enum Signature {
+
+        EXTENDS_TVAR("<Z> void #name(List<? extends Z>#arity arg) { #body }",
+            new Warning[][] {both, both, both, both, error, both, both, both, error}),
+        SUPER_TVAR("<Z> void #name(List<? super Z>#arity arg) { #body }",
+            new Warning[][] {error, both, error, both, error, error, both, both, error}),
+        UNBOUND("void #name(List<?>#arity arg) { #body }",
+            new Warning[][] {none, none, none, none, none, none, none, none, error}),
+        INVARIANT_TVAR("<Z> void #name(List<Z>#arity arg) { #body }",
+            new Warning[][] {both, both, both, both, error, both, both, both, error}),
+        TVAR("<Z> void #name(Z#arity arg) { #body }",
+            new Warning[][] {both, both, both, both, both, both, both, both, vararg}),
+        EXTENDS("void #name(List<? extends String>#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, both, error, both, error}),
+        SUPER("void #name(List<? super String>#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, error, both, both, error}),
+        INVARIANT("void #name(List<String>#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, error, error, both, error}),
+        UNPARAMETERIZED("void #name(String#arity arg) { #body }",
+            new Warning[][] {error, error, error, error, error, error, error, error, none});
+
+        String template;
+        Warning[][] warnings;
+
+        Signature(String template, Warning[][] warnings) {
+            this.template = template;
+            this.warnings = warnings;
+        }
+
+        boolean isApplicableTo(Signature other) {
+            return warnings[other.ordinal()] != null;
+        }
+
+        boolean giveUnchecked(Signature other) {
+            return warnings[other.ordinal()] == unchecked ||
+                    warnings[other.ordinal()] == both;
+        }
+
+        boolean giveVarargs(Signature other) {
+            return warnings[other.ordinal()] == vararg ||
+                    warnings[other.ordinal()] == both;
+        }
+    }
+
+    public static void main(String... args) throws Exception {
+        for (XlintOption xlint : XlintOption.values()) {
+            for (SuppressLevel suppressLevel : SuppressLevel.values()) {
+                for (Signature vararg_meth : Signature.values()) {
+                    for (Signature client_meth : Signature.values()) {
+                        if (vararg_meth.isApplicableTo(client_meth)) {
+                            test(xlint,
+                                    suppressLevel,
+                                    vararg_meth,
+                                    client_meth);
+                        }
+                    }
+                }
+            }
+        }
+    }
+
+    static void test(XlintOption xlint, SuppressLevel suppressLevel,
+            Signature vararg_meth, Signature client_meth) throws Exception {
+        final JavaCompiler tool = ToolProvider.getSystemJavaCompiler();
+        JavaSource source = new JavaSource(suppressLevel, vararg_meth, client_meth);
+        DiagnosticChecker dc = new DiagnosticChecker();
+        JavacTask ct = (JavacTask)tool.getTask(null, null, dc,
+                Arrays.asList(xlint.getXlintOption()), null, Arrays.asList(source));
+        ct.generate(); //to get mandatory notes
+        check(dc.warnings,
+                dc.notes,
+                new boolean[] {vararg_meth.giveUnchecked(client_meth),
+                               vararg_meth.giveVarargs(client_meth)},
+                source, xlint, suppressLevel);
+    }
+
+    static void check(Set<Warning> warnings, Set<Warning> notes, boolean[] warnArr, JavaSource source, XlintOption xlint, SuppressLevel suppressLevel) {
+        boolean badOutput = false;
+        for (Warning wkind : Warning.values()) {
+            badOutput |= (warnArr[wkind.ordinal()] && !wkind.isSuppressed(suppressLevel)) !=
+                    (wkind.isEnabled(xlint, suppressLevel) ?
+                        warnings.contains(wkind) :
+                        notes.contains(wkind));
+        }
+        if (badOutput) {
+            throw new Error("invalid diagnostics for source:\n" +
+                    source.getCharContent(true) +
+                    "\nOptions: " + xlint.getXlintOption() +
+                    "\nExpected unchecked warning: " + warnArr[0] +
+                    "\nExpected unsafe vararg warning: " + warnArr[1] +
+                    "\nWarnings: " + warnings +
+                    "\nNotes: " + notes);
+        }
+    }
+
+    static class JavaSource extends SimpleJavaFileObject {
+
+        String source;
+
+        public JavaSource(SuppressLevel suppressLevel, Signature vararg_meth, Signature client_meth) {
+            super(URI.create("myfo:/Test.java"), JavaFileObject.Kind.SOURCE);
+            String meth1 = vararg_meth.template.replace("#arity", "...");
+            meth1 = meth1.replace("#name", "m");
+            meth1 = meth1.replace("#body", "");
+            meth1 = suppressLevel.getSuppressAnnotation() + meth1;
+            String meth2 = client_meth.template.replace("#arity", "");
+            meth2 = meth2.replace("#name", "test");
+            meth2 = meth2.replace("#body", "m(arg);");
+            source = "import java.util.List;\n" +
+               "class Test {\n" + meth1 +
+               "\n" + meth2 + "\n}\n";
+        }
+
+        @Override
+        public CharSequence getCharContent(boolean ignoreEncodingErrors) {
+            return source;
+        }
+    }
+
+    static class DiagnosticChecker implements javax.tools.DiagnosticListener<JavaFileObject> {
+
+        Set<Warning> warnings = new HashSet<>();
+        Set<Warning> notes = new HashSet<>();
+
+        public void report(Diagnostic<? extends JavaFileObject> diagnostic) {
+            if (diagnostic.getKind() == Diagnostic.Kind.MANDATORY_WARNING ||
+                    diagnostic.getKind() == Diagnostic.Kind.WARNING) {
+                warnings.add(diagnostic.getCode().contains("varargs") ?
+                    Warning.VARARGS :
+                    Warning.UNCHECKED);
+            }
+            else if (diagnostic.getKind() == Diagnostic.Kind.NOTE) {
+                notes.add(diagnostic.getCode().contains("varargs") ?
+                    Warning.VARARGS :
+                    Warning.UNCHECKED);
+            }
+        }
+    }
+}
diff --git a/langtools/test/tools/javadoc/6958836/Test.java b/langtools/test/tools/javadoc/6958836/Test.java
new file mode 100644
index 0000000..b14949f
--- /dev/null
+++ b/langtools/test/tools/javadoc/6958836/Test.java
@@ -0,0 +1,120 @@
+/*
+ * Copyright (c) 2010, 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 6958836
+ * @summary javadoc should support -Xmaxerrs and -Xmaxwarns
+ */
+
+import java.io.*;
+import java.util.*;
+
+public class Test {
+    public static void main(String... args) throws Exception {
+        new Test().run();
+    }
+
+    void run() throws Exception {
+        javadoc("errs",  list(),                   10,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "0"), 10,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "2"),  2,  0);
+        javadoc("errs",  list("-Xmaxerrs",   "4"),  4,  0);
+        javadoc("errs",  list("-Xmaxerrs",  "20"), 10,  0);
+
+        javadoc("warns", list(),                    0, 10);
+        javadoc("warns", list("-Xmaxwarns",  "0"),  0, 10);
+        javadoc("warns", list("-Xmaxwarns",  "2"),  0,  2);
+        javadoc("warns", list("-Xmaxwarns",  "4"),  0,  4);
+        javadoc("warns", list("-Xmaxwarns", "20"),  0, 10);
+
+        if (errors > 0)
+            throw new Exception(errors + " errors occurred.");
+    }
+
+    void javadoc(String pkg, List<String> testOpts,
+                int expectErrs, int expectWarns) {
+        System.err.println("Test " + (++count) + ": " + pkg + " " + testOpts);
+        File testOutDir = new File("test" + count);
+
+        List<String> opts = new ArrayList<String>();
+        // Force en_US locale in lieu of something like -XDrawDiagnostics.
+        // For some reason, this must be the first option when used.
+        opts.addAll(list("-locale", "en_US"));
+        opts.addAll(list("-classpath", System.getProperty("test.src")));
+        opts.addAll(list("-d", testOutDir.getPath()));
+        opts.addAll(testOpts);
+        opts.add(pkg);
+
+        StringWriter errSW = new StringWriter();
+        PrintWriter errPW = new PrintWriter(errSW);
+        StringWriter warnSW = new StringWriter();
+        PrintWriter warnPW = new PrintWriter(warnSW);
+        StringWriter noteSW = new StringWriter();
+        PrintWriter notePW = new PrintWriter(noteSW);
+
+        int rc = com.sun.tools.javadoc.Main.execute("javadoc",
+                              errPW, warnPW, notePW,
+                              "com.sun.tools.doclets.standard.Standard",
+                              getClass().getClassLoader(),
+                              opts.toArray(new String[opts.size()]));
+        System.err.println("rc: " + rc);
+
+        errPW.close();
+        String errOut = errSW.toString();
+        System.err.println("Errors:\n" + errOut);
+        warnPW.close();
+        String warnOut = warnSW.toString();
+        System.err.println("Warnings:\n" + warnOut);
+        notePW.close();
+        String noteOut = noteSW.toString();
+        System.err.println("Notes:\n" + noteOut);
+
+        check(errOut, "Errors.java", expectErrs);
+        check(warnOut, " warning ", expectWarns); // requires -locale en_US
+    }
+
+    void check(String text, String expectText, int expectCount) {
+        int foundCount = 0;
+        for (String line: text.split("[\r\n]+")) {
+            if (line.contains(expectText))
+                foundCount++;
+        }
+        if (foundCount != expectCount) {
+            error("incorrect number of matches found: " + foundCount
+                  + ", expected: " + expectCount);
+        }
+    }
+
+    private List<String> list(String... args) {
+        return Arrays.asList(args);
+    }
+
+    void error(String msg) {
+        System.err.println(msg);
+        errors++;
+    }
+
+    int count;
+    int errors;
+}
diff --git a/langtools/test/tools/javadoc/6958836/errs/Errors.java b/langtools/test/tools/javadoc/6958836/errs/Errors.java
new file mode 100644
index 0000000..e68d01b
--- /dev/null
+++ b/langtools/test/tools/javadoc/6958836/errs/Errors.java
@@ -0,0 +1,38 @@
+/*
+ * Copyright (c) 2010, 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 errs;
+
+// class with 10 errors
+class Errors {
+    X m0() { }
+    X m1() { }
+    X m2() { }
+    X m3() { }
+    X m4() { }
+    X m5() { }
+    X m6() { }
+    X m7() { }
+    X m8() { }
+    X m9() { }
+}
diff --git a/langtools/test/tools/javadoc/6958836/warns/Warnings.java b/langtools/test/tools/javadoc/6958836/warns/Warnings.java
new file mode 100644
index 0000000..cf94711
--- /dev/null
+++ b/langtools/test/tools/javadoc/6958836/warns/Warnings.java
@@ -0,0 +1,57 @@
+/*
+ * Copyright (c) 2010, 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 warns;
+
+// class with 10 warnings
+public class Warnings {
+    /** @param x */
+    public void m0() { }
+
+    /** @param x */
+    public void m1() { }
+
+    /** @param x */
+    public void m2() { }
+
+    /** @param x */
+    public void m3() { }
+
+    /** @param x */
+    public void m4() { }
+
+    /** @param x */
+    public void m5() { }
+
+    /** @param x */
+    public void m6() { }
+
+    /** @param x */
+    public void m7() { }
+
+    /** @param x */
+    public void m8() { }
+
+    /** @param x */
+    public void m9() { }
+}