changeset 39180:bed7937d5ac4

Merge
author lana
date Thu, 23 Jun 2016 21:13:09 +0000
parents f6376d2489eb c04b68e23fa4
children e2526131d705
files langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/standard/Standard.java
diffstat 15 files changed, 452 insertions(+), 75 deletions(-) [+]
line wrap: on
line diff
--- a/langtools/make/build.xml	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/make/build.xml	Thu Jun 23 21:13:09 2016 +0000
@@ -235,7 +235,10 @@
     <target name="idea" depends="-check-langtools.jdk.home">
         <mkdir dir=".idea"/>
         <copy todir=".idea" >
-            <fileset dir="make/intellij" excludes="**/src/**"/>
+            <fileset dir="make/intellij">
+               <exclude name="**/src/**"/>
+               <exclude name="**/utils/**"/>
+            </fileset>
         </copy>
         <condition property="idea.jtreg.home" value="${jtreg.home}" else = "[jtreg.home]">
             <isset property="jtreg.home"/>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/diags-examples.xml	Thu Jun 23 21:13:09 2016 +0000
@@ -0,0 +1,124 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!--
+  ~ Copyright (c) 2016, 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.
+  -->
+
+<!--
+This is an extension to the langtools make/build.xml file,
+that provides targets to run the examples that generate
+example diagnostics in different locales.
+
+Usage:
+    ant -f langtools/make/run-examples.xml -Dlangtools.jdk.home=<JDK>
+
+By default, the reports will be generated in langtools/build/diags-examples/report/.
+-->
+
+<project name="diags-examples" default="diags-examples" basedir="..">
+    <import file="build.xml"/>
+
+    <!-- specify working directory for the tool -->
+    <property name="diags.examples.dir" location="${build.dir}/diag-examples"/>
+
+    <!-- compiled classes for the tool -->
+    <property name="diags.examples.classes" location="${diags.examples.dir}/classes}"/>
+
+    <!-- directory for generated reports -->
+    <property name="diags.examples.report" location="${diags.examples.dir}/report"/>
+
+    <!-- default target, generates reports for all available locales -->
+    <target name="diags-examples" depends="run-en_US,run-ja,run-zh_CN"/>
+
+    <!-- generate report for US English locale -->
+    <target name="run-en_US" depends="-build-runner,-def-runner">
+        <mkdir dir="${diags.examples.report}"/>
+        <runner lang="en" country="US" outfile="${diags.examples.report}/en_US.html"/>
+    </target>
+
+    <!-- generate report for Japanese locale -->
+    <target name="run-ja" depends="-build-runner,-def-runner">
+        <mkdir dir="${diags.examples.report}"/>
+        <runner lang="ja" outfile="${diags.examples.report}/ja.html"/>
+    </target>
+
+    <!-- generate report for Mandarin Chinese locale -->
+    <target name="run-zh_CN" depends="-build-runner,-def-runner">
+        <mkdir dir="${diags.examples.report}"/>
+        <runner lang="zh" country="CN" outfile="${diags.examples.report}/zh_CN.html"/>
+    </target>
+
+    <!-- compile the tool that runs the examples -->
+    <target name="-build-runner" depends="build">
+        <mkdir dir="${diags.examples.classes}"/>
+        <javac fork="true"
+            executable="${build.bin}/javac"
+            srcdir="test/tools/javac/diags"
+            destdir="${diags.examples.classes}"
+            includes="ArgTypeCompilerFactory.java,Example.java,FileManager.java,HTMLWriter.java,RunExamples.java,DocCommentProcessor.java"
+            sourcepath=""
+            includeAntRuntime="no"
+            debug="${javac.debug}"
+            debuglevel="${javac.debuglevel}">
+            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
+            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
+            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
+            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
+            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
+            <compilerarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
+        </javac>
+    </target>
+
+    <!-- define a task to run the tool that runs the examples -->
+    <target name="-def-runner">
+        <macrodef name="runner">
+            <attribute name="lang"/>
+            <attribute name="country" default=""/>
+            <attribute name="outfile"/>
+            <sequential>
+            <java fork="true"
+                  jvm="${langtools.jdk.home}/bin/java"
+                  dir="test/tools/javac/diags"
+                  classpath="${diags.examples.classes};${dist.lib.dir}/javac.jar;${dist.lib.dir}/javap.jar"
+                  classname="RunExamples">
+                <jvmarg value="-Duser.language=@{lang}"/>
+                <jvmarg value="-Duser.country=@{country}"/>
+                <jvmarg value="-Dtest.classes=${diags.examples.classes}"/>
+                <arg value="-examples"/>
+                <arg value="examples"/>
+                <arg value="-o"/>
+                <arg file="@{outfile}"/>
+                <arg value="-showFiles"/>
+                <arg value="-title"/>
+                <arg value="Examples of javac diagnostics"/>
+                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.api=ALL-UNNAMED"/>
+                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.code=ALL-UNNAMED"/>
+                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.file=ALL-UNNAMED"/>
+                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.main=ALL-UNNAMED"/>
+                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED"/>
+                <jvmarg line="-XaddExports:jdk.compiler/com.sun.tools.javac.util=ALL-UNNAMED"/>
+            </java>
+            </sequential>
+        </macrodef>
+    </target>
+</project>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/make/intellij/utils/jtreg-live-templates.xml	Thu Jun 23 21:13:09 2016 +0000
@@ -0,0 +1,25 @@
+<!-- 
+The following live template declarations allow for automatic generation of jtreg test headers.
+Unfortunately, live templates cannot be shared on a per project base, but they can be easily imported
+by cutting and paste the following lines inside IntelliJ LiveTemplate settings (this will need to be done only once).
+-->
+     
+<template name="@test" value="@test&#10;* @bug $BUG_ID$&#10;* @summary $BUG_SUMMARY$&#10;* $JTREG_ACTION$ $FILE_NAME$" description="jtreg header (positive test)" toReformat="false" toShortenFQNames="true">
+  <variable name="BUG_ID" expression="groovyScript(&quot;_1 ==~ /T\\d{7}/ ? _1.substring(1).take(7) : 'NNNNNNN'&quot;, fileNameWithoutExtension())" defaultValue="" alwaysStopAt="true" />
+  <variable name="BUG_SUMMARY" expression="&quot;Bug summary&quot;" defaultValue="" alwaysStopAt="true" />
+  <variable name="JTREG_ACTION" expression="&quot;@compile&quot;" defaultValue="" alwaysStopAt="true" />
+  <variable name="FILE_NAME" expression="fileName()" defaultValue="" alwaysStopAt="true" />
+  <context>
+    <option name="JAVA_COMMENT" value="true" />
+  </context>
+</template>
+<template name="@test /nodynamiccopyright/" value="@test&#10;* @bug $BUG_ID$&#10;* @summary $BUG_SUMMARY$&#10;* $JTREG_ACTION$/fail/ref=$GOLDEN_NAME$ -XDrawDiagnostics $FILE_NAME$" description="jtreg header (negative test)" toReformat="false" toShortenFQNames="true">
+  <variable name="BUG_ID" expression="groovyScript(&quot;_1 ==~ /T\\d{7}/ ? _1.substring(1).take(7) : 'NNNNNNN'&quot;, fileNameWithoutExtension())" defaultValue="NNNNNNN" alwaysStopAt="true" />
+  <variable name="BUG_SUMMARY" expression="&quot;Bug summary&quot;" defaultValue="" alwaysStopAt="true" />
+  <variable name="JTREG_ACTION" expression="&quot;@compile&quot;" defaultValue="" alwaysStopAt="true" />
+  <variable name="GOLDEN_NAME" expression="groovyScript(&quot;_1 + '.out'&quot;, fileNameWithoutExtension())" defaultValue="out.txt" alwaysStopAt="true" />
+  <variable name="FILE_NAME" expression="fileName()" defaultValue="" alwaysStopAt="true" />
+  <context>
+    <option name="JAVA_COMMENT" value="true" />
+  </context>
+</template>
--- a/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/src/jdk.compiler/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Jun 23 21:13:09 2016 +0000
@@ -1039,7 +1039,8 @@
                             if (start_pc == 0) {
                                 // ensure array large enough
                                 if (register >= parameterNameIndices.length) {
-                                    int newSize = Math.max(register, parameterNameIndices.length + 8);
+                                    int newSize =
+                                            Math.max(register + 1, parameterNameIndices.length + 8);
                                     parameterNameIndices =
                                             Arrays.copyOf(parameterNameIndices, newSize);
                                 }
--- a/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/standard/Standard.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/com/sun/tools/doclets/standard/Standard.java	Thu Jun 23 21:13:09 2016 +0000
@@ -28,6 +28,11 @@
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.formats.html.*;
 
+/**
+ * This doclet generates HTML-formatted documentation for the specified packages and types.
+ * @deprecated The doclet has been superseded by its replacement,
+ * {@code jdk.javadoc.doclets.StandardDoclet}.
+ */
 @Deprecated
 public class Standard {
 
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/StandardDoclet.java	Thu Jun 23 21:13:09 2016 +0000
@@ -0,0 +1,68 @@
+/*
+ * Copyright (c) 2003, 2015, 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 jdk.javadoc.doclets;
+
+import java.util.Locale;
+import java.util.Set;
+
+import javax.lang.model.SourceVersion;
+
+import jdk.javadoc.doclet.Doclet;
+import jdk.javadoc.doclet.DocletEnvironment;
+import jdk.javadoc.doclet.Reporter;
+import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
+
+/**
+ * This doclet generates HTML-formatted documentation for the specified modules, packages and types.
+ */
+public class StandardDoclet implements Doclet {
+
+    private final HtmlDoclet htmlDoclet;
+
+    public StandardDoclet() {
+        htmlDoclet = new HtmlDoclet();
+    }
+
+    public void init(Locale locale, Reporter reporter) {
+        htmlDoclet.init(locale, reporter);
+    }
+
+    public String getName() {
+        return "Standard";
+    }
+
+    public Set<Doclet.Option> getSupportedOptions() {
+        return htmlDoclet.getSupportedOptions();
+    }
+
+    public SourceVersion getSupportedSourceVersion() {
+        return htmlDoclet.sourceVersion();
+    }
+
+    public boolean run(DocletEnvironment root) {
+        return htmlDoclet.run(root);
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/doclets/package-info.java	Thu Jun 23 21:13:09 2016 +0000
@@ -0,0 +1,30 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+
+/**
+ * This package contains standard, supported doclets.
+ */
+package jdk.javadoc.doclets;
+
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/standard/Standard.java	Thu Jun 23 20:35:16 2016 +0000
+++ /dev/null	Thu Jan 01 00:00:00 1970 +0000
@@ -1,65 +0,0 @@
-/*
- * Copyright (c) 2003, 2015, 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 jdk.javadoc.internal.doclets.standard;
-
-import java.util.Locale;
-import java.util.Set;
-
-import javax.lang.model.SourceVersion;
-
-import jdk.javadoc.doclet.Doclet;
-import jdk.javadoc.doclet.DocletEnvironment;
-import jdk.javadoc.doclet.Reporter;
-import jdk.javadoc.internal.doclets.formats.html.HtmlDoclet;
-
-public class Standard implements Doclet {
-
-    private final HtmlDoclet htmlDoclet;
-
-    public Standard() {
-        htmlDoclet = new HtmlDoclet();
-    }
-
-    public void init(Locale locale, Reporter reporter) {
-        htmlDoclet.init(locale, reporter);
-    }
-
-    public String getName() {
-        return "Standard";
-    }
-
-    public Set<Doclet.Option> getSupportedOptions() {
-        return htmlDoclet.getSupportedOptions();
-    }
-
-    public SourceVersion getSupportedSourceVersion() {
-        return htmlDoclet.sourceVersion();
-    }
-
-    public boolean run(DocletEnvironment root) {
-        return htmlDoclet.run(root);
-    }
-}
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/tool/Start.java	Thu Jun 23 21:13:09 2016 +0000
@@ -86,7 +86,7 @@
             com.sun.tools.doclets.standard.Standard.class;
 
     private static final Class<?> StdDoclet =
-            jdk.javadoc.internal.doclets.standard.Standard.class;
+            jdk.javadoc.doclets.StandardDoclet.class;
     /** Context for this invocation. */
     private final Context context;
 
--- a/langtools/src/jdk.javadoc/share/classes/module-info.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/src/jdk.javadoc/share/classes/module-info.java	Thu Jun 23 21:13:09 2016 +0000
@@ -30,9 +30,12 @@
 
     exports com.sun.javadoc;
     exports com.sun.tools.doclets;
+    exports com.sun.tools.doclets.standard;
     exports com.sun.tools.javadoc;
+
     exports jdk.javadoc.doclet;
     exports jdk.javadoc.doclet.taglet;
+    exports jdk.javadoc.doclets;
 
     provides javax.tools.DocumentationTool
         with jdk.javadoc.internal.api.JavadocTool;
--- a/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/test/jdk/javadoc/tool/EnsureNewOldDoclet.java	Thu Jun 23 21:13:09 2016 +0000
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8035473 8154482
+ * @bug 8035473 8154482 8154399 8159096
  * @summary make sure the javadoc tool responds correctly to Xold,
  *          old doclets and taglets.
  * @library /tools/lib
@@ -87,7 +87,7 @@
             CLASS_NAME + "\\$OldTaglet.*");
 
     final static String OLD_STDDOCLET = "com.sun.tools.doclets.standard.Standard";
-    final static String NEW_STDDOCLET = "jdk.javadoc.internal.doclets.standard.Standard";
+    final static String NEW_STDDOCLET = "jdk.javadoc.doclets.StandardDoclet";
 
 
     public EnsureNewOldDoclet() throws Exception {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/T8136453/T.jcod	Thu Jun 23 21:13:09 2016 +0000
@@ -0,0 +1,112 @@
+/*
+ * Copyright (c) 2016, 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.
+ */
+class T {
+  0xCAFEBABE;
+  0; // minor version
+  52; // version
+  [] { // Constant Pool
+    ; // first element is empty
+    Method #3 #15; // #1
+    class #16; // #2
+    class #17; // #3
+    Utf8 "<init>"; // #4
+    Utf8 "()V"; // #5
+    Utf8 "Code"; // #6
+    Utf8 "LocalVariableTable"; // #7
+    Utf8 "this"; // #8
+    Utf8 "LT;"; // #9
+    Utf8 "test"; // #10
+    Utf8 "(I)I"; // #11
+    Utf8 "p"; // #12
+    Utf8 "I"; // #13
+    Utf8 "l1"; // #14
+    NameAndType #4 #5; // #15
+    Utf8 "T"; // #16
+    Utf8 "java/lang/Object"; // #17
+  } // Constant Pool
+
+  0x0021; // access
+  #2;// this_cpx
+  #3;// super_cpx
+
+  [] { // Interfaces
+  } // Interfaces
+
+  [] { // fields
+  } // fields
+
+  [] { // methods
+    { // Member
+      0x0001; // access
+      #4; // name_cpx
+      #5; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          1; // max_locals
+          Bytes[]{
+            0x2AB70001B1;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+            Attr(#7) { // LocalVariableTable
+              [] { // LocalVariableTable
+                0 5 8 9 0;
+              }
+            } // end LocalVariableTable
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+    ;
+    { // Member
+      0x0001; // access
+      #10; // name_cpx
+      #11; // sig_cpx
+      [] { // Attributes
+        Attr(#6) { // Code
+          1; // max_stack
+          3; // max_locals
+          Bytes[]{
+            0x033D1CAC;
+          };
+          [] { // Traps
+          } // end Traps
+          [] { // Attributes
+            Attr(#7) { // LocalVariableTable
+              [] { // LocalVariableTable
+                0 4 8 9 0;
+                0 4 12 13 1;
+                0 4 14 13 20;
+              }
+            } // end LocalVariableTable
+          } // Attributes
+        } // end Code
+      } // Attributes
+    } // Member
+  } // methods
+
+  [] { // Attributes
+  } // Attributes
+} // end class T
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/classfiles/attributes/LocalVariableTable/T8136453/T8136453.java	Thu Jun 23 21:13:09 2016 +0000
@@ -0,0 +1,64 @@
+/*
+ * Copyright (c) 2016, 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 8136453
+ * @summary Checking that javac's ClassReader expands its parameterNameIndices array properly.
+ * @modules jdk.compiler
+ * @build T T8136453
+ * @run main T8136453
+ */
+
+import java.util.Arrays;
+import java.util.List;
+
+import javax.lang.model.element.ExecutableElement;
+import javax.lang.model.element.Name;
+import javax.lang.model.element.TypeElement;
+import javax.lang.model.element.VariableElement;
+import javax.lang.model.util.ElementFilter;
+import javax.tools.JavaCompiler;
+import javax.tools.ToolProvider;
+
+import com.sun.source.util.JavacTask;
+
+public class T8136453 {
+    public static void main(String... args) {
+        new T8136453().run();
+    }
+
+    void run() {
+        JavaCompiler compiler = ToolProvider.getSystemJavaCompiler();
+        List<String> opts = Arrays.asList("-XDsave-parameter-names");
+        JavacTask task = (JavacTask) compiler.getTask(null, null, null, opts, null, null);
+        TypeElement t = task.getElements().getTypeElement("T");
+        ExecutableElement testMethod = ElementFilter.methodsIn(t.getEnclosedElements()).get(0);
+        VariableElement param = testMethod.getParameters().get(0);
+        Name paramName = param.getSimpleName();
+
+        if (!paramName.contentEquals("p")) {
+            throw new AssertionError("Wrong parameter name: " + paramName);
+        }
+    }
+}
--- a/langtools/test/tools/javac/diags/HTMLWriter.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/test/tools/javac/diags/HTMLWriter.java	Thu Jun 23 21:13:09 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1996, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1996, 2016, 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
@@ -40,7 +40,7 @@
      * @throws IOException if there is a problem writing to the underlying stream
      */
     public HTMLWriter(Writer out) throws IOException {
-        this(out, "<!DOCTYPE HTML PUBLIC \"-//W3C//DTD HTML 3.2//EN\">");
+        this(out, "<!DOCTYPE html\">");
     }
 
     /**
@@ -328,7 +328,7 @@
      */
     public void writeLink(File file, String body) throws IOException {
         startTag(A);
-        StringBuffer sb = new StringBuffer();
+        StringBuilder sb = new StringBuilder();
         String path = file.getPath().replace(File.separatorChar, '/');
         if (file.isAbsolute() && !path.startsWith("/"))
             sb.append('/');
@@ -472,13 +472,15 @@
     public static final String BORDER = "border";
     /** The HTML "br" tag. */
     public static final String BR = "br";
+    /** The HTML "charset" attribute. */
+    public static final String CHARSET  = "charset";
     /** The HTML "class" attribute. */
     public static final String CLASS  = "class";
     /** The HTML "classid" attribute. */
     public static final String CLASSID  = "classid";
     /** The HTML "code" tag. */
     public static final String CODE  = "code";
-    /** The HTML "color" attribte. */
+    /** The HTML "color" attribute. */
     public static final String COLOR  = "color";
     /** The HTML "col" attribute value. */
     public static final String COL = "col";
@@ -522,6 +524,8 @@
     public static final String LI = "li";
     /** The HTML "link" tag. */
     public static final String LINK = "link";
+    /** The HTML "meta" attribute. */
+    public static final String META = "meta";
     /** The HTML "name" attribute. */
     public static final String NAME = "name";
     /** The HTML "object" tag. */
--- a/langtools/test/tools/javac/diags/RunExamples.java	Thu Jun 23 20:35:16 2016 +0000
+++ b/langtools/test/tools/javac/diags/RunExamples.java	Thu Jun 23 21:13:09 2016 +0000
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2015, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 2016, 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
@@ -354,7 +354,10 @@
                 html.write(title);
                 html.endTag(HTMLWriter.TITLE);
             }
+            html.startTag(HTMLWriter.META);
+            html.writeAttr(HTMLWriter.CHARSET, "UTF-8");
             html.startTag(HTMLWriter.STYLE);
+            html.write(null); // revert to body text
             html.newLine();
             html.writeLine("div.file { background-color:#e0ffe0; margin-left:30px; margin-right:30px;\n"
                     + "  padding: 3px; border: thin solid silver; }");