Merge jdk8-b110

Thu, 26 Sep 2013 17:23:00 -0700

author
lana
date
Thu, 26 Sep 2013 17:23:00 -0700
changeset 2066
41541097533a
parent 2032
6f11dc295641
parent 2065
17653c4c22ec
child 2067
af6244ba81b6

Merge

     1.1 --- a/make/netbeans/langtools/build.xml	Thu Sep 26 10:43:55 2013 -0700
     1.2 +++ b/make/netbeans/langtools/build.xml	Thu Sep 26 17:23:00 2013 -0700
     1.3 @@ -55,18 +55,17 @@
     1.4          description="Build one or all langtools tools"
     1.5          />
     1.6  
     1.7 -    <condition property="bootstrap" value="bootstrap-" else="">
     1.8 +    <condition property="use_bootstrap" value="bootstrap-" else="">
     1.9          <isset property="langtools.tool.bootstrap"/>
    1.10      </condition>
    1.11 -
    1.12 -    <condition property="bcp" value="${build.bootstrap.dir}/classes" else="${build.classes.dir}">
    1.13 +    <condition property="with_bootclasspath" value="${build.bootstrap.dir}/classes" else="${build.classes.dir}">
    1.14          <isset property="langtools.tool.bootstrap"/>
    1.15      </condition>
    1.16  
    1.17      <target name="-build-tool" if="langtools.tool.name">
    1.18 -        <echo level="info" message="Building ${bootstrap}${langtools.tool.name}"/>
    1.19 +        <echo level="info" message="Building ${use_bootstrap}${langtools.tool.name}"/>
    1.20          <echo level="verbose" message="(Unset langtools.tool.name to build all tools)"/>
    1.21 -        <antcall target="build-${bootstrap}${langtools.tool.name}"/>
    1.22 +        <antcall target="build-${use_bootstrap}${langtools.tool.name}"/>
    1.23      </target>
    1.24  
    1.25      <target name="-build-all" unless="langtools.tool.name">
    1.26 @@ -97,9 +96,9 @@
    1.27  
    1.28      <target name="run" depends="-check-target.java.home,build,-def-run,-get-tool-and-args"
    1.29              description="run tool">
    1.30 -        <echo level="info" message="${bcp}"/>
    1.31 -        <echo level="info" message="Run ${bootstrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
    1.32 -        <run bcp="${bcp}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}"/>
    1.33 +        <echo level="info" message="${with_bootclasspath}"/>
    1.34 +        <echo level="info" message="Run ${use_bootstrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
    1.35 +        <run bcp="${with_bootclasspath}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}"/>
    1.36      </target>
    1.37  
    1.38      <!-- Run a selected class. (action: run.single;  shift-F6) -->
    1.39 @@ -145,9 +144,9 @@
    1.40      <!-- Debug tool in NetBeans. -->
    1.41  
    1.42      <target name="debug" depends="-check-target.java.home,-def-run,-def-start-debugger,-get-tool-and-args,build" if="netbeans.home">
    1.43 -        <echo level="info" message="Debug ${boostrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
    1.44 +        <echo level="info" message="Debug ${use_bootstrap}${langtools.tool.name} with args ${langtools.tool.args}"/>
    1.45          <start-debugger/>
    1.46 -        <run bcp="${bcp}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}" jpda.jvmargs="${jpda.jvmargs}"/>
    1.47 +        <run bcp="${with_bootclasspath}" mainclass="com.sun.tools.${langtools.tool.name}.Main" args="${langtools.tool.args}" jpda.jvmargs="${jpda.jvmargs}"/>
    1.48      </target>
    1.49  
    1.50      <!-- Debug a selected class . -->
    1.51 @@ -237,12 +236,12 @@
    1.52          <macrodef name="run">
    1.53              <attribute name="mainclass"/>
    1.54              <attribute name="args" default=""/>
    1.55 -            <attribute name="bcp" default="${build.classes.dir}"/>
    1.56 +            <attribute name="bcp" default="${with_bootclasspath}"/>
    1.57              <attribute name="jpda.jvmargs" default=""/>
    1.58  
    1.59              <sequential>
    1.60                  <java fork="true" jvm="${target.java}" classname="@{mainclass}">
    1.61 -                    <jvmarg line="-Xbootclasspath/p:${bcp}"/>
    1.62 +                    <jvmarg line="-Xbootclasspath/p:@{bcp}"/>
    1.63                      <jvmarg line="@{jpda.jvmargs}"/>
    1.64                      <arg line="@{args}"/>
    1.65                  </java>
     2.1 --- a/make/tools/anttasks/SelectToolTask.java	Thu Sep 26 10:43:55 2013 -0700
     2.2 +++ b/make/tools/anttasks/SelectToolTask.java	Thu Sep 26 17:23:00 2013 -0700
     2.3 @@ -87,8 +87,9 @@
     2.4              this(toolName, false);
     2.5          }
     2.6  
     2.7 -        ToolChoices(String toolName, boolean boostrap) {
     2.8 +        ToolChoices(String toolName, boolean bootstrap) {
     2.9              this.toolName = toolName;
    2.10 +            this.bootstrap = bootstrap;
    2.11          }
    2.12  
    2.13          @Override
     3.1 --- a/src/share/classes/com/sun/tools/classfile/Code_attribute.java	Thu Sep 26 10:43:55 2013 -0700
     3.2 +++ b/src/share/classes/com/sun/tools/classfile/Code_attribute.java	Thu Sep 26 17:23:00 2013 -0700
     3.3 @@ -61,9 +61,9 @@
     3.4          code_length = cr.readInt();
     3.5          code = new byte[code_length];
     3.6          cr.readFully(code);
     3.7 -        exception_table_langth = cr.readUnsignedShort();
     3.8 -        exception_table = new Exception_data[exception_table_langth];
     3.9 -        for (int i = 0; i < exception_table_langth; i++)
    3.10 +        exception_table_length = cr.readUnsignedShort();
    3.11 +        exception_table = new Exception_data[exception_table_length];
    3.12 +        for (int i = 0; i < exception_table_length; i++)
    3.13              exception_table[i] = new Exception_data(cr);
    3.14          attributes = new Attributes(cr);
    3.15      }
    3.16 @@ -139,7 +139,7 @@
    3.17      public final int max_locals;
    3.18      public final int code_length;
    3.19      public final byte[] code;
    3.20 -    public final int exception_table_langth;
    3.21 +    public final int exception_table_length;
    3.22      public final Exception_data[] exception_table;
    3.23      public final Attributes attributes;
    3.24  
     4.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Thu Sep 26 17:23:00 2013 -0700
     4.3 @@ -0,0 +1,301 @@
     4.4 +/*
     4.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
     4.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.7 + *
     4.8 + * This code is free software; you can redistribute it and/or modify it
     4.9 + * under the terms of the GNU General Public License version 2 only, as
    4.10 + * published by the Free Software Foundation.  Oracle designates this
    4.11 + * particular file as subject to the "Classpath" exception as provided
    4.12 + * by Oracle in the LICENSE file that accompanied this code.
    4.13 + *
    4.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
    4.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
    4.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
    4.17 + * version 2 for more details (a copy is included in the LICENSE file that
    4.18 + * accompanied this code).
    4.19 + *
    4.20 + * You should have received a copy of the GNU General Public License version
    4.21 + * 2 along with this work; if not, write to the Free Software Foundation,
    4.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
    4.23 + *
    4.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
    4.25 + * or visit www.oracle.com if you need additional information or have any
    4.26 + * questions.
    4.27 + */
    4.28 +
    4.29 +package com.sun.tools.doclets.formats.html;
    4.30 +
    4.31 +import java.io.*;
    4.32 +
    4.33 +import com.sun.javadoc.*;
    4.34 +import com.sun.tools.doclets.formats.html.markup.*;
    4.35 +import com.sun.tools.doclets.internal.toolkit.*;
    4.36 +
    4.37 +/**
    4.38 + * Writes annotation type field documentation in HTML format.
    4.39 + *
    4.40 + *  <p><b>This is NOT part of any supported API.
    4.41 + *  If you write code that depends on this, you do so at your own risk.
    4.42 + *  This code and its internal interfaces are subject to change or
    4.43 + *  deletion without notice.</b>
    4.44 + *
    4.45 + * @author Bhavesh Patel
    4.46 + */
    4.47 +public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter
    4.48 +    implements AnnotationTypeFieldWriter, MemberSummaryWriter {
    4.49 +
    4.50 +    /**
    4.51 +     * Construct a new AnnotationTypeFieldWriterImpl.
    4.52 +     *
    4.53 +     * @param writer         the writer that will write the output.
    4.54 +     * @param annotationType the AnnotationType that holds this member.
    4.55 +     */
    4.56 +    public AnnotationTypeFieldWriterImpl(SubWriterHolderWriter writer,
    4.57 +            AnnotationTypeDoc annotationType) {
    4.58 +        super(writer, annotationType);
    4.59 +    }
    4.60 +
    4.61 +    /**
    4.62 +     * {@inheritDoc}
    4.63 +     */
    4.64 +    public Content getMemberSummaryHeader(ClassDoc classDoc,
    4.65 +            Content memberSummaryTree) {
    4.66 +        memberSummaryTree.addContent(
    4.67 +                HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_SUMMARY);
    4.68 +        Content memberTree = writer.getMemberTreeHeader();
    4.69 +        writer.addSummaryHeader(this, classDoc, memberTree);
    4.70 +        return memberTree;
    4.71 +    }
    4.72 +
    4.73 +    /**
    4.74 +     * {@inheritDoc}
    4.75 +     */
    4.76 +    public Content getMemberTreeHeader() {
    4.77 +        return writer.getMemberTreeHeader();
    4.78 +    }
    4.79 +
    4.80 +    /**
    4.81 +     * {@inheritDoc}
    4.82 +     */
    4.83 +    public void addAnnotationFieldDetailsMarker(Content memberDetails) {
    4.84 +        memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_FIELD_DETAILS);
    4.85 +    }
    4.86 +
    4.87 +    /**
    4.88 +     * {@inheritDoc}
    4.89 +     */
    4.90 +    public void addAnnotationDetailsTreeHeader(ClassDoc classDoc,
    4.91 +            Content memberDetailsTree) {
    4.92 +        if (!writer.printedAnnotationFieldHeading) {
    4.93 +            memberDetailsTree.addContent(writer.getMarkerAnchor(
    4.94 +                    "annotation_type_field_detail"));
    4.95 +            Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
    4.96 +                    writer.fieldDetailsLabel);
    4.97 +            memberDetailsTree.addContent(heading);
    4.98 +            writer.printedAnnotationFieldHeading = true;
    4.99 +        }
   4.100 +    }
   4.101 +
   4.102 +    /**
   4.103 +     * {@inheritDoc}
   4.104 +     */
   4.105 +    public Content getAnnotationDocTreeHeader(MemberDoc member,
   4.106 +            Content annotationDetailsTree) {
   4.107 +        annotationDetailsTree.addContent(
   4.108 +                writer.getMarkerAnchor(member.name()));
   4.109 +        Content annotationDocTree = writer.getMemberTreeHeader();
   4.110 +        Content heading = new HtmlTree(HtmlConstants.MEMBER_HEADING);
   4.111 +        heading.addContent(member.name());
   4.112 +        annotationDocTree.addContent(heading);
   4.113 +        return annotationDocTree;
   4.114 +    }
   4.115 +
   4.116 +    /**
   4.117 +     * {@inheritDoc}
   4.118 +     */
   4.119 +    public Content getSignature(MemberDoc member) {
   4.120 +        Content pre = new HtmlTree(HtmlTag.PRE);
   4.121 +        writer.addAnnotationInfo(member, pre);
   4.122 +        addModifiers(member, pre);
   4.123 +        Content link =
   4.124 +                writer.getLink(new LinkInfoImpl(configuration,
   4.125 +                        LinkInfoImpl.Kind.MEMBER, getType(member)));
   4.126 +        pre.addContent(link);
   4.127 +        pre.addContent(writer.getSpace());
   4.128 +        if (configuration.linksource) {
   4.129 +            Content memberName = new StringContent(member.name());
   4.130 +            writer.addSrcLink(member, memberName, pre);
   4.131 +        } else {
   4.132 +            addName(member.name(), pre);
   4.133 +        }
   4.134 +        return pre;
   4.135 +    }
   4.136 +
   4.137 +    /**
   4.138 +     * {@inheritDoc}
   4.139 +     */
   4.140 +    public void addDeprecated(MemberDoc member, Content annotationDocTree) {
   4.141 +        addDeprecatedInfo(member, annotationDocTree);
   4.142 +    }
   4.143 +
   4.144 +    /**
   4.145 +     * {@inheritDoc}
   4.146 +     */
   4.147 +    public void addComments(MemberDoc member, Content annotationDocTree) {
   4.148 +        addComment(member, annotationDocTree);
   4.149 +    }
   4.150 +
   4.151 +    /**
   4.152 +     * {@inheritDoc}
   4.153 +     */
   4.154 +    public void addTags(MemberDoc member, Content annotationDocTree) {
   4.155 +        writer.addTagsInfo(member, annotationDocTree);
   4.156 +    }
   4.157 +
   4.158 +    /**
   4.159 +     * {@inheritDoc}
   4.160 +     */
   4.161 +    public Content getAnnotationDetails(Content annotationDetailsTree) {
   4.162 +        return getMemberTree(annotationDetailsTree);
   4.163 +    }
   4.164 +
   4.165 +    /**
   4.166 +     * {@inheritDoc}
   4.167 +     */
   4.168 +    public Content getAnnotationDoc(Content annotationDocTree,
   4.169 +            boolean isLastContent) {
   4.170 +        return getMemberTree(annotationDocTree, isLastContent);
   4.171 +    }
   4.172 +
   4.173 +    /**
   4.174 +     * Close the writer.
   4.175 +     */
   4.176 +    public void close() throws IOException {
   4.177 +        writer.close();
   4.178 +    }
   4.179 +
   4.180 +    /**
   4.181 +     * {@inheritDoc}
   4.182 +     */
   4.183 +    public void addSummaryLabel(Content memberTree) {
   4.184 +        Content label = HtmlTree.HEADING(HtmlConstants.SUMMARY_HEADING,
   4.185 +                writer.getResource("doclet.Field_Summary"));
   4.186 +        memberTree.addContent(label);
   4.187 +    }
   4.188 +
   4.189 +    /**
   4.190 +     * {@inheritDoc}
   4.191 +     */
   4.192 +    public String getTableSummary() {
   4.193 +        return configuration.getText("doclet.Member_Table_Summary",
   4.194 +                configuration.getText("doclet.Field_Summary"),
   4.195 +                configuration.getText("doclet.fields"));
   4.196 +    }
   4.197 +
   4.198 +    /**
   4.199 +     * {@inheritDoc}
   4.200 +     */
   4.201 +    public Content getCaption() {
   4.202 +        return configuration.getResource("doclet.Fields");
   4.203 +    }
   4.204 +
   4.205 +    /**
   4.206 +     * {@inheritDoc}
   4.207 +     */
   4.208 +    public String[] getSummaryTableHeader(ProgramElementDoc member) {
   4.209 +        String[] header = new String[] {
   4.210 +            writer.getModifierTypeHeader(),
   4.211 +            configuration.getText("doclet.0_and_1",
   4.212 +                    configuration.getText("doclet.Fields"),
   4.213 +                    configuration.getText("doclet.Description"))
   4.214 +        };
   4.215 +        return header;
   4.216 +    }
   4.217 +
   4.218 +    /**
   4.219 +     * {@inheritDoc}
   4.220 +     */
   4.221 +    public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
   4.222 +        memberTree.addContent(writer.getMarkerAnchor(
   4.223 +                "annotation_type_field_summary"));
   4.224 +    }
   4.225 +
   4.226 +    /**
   4.227 +     * {@inheritDoc}
   4.228 +     */
   4.229 +    public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
   4.230 +    }
   4.231 +
   4.232 +    /**
   4.233 +     * {@inheritDoc}
   4.234 +     */
   4.235 +    public void addInheritedSummaryLabel(ClassDoc cd, Content inheritedTree) {
   4.236 +    }
   4.237 +
   4.238 +    /**
   4.239 +     * {@inheritDoc}
   4.240 +     */
   4.241 +    protected void addSummaryLink(LinkInfoImpl.Kind context, ClassDoc cd, ProgramElementDoc member,
   4.242 +            Content tdSummary) {
   4.243 +        Content strong = HtmlTree.SPAN(HtmlStyle.strong,
   4.244 +                writer.getDocLink(context, (MemberDoc) member, member.name(), false));
   4.245 +        Content code = HtmlTree.CODE(strong);
   4.246 +        tdSummary.addContent(code);
   4.247 +    }
   4.248 +
   4.249 +    /**
   4.250 +     * {@inheritDoc}
   4.251 +     */
   4.252 +    protected void addInheritedSummaryLink(ClassDoc cd,
   4.253 +            ProgramElementDoc member, Content linksTree) {
   4.254 +        //Not applicable.
   4.255 +    }
   4.256 +
   4.257 +    /**
   4.258 +     * {@inheritDoc}
   4.259 +     */
   4.260 +    protected void addSummaryType(ProgramElementDoc member, Content tdSummaryType) {
   4.261 +        MemberDoc m = (MemberDoc)member;
   4.262 +        addModifierAndType(m, getType(m), tdSummaryType);
   4.263 +    }
   4.264 +
   4.265 +    /**
   4.266 +     * {@inheritDoc}
   4.267 +     */
   4.268 +    protected Content getDeprecatedLink(ProgramElementDoc member) {
   4.269 +        return writer.getDocLink(LinkInfoImpl.Kind.MEMBER,
   4.270 +                (MemberDoc) member, ((MemberDoc)member).qualifiedName());
   4.271 +    }
   4.272 +
   4.273 +    /**
   4.274 +     * {@inheritDoc}
   4.275 +     */
   4.276 +    protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
   4.277 +        if (link) {
   4.278 +            return writer.getHyperLink("annotation_type_field_summary",
   4.279 +                    writer.getResource("doclet.navField"));
   4.280 +        } else {
   4.281 +            return writer.getResource("doclet.navField");
   4.282 +        }
   4.283 +    }
   4.284 +
   4.285 +    /**
   4.286 +     * {@inheritDoc}
   4.287 +     */
   4.288 +    protected void addNavDetailLink(boolean link, Content liNav) {
   4.289 +        if (link) {
   4.290 +            liNav.addContent(writer.getHyperLink("annotation_type_field_detail",
   4.291 +                    writer.getResource("doclet.navField")));
   4.292 +        } else {
   4.293 +            liNav.addContent(writer.getResource("doclet.navField"));
   4.294 +        }
   4.295 +    }
   4.296 +
   4.297 +    private Type getType(MemberDoc member) {
   4.298 +        if (member instanceof FieldDoc) {
   4.299 +            return ((FieldDoc) member).type();
   4.300 +        } else {
   4.301 +            return ((MethodDoc) member).returnType();
   4.302 +        }
   4.303 +    }
   4.304 +}
     5.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Sep 26 10:43:55 2013 -0700
     5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Sep 26 17:23:00 2013 -0700
     5.3 @@ -71,6 +71,20 @@
     5.4      /**
     5.5       * {@inheritDoc}
     5.6       */
     5.7 +    public Content getMemberTreeHeader() {
     5.8 +        return writer.getMemberTreeHeader();
     5.9 +    }
    5.10 +
    5.11 +    /**
    5.12 +     * {@inheritDoc}
    5.13 +     */
    5.14 +    public void addAnnotationDetailsMarker(Content memberDetails) {
    5.15 +        memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_DETAILS);
    5.16 +    }
    5.17 +
    5.18 +    /**
    5.19 +     * {@inheritDoc}
    5.20 +     */
    5.21      public void addAnnotationDetailsTreeHeader(ClassDoc classDoc,
    5.22              Content memberDetailsTree) {
    5.23          if (!writer.printedAnnotationHeading) {
     6.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Sep 26 10:43:55 2013 -0700
     6.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java	Thu Sep 26 17:23:00 2013 -0700
     6.3 @@ -278,13 +278,6 @@
     6.4      /**
     6.5       * {@inheritDoc}
     6.6       */
     6.7 -    public void addAnnotationDetailsMarker(Content memberDetails) {
     6.8 -        memberDetails.addContent(HtmlConstants.START_OF_ANNOTATION_TYPE_DETAILS);
     6.9 -    }
    6.10 -
    6.11 -    /**
    6.12 -     * {@inheritDoc}
    6.13 -     */
    6.14      protected Content getNavLinkTree() {
    6.15          Content treeLinkContent = getHyperLink(DocPaths.PACKAGE_TREE,
    6.16                  treeLabel, "", "");
    6.17 @@ -319,6 +312,12 @@
    6.18          Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
    6.19          MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
    6.20                  configuration.getBuilderFactory().getMemberSummaryBuilder(this);
    6.21 +        Content liNavField = new HtmlTree(HtmlTag.LI);
    6.22 +        addNavSummaryLink(memberSummaryBuilder,
    6.23 +                "doclet.navField",
    6.24 +                VisibleMemberMap.ANNOTATION_TYPE_FIELDS, liNavField);
    6.25 +        addNavGap(liNavField);
    6.26 +        ulNav.addContent(liNavField);
    6.27          Content liNavReq = new HtmlTree(HtmlTag.LI);
    6.28          addNavSummaryLink(memberSummaryBuilder,
    6.29                  "doclet.navAnnotationTypeRequiredMember",
    6.30 @@ -364,12 +363,23 @@
    6.31          Content ulNav = HtmlTree.UL(HtmlStyle.subNavList, li);
    6.32          MemberSummaryBuilder memberSummaryBuilder = (MemberSummaryBuilder)
    6.33                  configuration.getBuilderFactory().getMemberSummaryBuilder(this);
    6.34 +        AbstractMemberWriter writerField =
    6.35 +                ((AbstractMemberWriter) memberSummaryBuilder.
    6.36 +                getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_FIELDS));
    6.37          AbstractMemberWriter writerOptional =
    6.38                  ((AbstractMemberWriter) memberSummaryBuilder.
    6.39                  getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL));
    6.40          AbstractMemberWriter writerRequired =
    6.41                  ((AbstractMemberWriter) memberSummaryBuilder.
    6.42                  getMemberSummaryWriter(VisibleMemberMap.ANNOTATION_TYPE_MEMBER_REQUIRED));
    6.43 +        Content liNavField = new HtmlTree(HtmlTag.LI);
    6.44 +        if (writerField != null){
    6.45 +            writerField.addNavDetailLink(annotationType.fields().length > 0, liNavField);
    6.46 +        } else {
    6.47 +            liNavField.addContent(getResource("doclet.navField"));
    6.48 +        }
    6.49 +        addNavGap(liNavField);
    6.50 +        ulNav.addContent(liNavField);
    6.51          if (writerOptional != null){
    6.52              Content liNavOpt = new HtmlTree(HtmlTag.LI);
    6.53              writerOptional.addNavDetailLink(annotationType.elements().length > 0, liNavOpt);
     7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Sep 26 10:43:55 2013 -0700
     7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Sep 26 17:23:00 2013 -0700
     7.3 @@ -85,6 +85,11 @@
     7.4      protected boolean printedAnnotationHeading = false;
     7.5  
     7.6      /**
     7.7 +     * To check whether annotation field heading is printed or not.
     7.8 +     */
     7.9 +    protected boolean printedAnnotationFieldHeading = false;
    7.10 +
    7.11 +    /**
    7.12       * To check whether the repeated annotations is documented or not.
    7.13       */
    7.14      private boolean isAnnotationDocumented = false;
     8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java	Thu Sep 26 10:43:55 2013 -0700
     8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/WriterFactoryImpl.java	Thu Sep 26 17:23:00 2013 -0700
     8.3 @@ -107,6 +107,16 @@
     8.4      /**
     8.5       * {@inheritDoc}
     8.6       */
     8.7 +    public AnnotationTypeFieldWriter
     8.8 +            getAnnotationTypeFieldWriter(AnnotationTypeWriter annotationTypeWriter) throws Exception {
     8.9 +        return new AnnotationTypeFieldWriterImpl(
    8.10 +            (SubWriterHolderWriter) annotationTypeWriter,
    8.11 +            annotationTypeWriter.getAnnotationTypeDoc());
    8.12 +    }
    8.13 +
    8.14 +    /**
    8.15 +     * {@inheritDoc}
    8.16 +     */
    8.17      public AnnotationTypeOptionalMemberWriter
    8.18              getAnnotationTypeOptionalMemberWriter(
    8.19          AnnotationTypeWriter annotationTypeWriter) throws Exception {
    8.20 @@ -202,6 +212,9 @@
    8.21          AnnotationTypeWriter annotationTypeWriter, int memberType)
    8.22      throws Exception {
    8.23          switch (memberType) {
    8.24 +            case VisibleMemberMap.ANNOTATION_TYPE_FIELDS:
    8.25 +                return (AnnotationTypeFieldWriterImpl)
    8.26 +                    getAnnotationTypeFieldWriter(annotationTypeWriter);
    8.27              case VisibleMemberMap.ANNOTATION_TYPE_MEMBER_OPTIONAL:
    8.28                  return (AnnotationTypeOptionalMemberWriterImpl)
    8.29                      getAnnotationTypeOptionalMemberWriter(annotationTypeWriter);
     9.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.java	Thu Sep 26 10:43:55 2013 -0700
     9.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlConstants.java	Thu Sep 26 17:23:00 2013 -0700
     9.3 @@ -94,6 +94,12 @@
     9.4              new Comment("=========== ANNOTATION TYPE REQUIRED MEMBER SUMMARY ===========");
     9.5  
     9.6      /**
     9.7 +     * Marker to identify start of annotation type required member summary.
     9.8 +     */
     9.9 +    public static final Content START_OF_ANNOTATION_TYPE_FIELD_SUMMARY =
    9.10 +            new Comment("=========== ANNOTATION TYPE FIELD SUMMARY ===========");
    9.11 +
    9.12 +    /**
    9.13       * Marker to identify start of constructor summary.
    9.14       */
    9.15      public static final Content START_OF_CONSTRUCTOR_SUMMARY =
    9.16 @@ -130,6 +136,12 @@
    9.17              new Comment("============ ANNOTATION TYPE MEMBER DETAIL ===========");
    9.18  
    9.19      /**
    9.20 +     * Marker to identify start of annotation type field details.
    9.21 +     */
    9.22 +    public static final Content START_OF_ANNOTATION_TYPE_FIELD_DETAILS =
    9.23 +            new Comment("============ ANNOTATION TYPE FIELD DETAIL ===========");
    9.24 +
    9.25 +    /**
    9.26       * Marker to identify start of method details.
    9.27       */
    9.28      public static final Content START_OF_METHOD_DETAILS =
    10.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Thu Sep 26 10:43:55 2013 -0700
    10.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Thu Sep 26 17:23:00 2013 -0700
    10.3 @@ -28,6 +28,7 @@
    10.4  import java.io.IOException;
    10.5  import java.io.Writer;
    10.6  import java.util.*;
    10.7 +import java.nio.charset.*;
    10.8  
    10.9  import com.sun.tools.doclets.internal.toolkit.Content;
   10.10  import com.sun.tools.doclets.internal.toolkit.util.*;
   10.11 @@ -164,6 +165,46 @@
   10.12      }
   10.13  
   10.14      /**
   10.15 +     * A set of ASCII URI characters to be left unencoded.
   10.16 +     */
   10.17 +    public static final BitSet NONENCODING_CHARS = new BitSet(256);
   10.18 +
   10.19 +    static {
   10.20 +        // alphabetic characters
   10.21 +        for (int i = 'a'; i <= 'z'; i++) {
   10.22 +            NONENCODING_CHARS.set(i);
   10.23 +        }
   10.24 +        for (int i = 'A'; i <= 'Z'; i++) {
   10.25 +            NONENCODING_CHARS.set(i);
   10.26 +        }
   10.27 +        // numeric characters
   10.28 +        for (int i = '0'; i <= '9'; i++) {
   10.29 +            NONENCODING_CHARS.set(i);
   10.30 +        }
   10.31 +        // Reserved characters as per RFC 3986. These are set of delimiting characters.
   10.32 +        String noEnc = ":/?#[]@!$&'()*+,;=";
   10.33 +        // Unreserved characters as per RFC 3986 which should not be percent encoded.
   10.34 +        noEnc += "-._~";
   10.35 +        for (int i = 0; i < noEnc.length(); i++) {
   10.36 +            NONENCODING_CHARS.set(noEnc.charAt(i));
   10.37 +        }
   10.38 +    }
   10.39 +
   10.40 +    private static String encodeURL(String url) {
   10.41 +        byte[] urlBytes = url.getBytes(Charset.forName("UTF-8"));
   10.42 +        StringBuilder sb = new StringBuilder();
   10.43 +        for (int i = 0; i < urlBytes.length; i++) {
   10.44 +            int c = urlBytes[i];
   10.45 +            if (NONENCODING_CHARS.get(c & 0xFF)) {
   10.46 +                sb.append((char) c);
   10.47 +            } else {
   10.48 +                sb.append(String.format("%%%02X", c & 0xFF));
   10.49 +            }
   10.50 +        }
   10.51 +        return sb.toString();
   10.52 +    }
   10.53 +
   10.54 +    /**
   10.55       * Generates an HTML anchor tag.
   10.56       *
   10.57       * @param ref reference url for the anchor tag
   10.58 @@ -172,7 +213,7 @@
   10.59       */
   10.60      public static HtmlTree A(String ref, Content body) {
   10.61          HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body));
   10.62 -        htmltree.addAttr(HtmlAttr.HREF, ref);
   10.63 +        htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref));
   10.64          return htmltree;
   10.65      }
   10.66  
    11.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu Sep 26 10:43:55 2013 -0700
    11.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu Sep 26 17:23:00 2013 -0700
    11.3 @@ -335,6 +335,12 @@
    11.4                  "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL +
    11.5                  "        targetPage = \"undefined\";" + DocletConstants.NL +
    11.6                  "    function validURL(url) {" + DocletConstants.NL +
    11.7 +                "        try {" + DocletConstants.NL +
    11.8 +                "            url = decodeURIComponent(url);" + DocletConstants.NL +
    11.9 +                "        }" + DocletConstants.NL +
   11.10 +                "        catch (error) {" + DocletConstants.NL +
   11.11 +                "            return false;" + DocletConstants.NL +
   11.12 +                "        }" + DocletConstants.NL +
   11.13                  "        var pos = url.indexOf(\".html\");" + DocletConstants.NL +
   11.14                  "        if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL +
   11.15                  "            return false;" + DocletConstants.NL +
   11.16 @@ -346,7 +352,8 @@
   11.17                  "            if ('a' <= ch && ch <= 'z' ||" + DocletConstants.NL +
   11.18                  "                    'A' <= ch && ch <= 'Z' ||" + DocletConstants.NL +
   11.19                  "                    ch == '$' ||" + DocletConstants.NL +
   11.20 -                "                    ch == '_') {" + DocletConstants.NL +
   11.21 +                "                    ch == '_' ||" + DocletConstants.NL +
   11.22 +                "                    ch.charCodeAt(0) > 127) {" + DocletConstants.NL +
   11.23                  "                allowNumber = true;" + DocletConstants.NL +
   11.24                  "                allowSep = true;" + DocletConstants.NL +
   11.25                  "            } else if ('0' <= ch && ch <= '9'" + DocletConstants.NL +
    12.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    12.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    12.3 @@ -185,9 +185,9 @@
    12.4  doclet.Groupname_already_used=-group\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u304A\u3044\u3066\u3001\u3059\u3067\u306B\u30B0\u30EB\u30FC\u30D7\u540D\u304C\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
    12.5  doclet.Same_package_name_used=\u30D1\u30C3\u30B1\u30FC\u30B8\u540D\u5F62\u5F0F\u304C2\u56DE\u4F7F\u7528\u3055\u308C\u3066\u3044\u307E\u3059: {0}
    12.6  doclet.exception_encountered={1}\u306E\u51E6\u7406\u4E2D\u306B\u4F8B\u5916\u304C\u767A\u751F\u3057\u307E\u3057\u305F\u3002\n{0}
    12.7 -doclet.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n-d <directory>                    \u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n-use                              \u30AF\u30E9\u30B9\u3068\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4F7F\u7528\u30DA\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\n-version                          @version\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-author                           @author\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-docfilessubdirs                  doc-file\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u518D\u5E30\u7684\u306B\u30B3\u30D4\u30FC\u3059\u308B\n-splitindex                       1\u5B57\u3054\u3068\u306B1\u30D5\u30A1\u30A4\u30EB\u306B\u7D22\u5F15\u3092\u5206\u5272\u3059\u308B\n-windowtitle <text>               \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7528\u306E\u30D6\u30E9\u30A6\u30B6\u30FB\u30A6\u30A3\u30F3\u30C9\u30A6\u30FB\u30BF\u30A4\u30C8\u30EB\n-doctitle <html-code>             \u6982\u8981\u30DA\u30FC\u30B8\u306B\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u3081\u308B\n-header <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u30D8\u30C3\u30C0\u30FC\u3092\u542B\u3081\u308B\n-footer <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u30D5\u30C3\u30BF\u30FC\u3092\u542B\u3081\u308B\n-top    <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u4E0A\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-bottom <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u4E0B\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-link <url>                       <url>\u306Bjavadoc\u51FA\u529B\u3078\u306E\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3059\u308B\n-linkoffline <url> <url2>         <url2>\u306B\u3042\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066<url>\u306Edocs\u306B\u30EA\u30F3\u30AF\u3059\u308B\n-excludedocfilessubdir <name1>:.. \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3059\u308B\n-group <name> <p1>:<p2>..         \u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\n-nocomment                        \u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n-nodeprecated                     @deprecated\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-noqualifier <name1>:<name2>:...  \u51FA\u529B\u304B\u3089\u4FEE\u98FE\u5B50\u306E\u30EA\u30B9\u30C8\u3092\u9664\u5916\u3059\u308B\n-nosince                          @since\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-notimestamp                      \u975E\u8868\u793A\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u9664\u5916\u3059\u308B\n-nodeprecatedlist                 \u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u306A\u3044\n-notree                           \u30AF\u30E9\u30B9\u968E\u5C64\u3092\u751F\u6210\u3057\u306A\u3044\n-noindex                          \u7D22\u5F15\u3092\u751F\u6210\u3057\u306A\u3044\n-nohelp                           \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u3092\u751F\u6210\u3057\u306A\u3044\n-nonavbar                         \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u3092\u751F\u6210\u3057\u306A\u3044\n-serialwarn                       @serial\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8B66\u544A\u3092\u751F\u6210\u3059\u308B\n-tag <name>:<locations>:<header>  \u5358\u4E00\u306E\u5F15\u6570\u3092\u6301\u3064\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u3092\u6307\u5B9A\u3059\u308B\n-taglet                           \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u767B\u9332\u3059\u308B\n-tagletpath                       \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u30D1\u30B9\n-Xdocrootparent \
    12.8 -<url>             \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B3\u30E1\u30F3\u30C8\u5185\u306E@docRoot(\u3053\u306E\u5F8C\u306B\u306F/..\u304C\u7D9A\u304F)\u306E\u3059\u3079\u3066\u306E\u51FA\u73FE\u7B87\u6240\u3092<url>\u3067\u7F6E\u63DB\u3059\u308B\n-charset <charset>                \u751F\u6210\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\n-helpfile <file>                  \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u306E\u30EA\u30F3\u30AF\u5148\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B\n-linksource                       HTML\u5F62\u5F0F\u3067\u30BD\u30FC\u30B9\u3092\u751F\u6210\u3059\u308B\n-sourcetab <tab length>           \u30BD\u30FC\u30B9\u5185\u306E\u30BF\u30D6\u306E\u7A7A\u767D\u6587\u5B57\u306E\u6570\u3092\u6307\u5B9A\u3059\u308B\n-keywords                         HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u308B\n-stylesheetfile <path>            \u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB\n-docencoding <name>               \u51FA\u529B\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D
    12.9 +doclet.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n-d <directory>                    \u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u306E\u8EE2\u9001\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n-use                              \u30AF\u30E9\u30B9\u3068\u30D1\u30C3\u30B1\u30FC\u30B8\u306E\u4F7F\u7528\u30DA\u30FC\u30B8\u3092\u4F5C\u6210\u3059\u308B\n-version                          @version\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-author                           @author\u30D1\u30E9\u30B0\u30E9\u30D5\u3092\u542B\u3081\u308B\n-docfilessubdirs                  doc-file\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u518D\u5E30\u7684\u306B\u30B3\u30D4\u30FC\u3059\u308B\n-splitindex                       1\u5B57\u3054\u3068\u306B1\u30D5\u30A1\u30A4\u30EB\u306B\u7D22\u5F15\u3092\u5206\u5272\u3059\u308B\n-windowtitle <text>               \u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u7528\u306E\u30D6\u30E9\u30A6\u30B6\u30FB\u30A6\u30A3\u30F3\u30C9\u30A6\u30FB\u30BF\u30A4\u30C8\u30EB\n-doctitle <html-code>             \u6982\u8981\u30DA\u30FC\u30B8\u306B\u30BF\u30A4\u30C8\u30EB\u3092\u542B\u3081\u308B\n-header <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u30D8\u30C3\u30C0\u30FC\u3092\u542B\u3081\u308B\n-footer <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u30D5\u30C3\u30BF\u30FC\u3092\u542B\u3081\u308B\n-top    <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u4E0A\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-bottom <html-code>               \u5404\u30DA\u30FC\u30B8\u306B\u4E0B\u90E8\u30C6\u30AD\u30B9\u30C8\u3092\u542B\u3081\u308B\n-link <url>                       <url>\u306Bjavadoc\u51FA\u529B\u3078\u306E\u30EA\u30F3\u30AF\u3092\u4F5C\u6210\u3059\u308B\n-linkoffline <url> <url2>         <url2>\u306B\u3042\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u4F7F\u7528\u3057\u3066<url>\u306Edocs\u306B\u30EA\u30F3\u30AF\u3059\u308B\n-excludedocfilessubdir <name1>:.. \u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u306Edoc-files\u30B5\u30D6\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\u3092\u3059\u3079\u3066\u9664\u5916\u3059\u308B\n-group <name> <p1>:<p2>..         \u6307\u5B9A\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6982\u8981\u30DA\u30FC\u30B8\u306B\u304A\u3044\u3066\u30B0\u30EB\u30FC\u30D7\u5316\u3059\u308B\n-nocomment                        \u8A18\u8FF0\u304A\u3088\u3073\u30BF\u30B0\u3092\u6291\u5236\u3057\u3066\u5BA3\u8A00\u306E\u307F\u3092\u751F\u6210\u3059\u308B\n-nodeprecated                     @deprecated\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-noqualifier <name1>:<name2>:...  \u51FA\u529B\u304B\u3089\u4FEE\u98FE\u5B50\u306E\u30EA\u30B9\u30C8\u3092\u9664\u5916\u3059\u308B\n-nosince                          @since\u60C5\u5831\u3092\u9664\u5916\u3059\u308B\n-notimestamp                      \u975E\u8868\u793A\u306E\u30BF\u30A4\u30E0\u30B9\u30BF\u30F3\u30D7\u3092\u9664\u5916\u3059\u308B\n-nodeprecatedlist                 \u975E\u63A8\u5968\u306E\u30EA\u30B9\u30C8\u3092\u751F\u6210\u3057\u306A\u3044\n-notree                           \u30AF\u30E9\u30B9\u968E\u5C64\u3092\u751F\u6210\u3057\u306A\u3044\n-noindex                          \u7D22\u5F15\u3092\u751F\u6210\u3057\u306A\u3044\n-nohelp                           \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u3092\u751F\u6210\u3057\u306A\u3044\n-nonavbar                         \u30CA\u30D3\u30B2\u30FC\u30B7\u30E7\u30F3\u30FB\u30D0\u30FC\u3092\u751F\u6210\u3057\u306A\u3044\n-serialwarn                       @serial\u30BF\u30B0\u306B\u95A2\u3059\u308B\u8B66\u544A\u3092\u751F\u6210\u3059\u308B\n-tag <name>:<locations>:<header>  \u5358\u4E00\u306E\u5F15\u6570\u3092\u6301\u3064\u30AB\u30B9\u30BF\u30E0\u30FB\u30BF\u30B0\u3092\u6307\u5B9A\u3059\u308B\n-taglet                           \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u5B8C\u5168\u4FEE\u98FE\u540D\u3092\u767B\u9332\u3059\u308B\n-tagletpath                       \u30BF\u30B0\u30EC\u30C3\u30C8\u306E\u30D1\u30B9\n-charset \
   12.10 +<charset>                \u751F\u6210\u3055\u308C\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30AF\u30ED\u30B9\u30D7\u30E9\u30C3\u30C8\u30D5\u30A9\u30FC\u30E0\u3067\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\n-helpfile <file>                  \u30D8\u30EB\u30D7\u30FB\u30EA\u30F3\u30AF\u306E\u30EA\u30F3\u30AF\u5148\u30D5\u30A1\u30A4\u30EB\u3092\u542B\u3081\u308B\n-linksource                       HTML\u5F62\u5F0F\u3067\u30BD\u30FC\u30B9\u3092\u751F\u6210\u3059\u308B\n-sourcetab <tab length>           \u30BD\u30FC\u30B9\u5185\u306E\u30BF\u30D6\u306E\u7A7A\u767D\u6587\u5B57\u306E\u6570\u3092\u6307\u5B9A\u3059\u308B\n-keywords                         HTML\u306Emeta\u30BF\u30B0\u306B\u3001\u30D1\u30C3\u30B1\u30FC\u30B8\u3001\u30AF\u30E9\u30B9\u304A\u3088\u3073\u30E1\u30F3\u30D0\u30FC\u306E\u60C5\u5831\u3092\u542B\u3081\u308B\n-stylesheetfile <path>            \u751F\u6210\u3055\u308C\u305F\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u30B9\u30BF\u30A4\u30EB\u5909\u66F4\u7528\u30D5\u30A1\u30A4\u30EB\n-docencoding <name>               \u51FA\u529B\u306E\u6587\u5B57\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u3092\u6307\u5B9A\u3059\u308B
   12.11  
   12.12  
   12.13 -
   12.14 -
   12.15 +# L10N: do not localize these words: all none accessibility html missing reference syntax
   12.16 +doclet.X.usage=\u6A19\u6E96\u306Edoclet\u306B\u3088\u308A\u63D0\u4F9B\u3055\u308C\u308B\u3082\u306E:\n  -Xdocrootparent <url>            doc\u30B3\u30E1\u30F3\u30C8\u5185\u306E/..\u304C\u5F8C\u306B\u7D9A\u304F@docRoot\u306E\u3059\u3079\u3066\u3092\n                                   <url>\u3067\u7F6E\u63DB\u3057\u307E\u3059\n  -Xdoclint                        javadoc\u30B3\u30E1\u30F3\u30C8\u5185\u306E\u554F\u984C\u306B\u5BFE\u3059\u308B\u63A8\u5968\u3055\u308C\u308B\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3057\u307E\u3059\n  -Xdoclint:(all|none|[-]<group>) \n        javadoc\u30B3\u30E1\u30F3\u30C8\u5185\u306E\u554F\u984C\u306B\u5BFE\u3059\u308B\u7279\u5B9A\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\n        \u3053\u3053\u3067\u3001<group>\u306Fhtml\u3001missing\u3001reference\u307E\u305F\u306Fsyntax\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002\n
    13.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    13.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/resources/standard_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    13.3 @@ -185,8 +185,8 @@
    13.4  doclet.Groupname_already_used=\u5728 -group \u9009\u9879\u4E2D, groupname \u5DF2\u4F7F\u7528: {0}
    13.5  doclet.Same_package_name_used=\u7A0B\u5E8F\u5305\u540D\u79F0\u5F62\u5F0F\u4F7F\u7528\u4E86\u4E24\u6B21: {0}
    13.6  doclet.exception_encountered=\u5904\u7406{1}\u65F6\u51FA\u73B0\u5F02\u5E38\u9519\u8BEF\n{0}
    13.7 -doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n-d <directory>                    \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n-use                              \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n-version                          \u5305\u542B @version \u6BB5\n-author                           \u5305\u542B @author \u6BB5\n-docfilessubdirs                  \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n-splitindex                       \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n-windowtitle <text>               \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n-doctitle <html-code>             \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n-header <html-code>               \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n-footer <html-code>               \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n-top    <html-code>               \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n-bottom <html-code>               \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n-link <url>                       \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E <url> \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n-linkoffline <url> <url2>         \u5229\u7528\u4F4D\u4E8E <url2> \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E <url> \u7684\u6587\u6863\n-excludedocfilessubdir <name1>:.. \u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n-group <name> <p1>:<p2>..         \u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n-nocomment                        \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n-nodeprecated                     \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n-noqualifier <name1>:<name2>:...  \u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n-nosince                          \u4E0D\u5305\u542B @since \u4FE1\u606F\n-notimestamp                      \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n-nodeprecatedlist                 \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n-notree                           \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n-noindex                          \u4E0D\u751F\u6210\u7D22\u5F15\n-nohelp                           \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n-nonavbar                         \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n-serialwarn                       \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n-tag <name>:<locations>:<header>  \u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n-taglet                           \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n-tagletpath                       Taglet \u7684\u8DEF\u5F84\n-Xdocrootparent <url>             \u5C06\u6587\u6863\u6CE8\u91CA\u4E2D\u51FA\u73B0\u7684\u6240\u6709\u540E\u8DDF /.. \u7684 @docRoot \u66FF\u6362\u4E3A <url>\n-charset <charset>                \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n-helpfile <file>                  \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n-linksource                       \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n-sourcetab <tab length>           \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n-keywords                         \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n-stylesheetfile <path>            \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n-docencoding <name>               \u8F93\u51FA\u7F16\u7801\u540D\u79F0
    13.8 +doclet.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n  -d <directory>                   \u8F93\u51FA\u6587\u4EF6\u7684\u76EE\u6807\u76EE\u5F55\n  -use                             \u521B\u5EFA\u7C7B\u548C\u7A0B\u5E8F\u5305\u7528\u6CD5\u9875\u9762\n  -version                         \u5305\u542B @version \u6BB5\n  -author                          \u5305\u542B @author \u6BB5\n  -docfilessubdirs                 \u9012\u5F52\u590D\u5236\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\n  -splitindex                      \u5C06\u7D22\u5F15\u5206\u4E3A\u6BCF\u4E2A\u5B57\u6BCD\u5BF9\u5E94\u4E00\u4E2A\u6587\u4EF6\n  -windowtitle <text>              \u6587\u6863\u7684\u6D4F\u89C8\u5668\u7A97\u53E3\u6807\u9898\n  -doctitle <html-code>            \u5305\u542B\u6982\u89C8\u9875\u9762\u7684\u6807\u9898\n  -header <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u7709\u6587\u672C\n  -footer <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9875\u811A\u6587\u672C\n  -top    <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u9876\u90E8\u6587\u672C\n  -bottom <html-code>              \u5305\u542B\u6BCF\u4E2A\u9875\u9762\u7684\u5E95\u90E8\u6587\u672C\n  -link <url>                      \u521B\u5EFA\u6307\u5411\u4F4D\u4E8E <url> \u7684 javadoc \u8F93\u51FA\u7684\u94FE\u63A5\n  -linkoffline <url> <url2>        \u5229\u7528\u4F4D\u4E8E <url2> \u7684\u7A0B\u5E8F\u5305\u5217\u8868\u94FE\u63A5\u81F3\u4F4D\u4E8E <url> \u7684\u6587\u6863\n  -excludedocfilessubdir <name1>:.. \u6392\u9664\u5177\u6709\u7ED9\u5B9A\u540D\u79F0\u7684\u6240\u6709\u6587\u6863\u6587\u4EF6\u5B50\u76EE\u5F55\u3002\n  -group <name> <p1>:<p2>..        \u5728\u6982\u89C8\u9875\u9762\u4E2D, \u5C06\u6307\u5B9A\u7684\u7A0B\u5E8F\u5305\u5206\u7EC4\n  -nocomment                       \u4E0D\u751F\u6210\u8BF4\u660E\u548C\u6807\u8BB0, \u53EA\u751F\u6210\u58F0\u660E\u3002\n  -nodeprecated                    \u4E0D\u5305\u542B @deprecated \u4FE1\u606F\n  -noqualifier <name1>:<name2>:... \u8F93\u51FA\u4E2D\u4E0D\u5305\u62EC\u6307\u5B9A\u9650\u5B9A\u7B26\u7684\u5217\u8868\u3002\n  -nosince                         \u4E0D\u5305\u542B @since \u4FE1\u606F\n  -notimestamp                     \u4E0D\u5305\u542B\u9690\u85CF\u65F6\u95F4\u6233\n  -nodeprecatedlist                \u4E0D\u751F\u6210\u5DF2\u8FC7\u65F6\u7684\u5217\u8868\n  -notree                          \u4E0D\u751F\u6210\u7C7B\u5206\u5C42\u7ED3\u6784\n  -noindex                         \u4E0D\u751F\u6210\u7D22\u5F15\n  -nohelp                          \u4E0D\u751F\u6210\u5E2E\u52A9\u94FE\u63A5\n  -nonavbar                        \u4E0D\u751F\u6210\u5BFC\u822A\u680F\n  -serialwarn                      \u751F\u6210\u6709\u5173 @serial \u6807\u8BB0\u7684\u8B66\u544A\n  -tag <name>:<locations>:<header> \u6307\u5B9A\u5355\u4E2A\u53C2\u6570\u5B9A\u5236\u6807\u8BB0\n  -taglet                          \u8981\u6CE8\u518C\u7684 Taglet \u7684\u5168\u9650\u5B9A\u540D\u79F0\n  -tagletpath                      Taglet \u7684\u8DEF\u5F84\n  -charset <charset>               \u7528\u4E8E\u8DE8\u5E73\u53F0\u67E5\u770B\u751F\u6210\u7684\u6587\u6863\u7684\u5B57\u7B26\u96C6\u3002\n  -helpfile <file>                 \u5305\u542B\u5E2E\u52A9\u94FE\u63A5\u6240\u94FE\u63A5\u5230\u7684\u6587\u4EF6\n  -linksource                      \u4EE5 HTML \u683C\u5F0F\u751F\u6210\u6E90\u6587\u4EF6\n  -sourcetab <tab length>          \u6307\u5B9A\u6E90\u4E2D\u6BCF\u4E2A\u5236\u8868\u7B26\u5360\u636E\u7684\u7A7A\u683C\u6570\n  -keywords                        \u4F7F\u7A0B\u5E8F\u5305, \u7C7B\u548C\u6210\u5458\u4FE1\u606F\u9644\u5E26 HTML \u5143\u6807\u8BB0\n  -stylesheetfile <path>           \u7528\u4E8E\u66F4\u6539\u751F\u6210\u6587\u6863\u7684\u6837\u5F0F\u7684\u6587\u4EF6\n  -docencoding <name>              \u6307\u5B9A\u8F93\u51FA\u7684\u5B57\u7B26\u7F16\u7801
    13.9  
   13.10  
   13.11 -
   13.12 -
   13.13 +# L10N: do not localize these words: all none accessibility html missing reference syntax
   13.14 +doclet.X.usage=\u901A\u8FC7\u6807\u51C6 doclet \u63D0\u4F9B:\n  -Xdocrootparent <url>            \u4F7F\u7528 <url> \u66FF\u6362\u6587\u6863\u6CE8\u91CA\u4E2D\u51FA\u73B0\u7684\n                                   \u6240\u6709\u5176\u540E\u8DDF\u968F /.. \u7684 @docRoot\n  -Xdoclint                        \u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u5EFA\u8BAE\u7684\u68C0\u67E5\n  -Xdoclint:(all|none|[-]<group>) \n        \u5BF9 javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u68C0\u67E5\u3002\n        \u5176\u4E2D <group> \u662F accessibility, html, missing, reference \u6216 syntax \u4E4B\u4E00\u3002\n
    14.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    14.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeFieldWriter.java	Thu Sep 26 17:23:00 2013 -0700
    14.3 @@ -0,0 +1,132 @@
    14.4 +/*
    14.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    14.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    14.7 + *
    14.8 + * This code is free software; you can redistribute it and/or modify it
    14.9 + * under the terms of the GNU General Public License version 2 only, as
   14.10 + * published by the Free Software Foundation.  Oracle designates this
   14.11 + * particular file as subject to the "Classpath" exception as provided
   14.12 + * by Oracle in the LICENSE file that accompanied this code.
   14.13 + *
   14.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   14.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   14.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   14.17 + * version 2 for more details (a copy is included in the LICENSE file that
   14.18 + * accompanied this code).
   14.19 + *
   14.20 + * You should have received a copy of the GNU General Public License version
   14.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   14.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   14.23 + *
   14.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   14.25 + * or visit www.oracle.com if you need additional information or have any
   14.26 + * questions.
   14.27 + */
   14.28 +
   14.29 +package com.sun.tools.doclets.internal.toolkit;
   14.30 +
   14.31 +import java.io.*;
   14.32 +import com.sun.javadoc.*;
   14.33 +
   14.34 +/**
   14.35 + * The interface for writing annotation type field output.
   14.36 + *
   14.37 + *  <p><b>This is NOT part of any supported API.
   14.38 + *  If you write code that depends on this, you do so at your own risk.
   14.39 + *  This code and its internal interfaces are subject to change or
   14.40 + *  deletion without notice.</b>
   14.41 + *
   14.42 + *
   14.43 + * @author Bhavesh Patel
   14.44 + * @since 1.8
   14.45 + */
   14.46 +
   14.47 +public interface AnnotationTypeFieldWriter {
   14.48 +
   14.49 +    /**
   14.50 +     * Add the annotation type member tree header.
   14.51 +     *
   14.52 +     * @return content tree for the member tree header
   14.53 +     */
   14.54 +    public Content getMemberTreeHeader();
   14.55 +
   14.56 +    /**
   14.57 +     * Add the annotation type field details marker.
   14.58 +     *
   14.59 +     * @param memberDetails the content tree representing field details marker
   14.60 +     */
   14.61 +    public void addAnnotationFieldDetailsMarker(Content memberDetails);
   14.62 +
   14.63 +    /**
   14.64 +     * Add the annotation type details tree header.
   14.65 +     *
   14.66 +     * @param classDoc the annotation type being documented
   14.67 +     * @param memberDetailsTree the content tree representing member details
   14.68 +     */
   14.69 +    public void addAnnotationDetailsTreeHeader(ClassDoc classDoc,
   14.70 +            Content memberDetailsTree);
   14.71 +
   14.72 +    /**
   14.73 +     * Get the annotation type documentation tree header.
   14.74 +     *
   14.75 +     * @param member the annotation type being documented
   14.76 +     * @param annotationDetailsTree the content tree representing annotation type details
   14.77 +     * @return content tree for the annotation type documentation header
   14.78 +     */
   14.79 +    public Content getAnnotationDocTreeHeader(MemberDoc member,
   14.80 +            Content annotationDetailsTree);
   14.81 +
   14.82 +    /**
   14.83 +     * Get the annotation type details tree.
   14.84 +     *
   14.85 +     * @param annotationDetailsTree the content tree representing annotation type details
   14.86 +     * @return content tree for the annotation type details
   14.87 +     */
   14.88 +    public Content getAnnotationDetails(Content annotationDetailsTree);
   14.89 +
   14.90 +    /**
   14.91 +     * Get the annotation type documentation.
   14.92 +     *
   14.93 +     * @param annotationDocTree the content tree representing annotation type documentation
   14.94 +     * @param isLastContent true if the content to be added is the last content
   14.95 +     * @return content tree for the annotation type documentation
   14.96 +     */
   14.97 +    public Content getAnnotationDoc(Content annotationDocTree, boolean isLastContent);
   14.98 +
   14.99 +    /**
  14.100 +     * Get the signature for the given member.
  14.101 +     *
  14.102 +     * @param member the member being documented
  14.103 +     * @return content tree for the annotation type signature
  14.104 +     */
  14.105 +    public Content getSignature(MemberDoc member);
  14.106 +
  14.107 +    /**
  14.108 +     * Add the deprecated output for the given member.
  14.109 +     *
  14.110 +     * @param member the member being documented
  14.111 +     * @param annotationDocTree content tree to which the deprecated information will be added
  14.112 +     */
  14.113 +    public void addDeprecated(MemberDoc member, Content annotationDocTree);
  14.114 +
  14.115 +    /**
  14.116 +     * Add the comments for the given member.
  14.117 +     *
  14.118 +     * @param member the member being documented
  14.119 +     * @param annotationDocTree the content tree to which the comments will be added
  14.120 +     */
  14.121 +    public void addComments(MemberDoc member, Content annotationDocTree);
  14.122 +
  14.123 +    /**
  14.124 +     * Add the tags for the given member.
  14.125 +     *
  14.126 +     * @param member the member being documented
  14.127 +     * @param annotationDocTree the content tree to which the tags will be added
  14.128 +     */
  14.129 +    public void addTags(MemberDoc member, Content annotationDocTree);
  14.130 +
  14.131 +    /**
  14.132 +     * Close the writer.
  14.133 +     */
  14.134 +    public void close() throws IOException;
  14.135 +}
    15.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java	Thu Sep 26 10:43:55 2013 -0700
    15.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeRequiredMemberWriter.java	Thu Sep 26 17:23:00 2013 -0700
    15.3 @@ -1,5 +1,5 @@
    15.4  /*
    15.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
    15.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    15.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    15.8   *
    15.9   * This code is free software; you can redistribute it and/or modify it
   15.10 @@ -45,6 +45,20 @@
   15.11  public interface AnnotationTypeRequiredMemberWriter {
   15.12  
   15.13      /**
   15.14 +     * Add the annotation type member tree header.
   15.15 +     *
   15.16 +     * @return content tree for the member tree header
   15.17 +     */
   15.18 +    public Content getMemberTreeHeader();
   15.19 +
   15.20 +    /**
   15.21 +     * Add the annotation type details marker.
   15.22 +     *
   15.23 +     * @param memberDetails the content tree representing details marker
   15.24 +     */
   15.25 +    public void addAnnotationDetailsMarker(Content memberDetails);
   15.26 +
   15.27 +    /**
   15.28       * Add the annotation type details tree header.
   15.29       *
   15.30       * @param classDoc the annotation type being documented
    16.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java	Thu Sep 26 10:43:55 2013 -0700
    16.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/AnnotationTypeWriter.java	Thu Sep 26 17:23:00 2013 -0700
    16.3 @@ -1,5 +1,5 @@
    16.4  /*
    16.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
    16.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    16.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    16.8   *
    16.9   * This code is free software; you can redistribute it and/or modify it
   16.10 @@ -104,13 +104,6 @@
   16.11      public void addAnnotationTypeDeprecationInfo (Content annotationInfoTree);
   16.12  
   16.13      /**
   16.14 -     * Add the annotation type details marker.
   16.15 -     *
   16.16 -     * @param memberDetails the content tree representing member details marker
   16.17 -     */
   16.18 -    public void addAnnotationDetailsMarker(Content memberDetails);
   16.19 -
   16.20 -    /**
   16.21       * Get the member tree header for the annotation type.
   16.22       *
   16.23       * @return a content tree for the member tree header
    17.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java	Thu Sep 26 10:43:55 2013 -0700
    17.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/WriterFactory.java	Thu Sep 26 17:23:00 2013 -0700
    17.3 @@ -130,6 +130,18 @@
    17.4              throws Exception;
    17.5  
    17.6      /**
    17.7 +     * Return the annotation type field writer for a given annotation type.
    17.8 +     *
    17.9 +     * @param annotationTypeWriter the writer for the annotation type
   17.10 +     *        being documented.
   17.11 +     * @return the member writer for the given annotation type.  Return null if
   17.12 +     *         this writer is not supported by the doclet.
   17.13 +     */
   17.14 +    public abstract AnnotationTypeFieldWriter
   17.15 +            getAnnotationTypeFieldWriter(
   17.16 +        AnnotationTypeWriter annotationTypeWriter) throws Exception;
   17.17 +
   17.18 +    /**
   17.19       * Return the annotation type optional member writer for a given annotation
   17.20       * type.
   17.21       *
    18.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Sep 26 10:43:55 2013 -0700
    18.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeBuilder.java	Thu Sep 26 17:23:00 2013 -0700
    18.3 @@ -223,14 +223,23 @@
    18.4          Content memberDetailsTree = writer.getMemberTreeHeader();
    18.5          buildChildren(node, memberDetailsTree);
    18.6          if (memberDetailsTree.isValid()) {
    18.7 -            Content memberDetails = writer.getMemberTreeHeader();
    18.8 -            writer.addAnnotationDetailsMarker(memberDetails);
    18.9 -            memberDetails.addContent(writer.getMemberTree(memberDetailsTree));
   18.10 -            annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetails));
   18.11 +            annotationContentTree.addContent(writer.getMemberDetailsTree(memberDetailsTree));
   18.12          }
   18.13      }
   18.14  
   18.15      /**
   18.16 +     * Build the annotation type field documentation.
   18.17 +     *
   18.18 +     * @param node the XML element that specifies which components to document
   18.19 +     * @param memberDetailsTree the content tree to which the documentation will be added
   18.20 +     */
   18.21 +    public void buildAnnotationTypeFieldDetails(XMLNode node, Content memberDetailsTree)
   18.22 +            throws Exception {
   18.23 +        configuration.getBuilderFactory().
   18.24 +                getAnnotationTypeFieldsBuilder(writer).buildChildren(node, memberDetailsTree);
   18.25 +    }
   18.26 +
   18.27 +    /**
   18.28       * Build the annotation type optional member documentation.
   18.29       *
   18.30       * @param node the XML element that specifies which components to document
    19.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    19.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeFieldBuilder.java	Thu Sep 26 17:23:00 2013 -0700
    19.3 @@ -0,0 +1,240 @@
    19.4 +/*
    19.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    19.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.7 + *
    19.8 + * This code is free software; you can redistribute it and/or modify it
    19.9 + * under the terms of the GNU General Public License version 2 only, as
   19.10 + * published by the Free Software Foundation.  Oracle designates this
   19.11 + * particular file as subject to the "Classpath" exception as provided
   19.12 + * by Oracle in the LICENSE file that accompanied this code.
   19.13 + *
   19.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
   19.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   19.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   19.17 + * version 2 for more details (a copy is included in the LICENSE file that
   19.18 + * accompanied this code).
   19.19 + *
   19.20 + * You should have received a copy of the GNU General Public License version
   19.21 + * 2 along with this work; if not, write to the Free Software Foundation,
   19.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   19.23 + *
   19.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   19.25 + * or visit www.oracle.com if you need additional information or have any
   19.26 + * questions.
   19.27 + */
   19.28 +
   19.29 +package com.sun.tools.doclets.internal.toolkit.builders;
   19.30 +
   19.31 +import java.util.*;
   19.32 +
   19.33 +import com.sun.javadoc.*;
   19.34 +import com.sun.tools.doclets.internal.toolkit.*;
   19.35 +import com.sun.tools.doclets.internal.toolkit.util.*;
   19.36 +
   19.37 +/**
   19.38 + * Builds documentation for annotation type fields.
   19.39 + *
   19.40 + *  <p><b>This is NOT part of any supported API.
   19.41 + *  If you write code that depends on this, you do so at your own risk.
   19.42 + *  This code and its internal interfaces are subject to change or
   19.43 + *  deletion without notice.</b>
   19.44 + *
   19.45 + * @author Bhavesh Patel
   19.46 + * @since 1.8
   19.47 + */
   19.48 +public class AnnotationTypeFieldBuilder extends AbstractMemberBuilder {
   19.49 +
   19.50 +    /**
   19.51 +     * The annotation type whose members are being documented.
   19.52 +     */
   19.53 +    protected ClassDoc classDoc;
   19.54 +
   19.55 +    /**
   19.56 +     * The visible members for the given class.
   19.57 +     */
   19.58 +    protected VisibleMemberMap visibleMemberMap;
   19.59 +
   19.60 +    /**
   19.61 +     * The writer to output the member documentation.
   19.62 +     */
   19.63 +    protected AnnotationTypeFieldWriter writer;
   19.64 +
   19.65 +    /**
   19.66 +     * The list of members being documented.
   19.67 +     */
   19.68 +    protected List<ProgramElementDoc> members;
   19.69 +
   19.70 +    /**
   19.71 +     * The index of the current member that is being documented at this point
   19.72 +     * in time.
   19.73 +     */
   19.74 +    protected int currentMemberIndex;
   19.75 +
   19.76 +    /**
   19.77 +     * Construct a new AnnotationTypeFieldsBuilder.
   19.78 +     *
   19.79 +     * @param context  the build context.
   19.80 +     * @param classDoc the class whose members are being documented.
   19.81 +     * @param writer the doclet specific writer.
   19.82 +     * @param memberType the type of member that is being documented.
   19.83 +     */
   19.84 +    protected AnnotationTypeFieldBuilder(Context context,
   19.85 +            ClassDoc classDoc,
   19.86 +            AnnotationTypeFieldWriter writer,
   19.87 +            int memberType) {
   19.88 +        super(context);
   19.89 +        this.classDoc = classDoc;
   19.90 +        this.writer = writer;
   19.91 +        this.visibleMemberMap = new VisibleMemberMap(classDoc, memberType,
   19.92 +            configuration);
   19.93 +        this.members = new ArrayList<ProgramElementDoc>(
   19.94 +            this.visibleMemberMap.getMembersFor(classDoc));
   19.95 +        if (configuration.getMemberComparator() != null) {
   19.96 +            Collections.sort(this.members, configuration.getMemberComparator());
   19.97 +        }
   19.98 +    }
   19.99 +
  19.100 +
  19.101 +    /**
  19.102 +     * Construct a new AnnotationTypeFieldBuilder.
  19.103 +     *
  19.104 +     * @param context  the build context.
  19.105 +     * @param classDoc the class whose members are being documented.
  19.106 +     * @param writer the doclet specific writer.
  19.107 +     */
  19.108 +    public static AnnotationTypeFieldBuilder getInstance(
  19.109 +            Context context, ClassDoc classDoc,
  19.110 +            AnnotationTypeFieldWriter writer) {
  19.111 +        return new AnnotationTypeFieldBuilder(context, classDoc,
  19.112 +                    writer, VisibleMemberMap.ANNOTATION_TYPE_FIELDS);
  19.113 +    }
  19.114 +
  19.115 +    /**
  19.116 +     * {@inheritDoc}
  19.117 +     */
  19.118 +    public String getName() {
  19.119 +        return "AnnotationTypeFieldDetails";
  19.120 +    }
  19.121 +
  19.122 +    /**
  19.123 +     * Returns a list of members that will be documented for the given class.
  19.124 +     * This information can be used for doclet specific documentation
  19.125 +     * generation.
  19.126 +     *
  19.127 +     * @param classDoc the {@link ClassDoc} we want to check.
  19.128 +     * @return a list of members that will be documented.
  19.129 +     */
  19.130 +    public List<ProgramElementDoc> members(ClassDoc classDoc) {
  19.131 +        return visibleMemberMap.getMembersFor(classDoc);
  19.132 +    }
  19.133 +
  19.134 +    /**
  19.135 +     * Returns the visible member map for the members of this class.
  19.136 +     *
  19.137 +     * @return the visible member map for the members of this class.
  19.138 +     */
  19.139 +    public VisibleMemberMap getVisibleMemberMap() {
  19.140 +        return visibleMemberMap;
  19.141 +    }
  19.142 +
  19.143 +    /**
  19.144 +     * summaryOrder.size()
  19.145 +     */
  19.146 +    public boolean hasMembersToDocument() {
  19.147 +        return members.size() > 0;
  19.148 +    }
  19.149 +
  19.150 +    /**
  19.151 +     * Build the annotation type field documentation.
  19.152 +     *
  19.153 +     * @param node the XML element that specifies which components to document
  19.154 +     * @param memberDetailsTree the content tree to which the documentation will be added
  19.155 +     */
  19.156 +    public void buildAnnotationTypeField(XMLNode node, Content memberDetailsTree) {
  19.157 +        buildAnnotationTypeMember(node, memberDetailsTree);
  19.158 +    }
  19.159 +
  19.160 +    /**
  19.161 +     * Build the member documentation.
  19.162 +     *
  19.163 +     * @param node the XML element that specifies which components to document
  19.164 +     * @param memberDetailsTree the content tree to which the documentation will be added
  19.165 +     */
  19.166 +    public void buildAnnotationTypeMember(XMLNode node, Content memberDetailsTree) {
  19.167 +        if (writer == null) {
  19.168 +            return;
  19.169 +        }
  19.170 +        int size = members.size();
  19.171 +        if (size > 0) {
  19.172 +            writer.addAnnotationFieldDetailsMarker(memberDetailsTree);
  19.173 +            for (currentMemberIndex = 0; currentMemberIndex < size;
  19.174 +                    currentMemberIndex++) {
  19.175 +                Content detailsTree = writer.getMemberTreeHeader();
  19.176 +                writer.addAnnotationDetailsTreeHeader(classDoc, detailsTree);
  19.177 +                Content annotationDocTree = writer.getAnnotationDocTreeHeader(
  19.178 +                        (MemberDoc) members.get(currentMemberIndex),
  19.179 +                        detailsTree);
  19.180 +                buildChildren(node, annotationDocTree);
  19.181 +                detailsTree.addContent(writer.getAnnotationDoc(
  19.182 +                        annotationDocTree, (currentMemberIndex == size - 1)));
  19.183 +                memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
  19.184 +            }
  19.185 +        }
  19.186 +    }
  19.187 +
  19.188 +    /**
  19.189 +     * Build the signature.
  19.190 +     *
  19.191 +     * @param node the XML element that specifies which components to document
  19.192 +     * @param annotationDocTree the content tree to which the documentation will be added
  19.193 +     */
  19.194 +    public void buildSignature(XMLNode node, Content annotationDocTree) {
  19.195 +        annotationDocTree.addContent(
  19.196 +                writer.getSignature((MemberDoc) members.get(currentMemberIndex)));
  19.197 +    }
  19.198 +
  19.199 +    /**
  19.200 +     * Build the deprecation information.
  19.201 +     *
  19.202 +     * @param node the XML element that specifies which components to document
  19.203 +     * @param annotationDocTree the content tree to which the documentation will be added
  19.204 +     */
  19.205 +    public void buildDeprecationInfo(XMLNode node, Content annotationDocTree) {
  19.206 +        writer.addDeprecated((MemberDoc) members.get(currentMemberIndex),
  19.207 +                annotationDocTree);
  19.208 +    }
  19.209 +
  19.210 +    /**
  19.211 +     * Build the comments for the member.  Do nothing if
  19.212 +     * {@link Configuration#nocomment} is set to true.
  19.213 +     *
  19.214 +     * @param node the XML element that specifies which components to document
  19.215 +     * @param annotationDocTree the content tree to which the documentation will be added
  19.216 +     */
  19.217 +    public void buildMemberComments(XMLNode node, Content annotationDocTree) {
  19.218 +        if(! configuration.nocomment){
  19.219 +            writer.addComments((MemberDoc) members.get(currentMemberIndex),
  19.220 +                    annotationDocTree);
  19.221 +        }
  19.222 +    }
  19.223 +
  19.224 +    /**
  19.225 +     * Build the tag information.
  19.226 +     *
  19.227 +     * @param node the XML element that specifies which components to document
  19.228 +     * @param annotationDocTree the content tree to which the documentation will be added
  19.229 +     */
  19.230 +    public void buildTagInfo(XMLNode node, Content annotationDocTree) {
  19.231 +        writer.addTags((MemberDoc) members.get(currentMemberIndex),
  19.232 +                annotationDocTree);
  19.233 +    }
  19.234 +
  19.235 +    /**
  19.236 +     * Return the annotation type field writer for this builder.
  19.237 +     *
  19.238 +     * @return the annotation type field writer for this builder.
  19.239 +     */
  19.240 +    public AnnotationTypeFieldWriter getWriter() {
  19.241 +        return writer;
  19.242 +    }
  19.243 +}
    20.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Sep 26 10:43:55 2013 -0700
    20.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/AnnotationTypeRequiredMemberBuilder.java	Thu Sep 26 17:23:00 2013 -0700
    20.3 @@ -167,16 +167,17 @@
    20.4          }
    20.5          int size = members.size();
    20.6          if (size > 0) {
    20.7 -            writer.addAnnotationDetailsTreeHeader(
    20.8 -                    classDoc, memberDetailsTree);
    20.9 +            writer.addAnnotationDetailsMarker(memberDetailsTree);
   20.10              for (currentMemberIndex = 0; currentMemberIndex < size;
   20.11 -            currentMemberIndex++) {
   20.12 +                    currentMemberIndex++) {
   20.13 +                Content detailsTree = writer.getMemberTreeHeader();
   20.14 +                writer.addAnnotationDetailsTreeHeader(classDoc, detailsTree);
   20.15                  Content annotationDocTree = writer.getAnnotationDocTreeHeader(
   20.16 -                        (MemberDoc) members.get(currentMemberIndex),
   20.17 -                        memberDetailsTree);
   20.18 +                        (MemberDoc) members.get(currentMemberIndex), detailsTree);
   20.19                  buildChildren(node, annotationDocTree);
   20.20 -                memberDetailsTree.addContent(writer.getAnnotationDoc(
   20.21 +                detailsTree.addContent(writer.getAnnotationDoc(
   20.22                          annotationDocTree, (currentMemberIndex == size - 1)));
   20.23 +                memberDetailsTree.addContent(writer.getAnnotationDetails(detailsTree));
   20.24              }
   20.25          }
   20.26      }
    21.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java	Thu Sep 26 10:43:55 2013 -0700
    21.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/BuilderFactory.java	Thu Sep 26 17:23:00 2013 -0700
    21.3 @@ -174,10 +174,26 @@
    21.4      }
    21.5  
    21.6      /**
    21.7 +     * Return an instance of the annotation type fields builder for the given
    21.8 +     * class.
    21.9 +     *
   21.10 +     * @return an instance of the annotation type field builder for the given
   21.11 +     *         annotation type.
   21.12 +     */
   21.13 +    public AbstractBuilder getAnnotationTypeFieldsBuilder(
   21.14 +            AnnotationTypeWriter annotationTypeWriter)
   21.15 +    throws Exception {
   21.16 +        return AnnotationTypeFieldBuilder.getInstance(context,
   21.17 +            annotationTypeWriter.getAnnotationTypeDoc(),
   21.18 +            writerFactory.getAnnotationTypeFieldWriter(
   21.19 +                annotationTypeWriter));
   21.20 +    }
   21.21 +
   21.22 +    /**
   21.23       * Return an instance of the annotation type member builder for the given
   21.24       * class.
   21.25       *
   21.26 -     * @return an instance of the annotation type memebr builder for the given
   21.27 +     * @return an instance of the annotation type member builder for the given
   21.28       *         annotation type.
   21.29       */
   21.30      public AbstractBuilder getAnnotationTypeOptionalMemberBuilder(
   21.31 @@ -193,7 +209,7 @@
   21.32       * Return an instance of the annotation type member builder for the given
   21.33       * class.
   21.34       *
   21.35 -     * @return an instance of the annotation type memebr builder for the given
   21.36 +     * @return an instance of the annotation type member builder for the given
   21.37       *         annotation type.
   21.38       */
   21.39      public AbstractBuilder getAnnotationTypeRequiredMemberBuilder(
    22.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Sep 26 10:43:55 2013 -0700
    22.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/MemberSummaryBuilder.java	Thu Sep 26 17:23:00 2013 -0700
    22.3 @@ -213,6 +213,20 @@
    22.4      }
    22.5  
    22.6      /**
    22.7 +     * Build the summary for fields.
    22.8 +     *
    22.9 +     * @param node the XML element that specifies which components to document
   22.10 +     * @param memberSummaryTree the content tree to which the documentation will be added
   22.11 +     */
   22.12 +    public void buildAnnotationTypeFieldsSummary(XMLNode node, Content memberSummaryTree) {
   22.13 +        MemberSummaryWriter writer =
   22.14 +                memberSummaryWriters[VisibleMemberMap.ANNOTATION_TYPE_FIELDS];
   22.15 +        VisibleMemberMap visibleMemberMap =
   22.16 +                visibleMemberMaps[VisibleMemberMap.ANNOTATION_TYPE_FIELDS];
   22.17 +        addSummary(writer, visibleMemberMap, false, memberSummaryTree);
   22.18 +    }
   22.19 +
   22.20 +    /**
   22.21       * Build the summary for the optional members.
   22.22       *
   22.23       * @param node the XML element that specifies which components to document
    23.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml	Thu Sep 26 10:43:55 2013 -0700
    23.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml	Thu Sep 26 17:23:00 2013 -0700
    23.3 @@ -66,10 +66,19 @@
    23.4              <AnnotationTypeTagInfo/>
    23.5          </AnnotationTypeInfo>
    23.6          <MemberSummary>
    23.7 +            <AnnotationTypeFieldsSummary/>
    23.8              <AnnotationTypeRequiredMemberSummary/>
    23.9              <AnnotationTypeOptionalMemberSummary/>
   23.10          </MemberSummary>
   23.11          <AnnotationTypeMemberDetails>
   23.12 +            <AnnotationTypeFieldDetails>
   23.13 +                <AnnotationTypeField>
   23.14 +                    <Signature/>
   23.15 +                    <DeprecationInfo/>
   23.16 +                    <MemberComments/>
   23.17 +                    <TagInfo/>
   23.18 +                </AnnotationTypeField>
   23.19 +            </AnnotationTypeFieldDetails>
   23.20              <AnnotationTypeRequiredMemberDetails>
   23.21                  <AnnotationTypeRequiredMember>
   23.22                      <Signature/>
    24.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties	Thu Sep 26 10:43:55 2013 -0700
    24.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets.properties	Thu Sep 26 17:23:00 2013 -0700
    24.3 @@ -136,6 +136,7 @@
    24.4  doclet.Groupname_already_used=In -group option, groupname already used: {0}
    24.5  doclet.value_tag_invalid_reference={0} (referenced by @value tag) is an unknown reference.
    24.6  doclet.value_tag_invalid_constant=@value tag (which references {0}) can only be used in constants.
    24.7 +doclet.value_tag_invalid_use=@value tag cannot be used here.
    24.8  doclet.dest_dir_create=Creating destination directory: "{0}"
    24.9  doclet.in={0} in {1}
   24.10  doclet.Use_Table_Summary=Use table, listing {0}, and an explanation
    25.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    25.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    25.3 @@ -174,6 +174,16 @@
    25.4  doclet.0_and_1={0}\u3068{1}
    25.5  
    25.6  #Documentation for Enums
    25.7 -doclet.enum_values_doc=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n<pre>\nfor({0} c: {0}.values())\n&nbsp; System.out.println(c);\n</pre>\n@return\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\n\u542B\u3080\u914D\u5217
    25.8 +doclet.enum_values_doc.main=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u914D\u5217\u3092\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u8FD4\u3057\u307E\u3059\u3002\n\u3053\u306E\u30E1\u30BD\u30C3\u30C9\u306F\u6B21\u306E\u3088\u3046\u306B\u3057\u3066\u5B9A\u6570\u3092\u53CD\u5FA9\u3059\u308B\u305F\u3081\u306B\n\u4F7F\u7528\u3067\u304D\u307E\u3059:\n<pre>\nfor({0} c: {0}.values())\n&nbsp; System.out.println(c);\n</pre>\n
    25.9  
   25.10 -doclet.enum_valueof_doc=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068<i>\u6B63\u78BA\u306B</i>\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n\n@param name\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\n@return\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5217\u6319\u578B\u5B9A\u6570\n@throws IllegalArgumentException\u6307\u5B9A\u3055\u308C\u305F\u540D\u524D\u3092\u6301\u3064\u5B9A\u6570\u3092\n\u3053\u306E\u5217\u6319\u578B\u304C\u6301\u3063\u3066\u3044\u306A\u3044\u5834\u5408\n@throws NullPointerException\u5F15\u6570\u304Cnull\u306E\u5834\u5408
   25.11 +doclet.enum_values_doc.return=\n\u3053\u306E\u5217\u6319\u578B\u306E\u5B9A\u6570\u3092\u542B\u3080\u3001\u5BA3\u8A00\u3055\u308C\u3066\u3044\u308B\u9806\u5E8F\u3067\u306E\u914D\u5217
   25.12 +
   25.13 +doclet.enum_valueof_doc.main=\n\u6307\u5B9A\u3057\u305F\u540D\u524D\u3092\u6301\u3064\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u8FD4\u3057\u307E\u3059\u3002\n\u6587\u5B57\u5217\u306F\u3001\u3053\u306E\u578B\u306E\u5217\u6319\u578B\u5B9A\u6570\u3092\u5BA3\u8A00\u3059\u308B\u306E\u306B\u4F7F\u7528\u3057\u305F\u8B58\u5225\u5B50\u3068<i>\u6B63\u78BA\u306B</i>\n\u4E00\u81F4\u3057\u3066\u3044\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002\n(\u4F59\u5206\u306A\u7A7A\u767D\u6587\u5B57\u3092\u542B\u3081\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\u3002)\n
   25.14 +
   25.15 +doclet.enum_valueof_doc.param_name=\u8FD4\u3055\u308C\u308B\u5217\u6319\u578B\u5B9A\u6570\u306E\u540D\u524D\u3002
   25.16 +
   25.17 +doclet.enum_valueof_doc.return=\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u5217\u6319\u578B\u5B9A\u6570
   25.18 +
   25.19 +doclet.enum_valueof_doc.throws_ila=\u3053\u306E\u5217\u6319\u578B\u306B\u3001\u6307\u5B9A\u3057\u305F\u540D\u524D\u306E\u5B9A\u6570\u304C\u306A\u3044\u5834\u5408
   25.20 +
   25.21 +doclet.enum_valueof_doc.throws_npe=\u5F15\u6570\u304Cnull\u306E\u5834\u5408
    26.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    26.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclets_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    26.3 @@ -174,6 +174,16 @@
    26.4  doclet.0_and_1={0}\u548C{1}
    26.5  
    26.6  #Documentation for Enums
    26.7 -doclet.enum_values_doc=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n<pre>\nfor ({0} c : {0}.values())\n&nbsp;   System.out.println(c);\n</pre>\n@return \u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4
    26.8 +doclet.enum_values_doc.main=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F, \u8FD4\u56DE\n\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4\u3002\u8BE5\u65B9\u6CD5\u53EF\u7528\u4E8E\u8FED\u4EE3\n\u5E38\u91CF, \u5982\u4E0B\u6240\u793A:\n<pre>\nfor ({0} c : {0}.values())\n&nbsp;   System.out.println(c);\n</pre>
    26.9  
   26.10 -doclet.enum_valueof_doc=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26<i>\u5B8C\u5168</i>\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)\n\n@param name \u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002\n@return \u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF\n@throws \u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF, \n\u5219\u629B\u51FA IllegalArgumentException\n@throws \u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C, \u5219\u629B\u51FA NullPointerException
   26.11 +doclet.enum_values_doc.return=\n\u6309\u7167\u58F0\u660E\u8BE5\u679A\u4E3E\u7C7B\u578B\u7684\u5E38\u91CF\u7684\u987A\u5E8F\u8FD4\u56DE\u7684\u5305\u542B\u8FD9\u4E9B\u5E38\u91CF\u7684\u6570\u7EC4
   26.12 +
   26.13 +doclet.enum_valueof_doc.main=\n\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u3002\n\u5B57\u7B26\u4E32\u5FC5\u987B\u4E0E\u7528\u4E8E\u58F0\u660E\u8BE5\u7C7B\u578B\u7684\u679A\u4E3E\u5E38\u91CF\u7684\n\u6807\u8BC6\u7B26<i>\u5B8C\u5168</i>\u5339\u914D\u3002(\u4E0D\u5141\u8BB8\u6709\u591A\u4F59\n\u7684\u7A7A\u683C\u5B57\u7B26\u3002)
   26.14 +
   26.15 +doclet.enum_valueof_doc.param_name=\u8981\u8FD4\u56DE\u7684\u679A\u4E3E\u5E38\u91CF\u7684\u540D\u79F0\u3002
   26.16 +
   26.17 +doclet.enum_valueof_doc.return=\u8FD4\u56DE\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u679A\u4E3E\u5E38\u91CF
   26.18 +
   26.19 +doclet.enum_valueof_doc.throws_ila=\u5982\u679C\u8BE5\u679A\u4E3E\u7C7B\u578B\u6CA1\u6709\u5E26\u6709\u6307\u5B9A\u540D\u79F0\u7684\u5E38\u91CF
   26.20 +
   26.21 +doclet.enum_valueof_doc.throws_npe=\u5982\u679C\u53C2\u6570\u4E3A\u7A7A\u503C
    27.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java	Thu Sep 26 10:43:55 2013 -0700
    27.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/ValueTaglet.java	Thu Sep 26 17:23:00 2013 -0700
    27.3 @@ -105,7 +105,9 @@
    27.4      }
    27.5  
    27.6      /**
    27.7 -     * Given the name of the field, return the corresponding FieldDoc.
    27.8 +     * Given the name of the field, return the corresponding FieldDoc. Return null
    27.9 +     * due to invalid use of value tag if the name is null or empty string and if
   27.10 +     * the value tag is not used on a field.
   27.11       *
   27.12       * @param config the current configuration of the doclet.
   27.13       * @param tag the value tag.
   27.14 @@ -114,10 +116,8 @@
   27.15       * it is assumed that the field is in the current class.
   27.16       *
   27.17       * @return the corresponding FieldDoc. If the name is null or empty string,
   27.18 -     * return field that the value tag was used in.
   27.19 -     *
   27.20 -     * @throws DocletAbortException if the value tag does not specify a name to
   27.21 -     * a value field and it is not used within the comments of a valid field.
   27.22 +     * return field that the value tag was used in. Return null if the name is null
   27.23 +     * or empty string and if the value tag is not used on a field.
   27.24       */
   27.25      private FieldDoc getFieldDoc(Configuration config, Tag tag, String name) {
   27.26          if (name == null || name.length() == 0) {
   27.27 @@ -125,8 +125,9 @@
   27.28              if (tag.holder() instanceof FieldDoc) {
   27.29                  return (FieldDoc) tag.holder();
   27.30              } else {
   27.31 -                //This should never ever happen.
   27.32 -                throw new DocletAbortException("should not happen");
   27.33 +                // If the value tag does not specify a parameter which is a valid field and
   27.34 +                // it is not used within the comments of a valid field, return null.
   27.35 +                 return null;
   27.36              }
   27.37          }
   27.38          StringTokenizer st = new StringTokenizer(name, "#");
   27.39 @@ -165,9 +166,15 @@
   27.40          FieldDoc field = getFieldDoc(
   27.41              writer.configuration(), tag, tag.text());
   27.42          if (field == null) {
   27.43 -            //Reference is unknown.
   27.44 -            writer.getMsgRetriever().warning(tag.holder().position(),
   27.45 -                "doclet.value_tag_invalid_reference", tag.text());
   27.46 +            if (tag.text().isEmpty()) {
   27.47 +                //Invalid use of @value
   27.48 +                writer.getMsgRetriever().warning(tag.holder().position(),
   27.49 +                        "doclet.value_tag_invalid_use");
   27.50 +            } else {
   27.51 +                //Reference is unknown.
   27.52 +                writer.getMsgRetriever().warning(tag.holder().position(),
   27.53 +                        "doclet.value_tag_invalid_reference", tag.text());
   27.54 +            }
   27.55          } else if (field.constantValue() != null) {
   27.56              return writer.valueTagOutput(field,
   27.57                  field.constantValueExpression(),
    28.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Sep 26 10:43:55 2013 -0700
    28.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/VisibleMemberMap.java	Thu Sep 26 17:23:00 2013 -0700
    28.3 @@ -55,14 +55,15 @@
    28.4      public static final int FIELDS          = 2;
    28.5      public static final int CONSTRUCTORS    = 3;
    28.6      public static final int METHODS         = 4;
    28.7 -    public static final int ANNOTATION_TYPE_MEMBER_OPTIONAL = 5;
    28.8 -    public static final int ANNOTATION_TYPE_MEMBER_REQUIRED = 6;
    28.9 -    public static final int PROPERTIES      = 7;
   28.10 +    public static final int ANNOTATION_TYPE_FIELDS = 5;
   28.11 +    public static final int ANNOTATION_TYPE_MEMBER_OPTIONAL = 6;
   28.12 +    public static final int ANNOTATION_TYPE_MEMBER_REQUIRED = 7;
   28.13 +    public static final int PROPERTIES      = 8;
   28.14  
   28.15      /**
   28.16       * The total number of member types is {@value}.
   28.17       */
   28.18 -    public static final int NUM_MEMBER_TYPES = 8;
   28.19 +    public static final int NUM_MEMBER_TYPES = 9;
   28.20  
   28.21      public static final String STARTLEVEL = "start";
   28.22  
   28.23 @@ -433,6 +434,9 @@
   28.24              }
   28.25              ProgramElementDoc[] members = null;
   28.26              switch (kind) {
   28.27 +                case ANNOTATION_TYPE_FIELDS:
   28.28 +                    members = cd.fields(filter);
   28.29 +                    break;
   28.30                  case ANNOTATION_TYPE_MEMBER_OPTIONAL:
   28.31                      members = cd.isAnnotationType() ?
   28.32                          filter((AnnotationTypeDoc) cd, false) :
    29.1 --- a/src/share/classes/com/sun/tools/doclint/Checker.java	Thu Sep 26 10:43:55 2013 -0700
    29.2 +++ b/src/share/classes/com/sun/tools/doclint/Checker.java	Thu Sep 26 17:23:00 2013 -0700
    29.3 @@ -44,6 +44,7 @@
    29.4  import javax.lang.model.element.ElementKind;
    29.5  import javax.lang.model.element.ExecutableElement;
    29.6  import javax.lang.model.element.Name;
    29.7 +import javax.lang.model.element.VariableElement;
    29.8  import javax.lang.model.type.TypeKind;
    29.9  import javax.lang.model.type.TypeMirror;
   29.10  import javax.tools.Diagnostic.Kind;
   29.11 @@ -93,7 +94,7 @@
   29.12  
   29.13      Set<Element> foundParams = new HashSet<>();
   29.14      Set<TypeMirror> foundThrows = new HashSet<>();
   29.15 -    Map<JavaFileObject, Set<String>> foundAnchors = new HashMap<>();
   29.16 +    Map<Element, Set<String>> foundAnchors = new HashMap<>();
   29.17      boolean foundInheritDoc = false;
   29.18      boolean foundReturn = false;
   29.19  
   29.20 @@ -576,13 +577,30 @@
   29.21      }
   29.22  
   29.23      private boolean checkAnchor(String name) {
   29.24 -        JavaFileObject fo = env.currPath.getCompilationUnit().getSourceFile();
   29.25 -        Set<String> set = foundAnchors.get(fo);
   29.26 +        Element e = getEnclosingPackageOrClass(env.currElement);
   29.27 +        if (e == null)
   29.28 +            return true;
   29.29 +        Set<String> set = foundAnchors.get(e);
   29.30          if (set == null)
   29.31 -            foundAnchors.put(fo, set = new HashSet<>());
   29.32 +            foundAnchors.put(e, set = new HashSet<>());
   29.33          return set.add(name);
   29.34      }
   29.35  
   29.36 +    private Element getEnclosingPackageOrClass(Element e) {
   29.37 +        while (e != null) {
   29.38 +            switch (e.getKind()) {
   29.39 +                case CLASS:
   29.40 +                case ENUM:
   29.41 +                case INTERFACE:
   29.42 +                case PACKAGE:
   29.43 +                    return e;
   29.44 +                default:
   29.45 +                    e = e.getEnclosingElement();
   29.46 +            }
   29.47 +        }
   29.48 +        return e;
   29.49 +    }
   29.50 +
   29.51      // http://www.w3.org/TR/html401/types.html#type-name
   29.52      private static final Pattern validName = Pattern.compile("[A-Za-z][A-Za-z0-9-_:.]*");
   29.53  
   29.54 @@ -712,6 +730,10 @@
   29.55  
   29.56      @Override
   29.57      public Void visitReference(ReferenceTree tree, Void ignore) {
   29.58 +        String sig = tree.getSignature();
   29.59 +        if (sig.contains("<") || sig.contains(">"))
   29.60 +            env.messages.error(REFERENCE, tree, "dc.type.arg.not.allowed");
   29.61 +
   29.62          Element e = env.trees.getElement(getCurrentPath());
   29.63          if (e == null)
   29.64              env.messages.error(REFERENCE, tree, "dc.ref.not.found");
   29.65 @@ -805,10 +827,33 @@
   29.66  
   29.67      @Override
   29.68      public Void visitValue(ValueTree tree, Void ignore) {
   29.69 +        ReferenceTree ref = tree.getReference();
   29.70 +        if (ref == null || ref.getSignature().isEmpty()) {
   29.71 +            if (!isConstant(env.currElement))
   29.72 +                env.messages.error(REFERENCE, tree, "dc.value.not.allowed.here");
   29.73 +        } else {
   29.74 +            Element e = env.trees.getElement(new DocTreePath(getCurrentPath(), ref));
   29.75 +            if (!isConstant(e))
   29.76 +                env.messages.error(REFERENCE, tree, "dc.value.not.a.constant");
   29.77 +        }
   29.78 +
   29.79          markEnclosingTag(Flag.HAS_INLINE_TAG);
   29.80          return super.visitValue(tree, ignore);
   29.81      }
   29.82  
   29.83 +    private boolean isConstant(Element e) {
   29.84 +        if (e == null)
   29.85 +            return false;
   29.86 +
   29.87 +        switch (e.getKind()) {
   29.88 +            case FIELD:
   29.89 +                Object value = ((VariableElement) e).getConstantValue();
   29.90 +                return (value != null); // can't distinguish "not a constant" from "constant is null"
   29.91 +            default:
   29.92 +                return false;
   29.93 +        }
   29.94 +    }
   29.95 +
   29.96      @Override
   29.97      public Void visitVersion(VersionTree tree, Void ignore) {
   29.98          warnIfEmpty(tree, tree.getBody());
    30.1 --- a/src/share/classes/com/sun/tools/doclint/DocLint.java	Thu Sep 26 10:43:55 2013 -0700
    30.2 +++ b/src/share/classes/com/sun/tools/doclint/DocLint.java	Thu Sep 26 17:23:00 2013 -0700
    30.3 @@ -29,9 +29,14 @@
    30.4  import java.io.IOException;
    30.5  import java.io.PrintWriter;
    30.6  import java.util.ArrayList;
    30.7 +import java.util.HashSet;
    30.8 +import java.util.LinkedList;
    30.9  import java.util.List;
   30.10 +import java.util.Queue;
   30.11 +import java.util.Set;
   30.12  
   30.13  import javax.lang.model.element.Name;
   30.14 +import javax.tools.JavaFileObject;
   30.15  import javax.tools.StandardLocation;
   30.16  
   30.17  import com.sun.source.doctree.DocCommentTree;
   30.18 @@ -278,15 +283,25 @@
   30.19              TaskListener tl = new TaskListener() {
   30.20                  @Override
   30.21                  public void started(TaskEvent e) {
   30.22 +                    switch (e.getKind()) {
   30.23 +                        case ANALYZE:
   30.24 +                            CompilationUnitTree tree;
   30.25 +                            while ((tree = todo.poll()) != null)
   30.26 +                                ds.scan(tree, null);
   30.27 +                            break;
   30.28 +                    }
   30.29                  }
   30.30  
   30.31                  @Override
   30.32                  public void finished(TaskEvent e) {
   30.33                      switch (e.getKind()) {
   30.34 -                        case ENTER:
   30.35 -                            ds.scan(e.getCompilationUnit(), null);
   30.36 +                        case PARSE:
   30.37 +                            todo.add(e.getCompilationUnit());
   30.38 +                            break;
   30.39                      }
   30.40                  }
   30.41 +
   30.42 +                Queue<CompilationUnitTree> todo = new LinkedList<CompilationUnitTree>();
   30.43              };
   30.44  
   30.45              task.addTaskListener(tl);
    31.1 --- a/src/share/classes/com/sun/tools/doclint/HtmlTag.java	Thu Sep 26 10:43:55 2013 -0700
    31.2 +++ b/src/share/classes/com/sun/tools/doclint/HtmlTag.java	Thu Sep 26 17:23:00 2013 -0700
    31.3 @@ -86,6 +86,9 @@
    31.4      DD(BlockType.LIST_ITEM, EndKind.OPTIONAL,
    31.5              EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE, Flag.EXPECT_CONTENT)),
    31.6  
    31.7 +    DFN(BlockType.INLINE, EndKind.REQUIRED,
    31.8 +            EnumSet.of(Flag.EXPECT_CONTENT, Flag.NO_NEST)),
    31.9 +
   31.10      DIV(BlockType.BLOCK, EndKind.REQUIRED,
   31.11              EnumSet.of(Flag.ACCEPTS_BLOCK, Flag.ACCEPTS_INLINE)),
   31.12  
    32.1 --- a/src/share/classes/com/sun/tools/doclint/resources/doclint.properties	Thu Sep 26 10:43:55 2013 -0700
    32.2 +++ b/src/share/classes/com/sun/tools/doclint/resources/doclint.properties	Thu Sep 26 17:23:00 2013 -0700
    32.3 @@ -67,7 +67,10 @@
    32.4  dc.tag.start.unmatched = end tag missing: </{0}>
    32.5  dc.tag.unknown = unknown tag: {0}
    32.6  dc.text.not.allowed = text not allowed in <{0}> element
    32.7 +dc.type.arg.not.allowed = type arguments not allowed here
    32.8  dc.unexpected.comment=documentation comment not expected here
    32.9 +dc.value.not.allowed.here='{@value}' not allowed here
   32.10 +dc.value.not.a.constant=value does not refer to a constant
   32.11  
   32.12  dc.main.ioerror=IO error: {0}
   32.13  dc.main.no.files.given=No files given
    33.1 --- a/src/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    33.2 +++ b/src/share/classes/com/sun/tools/doclint/resources/doclint_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    33.3 @@ -26,6 +26,7 @@
    33.4  dc.anchor.already.defined = \u30A2\u30F3\u30AB\u30FC\u304C\u3059\u3067\u306B\u5B9A\u7FA9\u3055\u308C\u3066\u3044\u307E\u3059: {0}
    33.5  dc.anchor.value.missing = \u30A2\u30F3\u30AB\u30FC\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
    33.6  dc.attr.lacks.value = \u5C5E\u6027\u306B\u5024\u304C\u3042\u308A\u307E\u305B\u3093
    33.7 +dc.attr.not.number = \u5C5E\u6027\u5024\u304C\u6570\u5B57\u3067\u306F\u3042\u308A\u307E\u305B\u3093
    33.8  dc.attr.obsolete = \u5C5E\u6027\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u307E\u3059: {0}
    33.9  dc.attr.obsolete.use.css = \u5C5E\u6027\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u307E\u3059\u3002\u304B\u308F\u308A\u306BCSS\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044: {0}
   33.10  dc.attr.repeated = \u7E70\u308A\u8FD4\u3055\u308C\u305F\u5C5E\u6027: {0}
   33.11 @@ -46,7 +47,7 @@
   33.12  dc.missing.throws = {0}\u306E@throws\u304C\u3042\u308A\u307E\u305B\u3093
   33.13  dc.no.alt.attr.for.image = \u30A4\u30E1\u30FC\u30B8\u306E"alt"\u5C5E\u6027\u304C\u3042\u308A\u307E\u305B\u3093
   33.14  dc.no.summary.or.caption.for.table=\u8868\u306E\u8981\u7D04\u307E\u305F\u306F\u30AD\u30E3\u30D7\u30B7\u30E7\u30F3\u304C\u3042\u308A\u307E\u305B\u3093
   33.15 -dc.param.name.not.found = @param\u540D\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
   33.16 +dc.param.name.not.found = @param name\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
   33.17  dc.ref.not.found = \u53C2\u7167\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093
   33.18  dc.tag.code.within.code = <code>\u5185\u306E'{@code'}
   33.19  dc.tag.empty = \u7A7A\u306E<{0}>\u30BF\u30B0
   33.20 @@ -66,3 +67,9 @@
   33.21  dc.tag.start.unmatched = \u7D42\u4E86\u30BF\u30B0\u304C\u3042\u308A\u307E\u305B\u3093: </{0}>
   33.22  dc.tag.unknown = \u4E0D\u660E\u306A\u30BF\u30B0: {0}
   33.23  dc.text.not.allowed = <{0}>\u8981\u7D20\u3067\u306F\u30C6\u30AD\u30B9\u30C8\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
   33.24 +dc.unexpected.comment=\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u30FB\u30B3\u30E1\u30F3\u30C8\u306F\u3053\u3053\u3067\u306F\u5FC5\u8981\u3042\u308A\u307E\u305B\u3093
   33.25 +
   33.26 +dc.main.ioerror=IO\u30A8\u30E9\u30FC: {0}
   33.27 +dc.main.no.files.given=\u30D5\u30A1\u30A4\u30EB\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
   33.28 +dc.main.usage=\u4F7F\u7528\u65B9\u6CD5:\n    doclint [options] source-files...\n\n\u30AA\u30D7\u30B7\u30E7\u30F3:\n  -Xmsgs  \n    -Xmsgs:all\u3068\u540C\u3058\n  -Xmsgs:values\n    \u30C1\u30A7\u30C3\u30AF\u3059\u308B\u554F\u984C\u306E\u30AB\u30C6\u30B4\u30EA\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002\u3053\u3053\u3067\u306E''values''\u306F\u3001\n    \u30AB\u30F3\u30DE\u3067\u533A\u5207\u3089\u308C\u305F\u6B21\u306E\u5024\u306E\u30EA\u30B9\u30C8\u3067\u3059:\n      reference      Java\u30BD\u30FC\u30B9\u30FB\u30B3\u30FC\u30C9\u8981\u7D20\u3078\u306E\u4E0D\u6B63\u306A\u53C2\u7167\u3092\u542B\u3080\u30B3\u30E1\u30F3\u30C8\u306E\n                     \u5834\u6240\u3092\u8868\u793A\u3057\u307E\u3059\n      syntax         \u30B3\u30E1\u30F3\u30C8\u5185\u306E\u57FA\u672C\u69CB\u6587\u30A8\u30E9\u30FC\u3092\u8868\u793A\u3057\u307E\u3059\n      html           HTML\u30BF\u30D6\u304A\u3088\u3073\u5C5E\u6027\u306E\u554F\u984C\u3092\u8868\u793A\u3057\u307E\u3059\n      accessibility  \u30A2\u30AF\u30BB\u30B7\u30D3\u30EA\u30C6\u30A3\u306E\u554F\u984C\u3092\u8868\u793A\u3057\u307E\u3059\n      missing        \u6B20\u843D\u3057\u3066\u3044\u308B\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u306E\u554F\u984C\u3092\u8868\u793A\u3057\u307E\u3059\n      all            \u524D\u8FF0\u306E\u3059\u3079\u3066\n    \u3053\u308C\u3092\u5426\u5B9A\u3059\u308B\u306B\u306F\u3001\u5024\u306E\u524D\u306B''-''\u3092\u6307\u5B9A\u3057\u307E\u3059\n    \u30AB\u30C6\u30B4\u30EA\u306F\u3001\u6B21\u306E\u3044\u305A\u308C\u304B\u3067\u4FEE\u98FE\u3067\u304D\u307E\u3059:\n      /public /protected /package /private\n    \u6B63\u306E\u30AB\u30C6\u30B4\u30EA(''-''\u3067\u59CB\u307E\u3089\u306A\u3044)\u306E\u5834\u5408\n    \u4FEE\u98FE\u5B50\u306F\u3001\u305D\u306E\u30A2\u30AF\u30BB\u30B9\u30FB\u30EC\u30D9\u30EB\u4EE5\u4E0A\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002\n    \u8CA0\u306E\u30AB\u30C6\u30B4\u30EA(''-''\u3067\u59CB\u307E\u308B)\u306E\u5834\u5408\n    \u4FEE\u98FE\u5B50\u306F\u3001\u305D\u306E\u30A2\u30AF\u30BB\u30B9\u30FB\u30EC\u30D9\u30EB\u4EE5\u4E0B\u306B\u9069\u7528\u3055\u308C\u307E\u3059\u3002\n    \u4FEE\u98FE\u5B50\u304C\u306A\u3044\u5834\u5408\u3001\u30AB\u30C6\u30B4\u30EA\u306F\u3059\u3079\u3066\u306E\u30A2\u30AF\u30BB\u30B9\u30FB\u30EC\u30D9\u30EB\u306B\n    \u9069\u7528\u3055\u308C\u307E\u3059\u3002\n    \u4F8B: -Xmsgs:all,-syntax/private\n    \u3053\u306E\u5834\u5408\u3001private\u30E1\u30BD\u30C3\u30C9\u306Edoc\u30B3\u30E1\u30F3\u30C8\u5185\u306E\u69CB\u6587\u30A8\u30E9\u30FC\u3092\u9664\u304D\u3001\n    \u3059\u3079\u3066\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u6709\u52B9\u5316\u3055\u308C\u307E\u3059\u3002\n    -Xmsgs\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u306A\u3044\u5834\u5408\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u306F\u3001\n    -Xmsgs:all/protected\u3068\u540C\u7B49\u306B\u306A\u308A\u3001\u3053\u308C\u306F\n    \u3059\u3079\u3066\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u3001protected\u304A\u3088\u3073public\u306E\u5BA3\u8A00\u306E\u307F\u306B\u5831\u544A\u3055\u308C\u308B\u3053\u3068\u3092\n    \u610F\u5473\u3057\u307E\u3059\u3002\n  -stats\n    \u5831\u544A\u3055\u308C\u305F\u554F\u984C\u306B\u5BFE\u3057\u3066\u7D71\u8A08\u3092\u5831\u544A\u3057\u307E\u3059\u3002\n  -h -help --help -usage -?\n    \u3053\u306E\u30E1\u30C3\u30BB\u30FC\u30B8\u304C\u8868\u793A\u3055\u308C\u307E\u3059\u3002\n\n\u6B21\u306Ejavac\u30AA\u30D7\u30B7\u30E7\u30F3\u3082\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u3066\u3044\u307E\u3059\n  \
   33.29 +-bootclasspath\u3001-classpath\u3001-cp\u3001-sourcepath\u3001-Xmaxerrs\u3001-Xmaxwarns\n\n\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u4E00\u90E8\u306B\u5BFE\u3057\u3066doclint\u3092\u5B9F\u884C\u3059\u308B\u306B\u306F\u3001\u30D7\u30ED\u30B8\u30A7\u30AF\u30C8\u306E\u30B3\u30F3\u30D1\u30A4\u30EB\u3055\u308C\u305F\u30AF\u30E9\u30B9\u3092\n\u30AF\u30E9\u30B9\u30D1\u30B9(\u307E\u305F\u306F\u30D6\u30FC\u30C8\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9)\u306B\u6307\u5B9A\u3057\u3001\u30B3\u30DE\u30F3\u30C9\u30FB\u30E9\u30A4\u30F3\u3067\n\u30C1\u30A7\u30C3\u30AF\u3059\u308B\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u6307\u5B9A\u3057\u307E\u3059\u3002
    34.1 --- a/src/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    34.2 +++ b/src/share/classes/com/sun/tools/doclint/resources/doclint_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    34.3 @@ -26,6 +26,7 @@
    34.4  dc.anchor.already.defined = \u951A\u5B9A\u70B9\u5DF2\u5B9A\u4E49: {0}
    34.5  dc.anchor.value.missing = \u6CA1\u6709\u4E3A\u951A\u5B9A\u70B9\u6307\u5B9A\u503C
    34.6  dc.attr.lacks.value = \u5C5E\u6027\u7F3A\u5C11\u503C
    34.7 +dc.attr.not.number = \u5C5E\u6027\u503C\u4E0D\u662F\u6570\u5B57
    34.8  dc.attr.obsolete = \u5C5E\u6027\u5DF2\u8FC7\u65F6: {0}
    34.9  dc.attr.obsolete.use.css = \u5C5E\u6027\u5DF2\u8FC7\u65F6, \u8BF7\u6539\u7528 CSS: {0}
   34.10  dc.attr.repeated = \u5C5E\u6027\u91CD\u590D: {0}
   34.11 @@ -46,7 +47,7 @@
   34.12  dc.missing.throws = {0}\u6CA1\u6709 @throws
   34.13  dc.no.alt.attr.for.image = \u56FE\u50CF\u6CA1\u6709 "alt" \u5C5E\u6027
   34.14  dc.no.summary.or.caption.for.table=\u8868\u6CA1\u6709\u6982\u8981\u6216\u6807\u9898
   34.15 -dc.param.name.not.found = \u627E\u4E0D\u5230 @param \u540D\u79F0
   34.16 +dc.param.name.not.found = @param name \u672A\u627E\u5230
   34.17  dc.ref.not.found = \u627E\u4E0D\u5230\u5F15\u7528
   34.18  dc.tag.code.within.code = '{@code'} \u5728 <code> \u4E2D
   34.19  dc.tag.empty = <{0}> \u6807\u8BB0\u4E3A\u7A7A
   34.20 @@ -66,3 +67,8 @@
   34.21  dc.tag.start.unmatched = \u7F3A\u5C11\u7ED3\u675F\u6807\u8BB0: </{0}>
   34.22  dc.tag.unknown = \u672A\u77E5\u6807\u8BB0: {0}
   34.23  dc.text.not.allowed = <{0}> \u5143\u7D20\u4E2D\u4E0D\u5141\u8BB8\u4F7F\u7528\u6587\u672C
   34.24 +dc.unexpected.comment=\u6B64\u5904\u672A\u9884\u671F\u6587\u6863\u6CE8\u91CA
   34.25 +
   34.26 +dc.main.ioerror=IO \u9519\u8BEF: {0}
   34.27 +dc.main.no.files.given=\u672A\u6307\u5B9A\u6587\u4EF6
   34.28 +dc.main.usage=\u7528\u6CD5:\n    doclint [options] source-files...\n\n\u9009\u9879:\n  -Xmsgs  \n    \u4E0E -Xmsgs:all \u76F8\u540C\n  -Xmsgs:values\n    \u6307\u5B9A\u8981\u68C0\u67E5\u7684\u95EE\u9898\u7684\u7C7B\u522B, \u5176\u4E2D ''values''\n    \u662F\u4EFB\u610F\u4EE5\u4E0B\u5185\u5BB9\u7684\u4EE5\u9017\u53F7\u5206\u9694\u7684\u5217\u8868:\n      reference      \u663E\u793A\u5305\u542B\u5BF9 Java \u6E90\u4EE3\u7801\u5143\u7D20\n                     \u9519\u8BEF\u5F15\u7528\u7684\u6CE8\u91CA\u7684\u4F4D\u7F6E\n      syntax         \u663E\u793A\u6CE8\u91CA\u4E2D\u7684\u57FA\u672C\u8BED\u6CD5\u9519\u8BEF\n      html           \u663E\u793A HTML \u6807\u8BB0\u548C\u5C5E\u6027\u95EE\u9898\n      accessibility  \u663E\u793A\u53EF\u8BBF\u95EE\u6027\u7684\u95EE\u9898\n      missing        \u663E\u793A\u7F3A\u5C11\u6587\u6863\u7684\u95EE\u9898\n      all            \u6240\u6709\u4EE5\u4E0A\u5185\u5BB9\n    \u5728\u503C\u4E4B\u524D\u4F7F\u7528 ''-'' \u53EF\u4F7F\u7528\u5176\u53CD\u503C\n    \u53EF\u4EE5\u4F7F\u7528\u4EE5\u4E0B\u4E00\u9879\u6765\u9650\u5B9A\u7C7B\u522B:\n      /public /protected /package /private\n    \u5BF9\u4E8E\u6B63\u7C7B\u522B (\u4E0D\u4EE5 ''-'' \u5F00\u5934)\n    \u9650\u5B9A\u7B26\u9002\u7528\u4E8E\u8BE5\u8BBF\u95EE\u7EA7\u522B\u53CA\u66F4\u9AD8\u7EA7\u522B\u3002\n    \u5BF9\u4E8E\u8D1F\u7C7B\u522B (\u4EE5 ''-'' \u5F00\u5934)\n    \u9650\u5B9A\u7B26\u9002\u7528\u4E8E\u8BE5\u8BBF\u95EE\u7EA7\u522B\u53CA\u66F4\u4F4E\u7EA7\u522B\u3002\n    \u5982\u679C\u6CA1\u6709\u9650\u5B9A\u7B26, \u5219\u8BE5\u7C7B\u522B\u9002\u7528\u4E8E\n    \u6240\u6709\u8BBF\u95EE\u7EA7\u522B\u3002\n    \u4F8B\u5982, -Xmsgs:all,-syntax/private\n    \u8FD9\u5C06\u5728\u4E13\u7528\u65B9\u6CD5\u7684\u6587\u6863\u6CE8\u91CA\u4E2D\n    \u542F\u7528\u9664\u8BED\u6CD5\u9519\u8BEF\u4E4B\u5916\u7684\u6240\u6709\u6D88\u606F\u3002\n    \u5982\u679C\u672A\u63D0\u4F9B -Xmsgs \u9009\u9879, \u5219\u9ED8\u8BA4\u503C\n    \u7B49\u540C\u4E8E -Xmsgs:all/protected, \u8868\u793A\n    \u4EC5\u62A5\u544A\u53D7\u4FDD\u62A4\u548C\u516C\u5171\u58F0\u660E\u4E2D\u7684\n    \u6240\u6709\u6D88\u606F\n  -stats\n    \u62A5\u544A\u6240\u62A5\u544A\u95EE\u9898\u7684\u7EDF\u8BA1\u4FE1\u606F\u3002\n  -h -help --help -usage -?\n    \u663E\u793A\u6B64\u6D88\u606F\u3002\n\n\u8FD8\u652F\u6301\u4EE5\u4E0B javac \u9009\u9879\n  -bootclasspath, -classpath, -cp, -sourcepath, -Xmaxerrs, -Xmaxwarns\n\n\u8981\u5728\u9879\u76EE\u7684\u4E00\u90E8\u5206\u4E0A\u8FD0\u884C doclint, \u8BF7\u5C06\u9879\u76EE\u4E2D\u5DF2\u7F16\u8BD1\u7684\u7C7B\n\u653E\u5728\u7C7B\u8DEF\u5F84 (\u6216\u5F15\u5BFC\u7C7B\u8DEF\u5F84) \u4E0A, \u7136\u540E\u5728\u547D\u4EE4\u884C\u4E0A\u6307\u5B9A\n\u8981\u68C0\u67E5\u7684\u6E90\u6587\u4EF6\u3002
    35.1 --- a/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Thu Sep 26 10:43:55 2013 -0700
    35.2 +++ b/src/share/classes/com/sun/tools/javac/api/JavacTaskImpl.java	Thu Sep 26 17:23:00 2013 -0700
    35.3 @@ -472,7 +472,7 @@
    35.4              for (TypeElement item: classes)
    35.5                  set.add(item);
    35.6  
    35.7 -            ListBuffer<Env<AttrContext>> defer = ListBuffer.<Env<AttrContext>>lb();
    35.8 +            ListBuffer<Env<AttrContext>> defer = new ListBuffer<>();
    35.9              while (list.peek() != null) {
   35.10                  Env<AttrContext> env = list.remove();
   35.11                  ClassSymbol csym = env.enclClass.sym;
    36.1 --- a/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java	Thu Sep 26 10:43:55 2013 -0700
    36.2 +++ b/src/share/classes/com/sun/tools/javac/code/DeferredLintHandler.java	Thu Sep 26 17:23:00 2013 -0700
    36.3 @@ -81,7 +81,7 @@
    36.4          } else {
    36.5              ListBuffer<LintLogger> loggers = loggersQueue.get(currentPos);
    36.6              if (loggers == null) {
    36.7 -                loggersQueue.put(currentPos, loggers = ListBuffer.<LintLogger>lb());
    36.8 +                loggersQueue.put(currentPos, loggers = new ListBuffer<>());
    36.9              }
   36.10              loggers.append(logger);
   36.11          }
    37.1 --- a/src/share/classes/com/sun/tools/javac/code/Flags.java	Thu Sep 26 10:43:55 2013 -0700
    37.2 +++ b/src/share/classes/com/sun/tools/javac/code/Flags.java	Thu Sep 26 17:23:00 2013 -0700
    37.3 @@ -261,7 +261,7 @@
    37.4      public static final long SIGNATURE_POLYMORPHIC = 1L<<46;
    37.5  
    37.6      /**
    37.7 -     * Flag that marks inference variables used in a 'throws' clause
    37.8 +     * Flag that indicates that an inference variable is used in a 'throws' clause.
    37.9       */
   37.10      public static final long THROWS = 1L<<47;
   37.11  
    38.1 --- a/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Sep 26 10:43:55 2013 -0700
    38.2 +++ b/src/share/classes/com/sun/tools/javac/code/Printer.java	Thu Sep 26 17:23:00 2013 -0700
    38.3 @@ -103,7 +103,7 @@
    38.4       * @return localized string representation
    38.5       */
    38.6      public String visitTypes(List<Type> ts, Locale locale) {
    38.7 -        ListBuffer<String> sbuf = ListBuffer.lb();
    38.8 +        ListBuffer<String> sbuf = new ListBuffer<>();
    38.9          for (Type t : ts) {
   38.10              sbuf.append(visit(t, locale));
   38.11          }
   38.12 @@ -118,7 +118,7 @@
   38.13       * @return localized string representation
   38.14       */
   38.15      public String visitSymbols(List<Symbol> ts, Locale locale) {
   38.16 -        ListBuffer<String> sbuf = ListBuffer.lb();
   38.17 +        ListBuffer<String> sbuf = new ListBuffer<>();
   38.18          for (Symbol t : ts) {
   38.19              sbuf.append(visit(t, locale));
   38.20          }
    39.1 --- a/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Sep 26 10:43:55 2013 -0700
    39.2 +++ b/src/share/classes/com/sun/tools/javac/code/Symbol.java	Thu Sep 26 17:23:00 2013 -0700
    39.3 @@ -614,7 +614,7 @@
    39.4      }
    39.5  
    39.6      public List<TypeVariableSymbol> getTypeParameters() {
    39.7 -        ListBuffer<TypeVariableSymbol> l = ListBuffer.lb();
    39.8 +        ListBuffer<TypeVariableSymbol> l = new ListBuffer<>();
    39.9          for (Type t : type.getTypeArguments()) {
   39.10              Assert.check(t.tsym.getKind() == ElementKind.TYPE_PARAMETER);
   39.11              l.append((TypeVariableSymbol)t.tsym);
    40.1 --- a/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Sep 26 10:43:55 2013 -0700
    40.2 +++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Sep 26 17:23:00 2013 -0700
    40.3 @@ -433,7 +433,7 @@
    40.4      }
    40.5  
    40.6      public static List<Type> filter(List<Type> ts, Filter<Type> tf) {
    40.7 -        ListBuffer<Type> buf = ListBuffer.lb();
    40.8 +        ListBuffer<Type> buf = new ListBuffer<>();
    40.9          for (Type t : ts) {
   40.10              if (tf.accepts(t)) {
   40.11                  buf.append(t);
   40.12 @@ -977,7 +977,7 @@
   40.13          }
   40.14  
   40.15          public java.util.List<? extends TypeMirror> getBounds() {
   40.16 -            return Collections.unmodifiableList(getComponents());
   40.17 +            return Collections.unmodifiableList(getExplicitComponents());
   40.18          }
   40.19  
   40.20          public List<Type> getComponents() {
   40.21 @@ -1496,7 +1496,7 @@
   40.22  
   40.23          /** get all bounds of a given kind */
   40.24          public List<Type> getBounds(InferenceBound... ibs) {
   40.25 -            ListBuffer<Type> buf = ListBuffer.lb();
   40.26 +            ListBuffer<Type> buf = new ListBuffer<>();
   40.27              for (InferenceBound ib : ibs) {
   40.28                  buf.appendList(bounds.get(ib));
   40.29              }
   40.30 @@ -1505,7 +1505,7 @@
   40.31  
   40.32          /** get the list of declared (upper) bounds */
   40.33          public List<Type> getDeclaredBounds() {
   40.34 -            ListBuffer<Type> buf = ListBuffer.lb();
   40.35 +            ListBuffer<Type> buf = new ListBuffer<>();
   40.36              int count = 0;
   40.37              for (Type b : getBounds(InferenceBound.UPPER)) {
   40.38                  if (count++ == declaredCount) break;
   40.39 @@ -1565,8 +1565,8 @@
   40.40                  for (Map.Entry<InferenceBound, List<Type>> _entry : bounds.entrySet()) {
   40.41                      InferenceBound ib = _entry.getKey();
   40.42                      List<Type> prevBounds = _entry.getValue();
   40.43 -                    ListBuffer<Type> newBounds = ListBuffer.lb();
   40.44 -                    ListBuffer<Type> deps = ListBuffer.lb();
   40.45 +                    ListBuffer<Type> newBounds = new ListBuffer<>();
   40.46 +                    ListBuffer<Type> deps = new ListBuffer<>();
   40.47                      //step 1 - re-add bounds that are not dependent on ivars
   40.48                      for (Type t : prevBounds) {
   40.49                          if (!t.containsAny(instVars)) {
    41.1 --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Thu Sep 26 10:43:55 2013 -0700
    41.2 +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotationPosition.java	Thu Sep 26 17:23:00 2013 -0700
    41.3 @@ -304,7 +304,7 @@
    41.4       * @param list The bytecode representation of the type path.
    41.5       */
    41.6      public static List<TypePathEntry> getTypePathFromBinary(java.util.List<Integer> list) {
    41.7 -        ListBuffer<TypePathEntry> loc = ListBuffer.lb();
    41.8 +        ListBuffer<TypePathEntry> loc = new ListBuffer<>();
    41.9          Iterator<Integer> iter = list.iterator();
   41.10          while (iter.hasNext()) {
   41.11              Integer fst = iter.next();
   41.12 @@ -316,7 +316,7 @@
   41.13      }
   41.14  
   41.15      public static List<Integer> getBinaryFromTypePath(java.util.List<TypePathEntry> locs) {
   41.16 -        ListBuffer<Integer> loc = ListBuffer.lb();
   41.17 +        ListBuffer<Integer> loc = new ListBuffer<>();
   41.18          for (TypePathEntry tpe : locs) {
   41.19              loc = loc.append(tpe.tag.tag);
   41.20              loc = loc.append(tpe.arg);
    42.1 --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Thu Sep 26 10:43:55 2013 -0700
    42.2 +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java	Thu Sep 26 17:23:00 2013 -0700
    42.3 @@ -31,10 +31,7 @@
    42.4  
    42.5  import javax.tools.JavaFileObject;
    42.6  
    42.7 -import com.sun.tools.javac.code.Attribute;
    42.8  import com.sun.tools.javac.code.Attribute.TypeCompound;
    42.9 -import com.sun.tools.javac.code.Flags;
   42.10 -import com.sun.tools.javac.code.Kinds;
   42.11  import com.sun.tools.javac.code.Type.AnnotatedType;
   42.12  import com.sun.tools.javac.code.Type.ArrayType;
   42.13  import com.sun.tools.javac.code.Type.CapturedType;
   42.14 @@ -49,7 +46,6 @@
   42.15  import com.sun.tools.javac.code.Type.WildcardType;
   42.16  import com.sun.tools.javac.code.TypeAnnotationPosition.TypePathEntry;
   42.17  import com.sun.tools.javac.code.TypeAnnotationPosition.TypePathEntryKind;
   42.18 -import com.sun.tools.javac.code.TypeTag;
   42.19  import com.sun.tools.javac.code.Symbol.VarSymbol;
   42.20  import com.sun.tools.javac.code.Symbol.MethodSymbol;
   42.21  import com.sun.tools.javac.comp.Annotate;
   42.22 @@ -70,6 +66,7 @@
   42.23  import com.sun.tools.javac.tree.TreeScanner;
   42.24  import com.sun.tools.javac.tree.JCTree.*;
   42.25  import com.sun.tools.javac.util.Assert;
   42.26 +import com.sun.tools.javac.util.Context;
   42.27  import com.sun.tools.javac.util.List;
   42.28  import com.sun.tools.javac.util.ListBuffer;
   42.29  import com.sun.tools.javac.util.Log;
   42.30 @@ -83,8 +80,28 @@
   42.31   * and determine the TypeAnnotationPositions for all type annotations.
   42.32   */
   42.33  public class TypeAnnotations {
   42.34 -    // Class cannot be instantiated.
   42.35 -    private TypeAnnotations() {}
   42.36 +    protected static final Context.Key<TypeAnnotations> typeAnnosKey =
   42.37 +        new Context.Key<TypeAnnotations>();
   42.38 +
   42.39 +    public static TypeAnnotations instance(Context context) {
   42.40 +        TypeAnnotations instance = context.get(typeAnnosKey);
   42.41 +        if (instance == null)
   42.42 +            instance = new TypeAnnotations(context);
   42.43 +        return instance;
   42.44 +    }
   42.45 +
   42.46 +    final Log log;
   42.47 +    final Names names;
   42.48 +    final Symtab syms;
   42.49 +    final Annotate annotate;
   42.50 +
   42.51 +    protected TypeAnnotations(Context context) {
   42.52 +        context.put(typeAnnosKey, this);
   42.53 +        names = Names.instance(context);
   42.54 +        log = Log.instance(context);
   42.55 +        syms = Symtab.instance(context);
   42.56 +        annotate = Annotate.instance(context);
   42.57 +    }
   42.58  
   42.59      /**
   42.60       * Separate type annotations from declaration annotations and
   42.61 @@ -95,15 +112,14 @@
   42.62       * adds an Annotator to the correct Annotate queue for
   42.63       * later processing.
   42.64       */
   42.65 -    public static void organizeTypeAnnotationsSignatures(final Symtab syms, final Names names,
   42.66 -            final Log log, final Env<AttrContext> env, final JCClassDecl tree, final Annotate annotate) {
   42.67 +    public void organizeTypeAnnotationsSignatures(final Env<AttrContext> env, final JCClassDecl tree) {
   42.68          annotate.afterRepeated( new Annotator() {
   42.69              @Override
   42.70              public void enterAnnotation() {
   42.71                  JavaFileObject oldSource = log.useSource(env.toplevel.sourcefile);
   42.72  
   42.73                  try {
   42.74 -                    new TypeAnnotationPositions(syms, names, log, true).scan(tree);
   42.75 +                    new TypeAnnotationPositions(true).scan(tree);
   42.76                  } finally {
   42.77                      log.useSource(oldSource);
   42.78                  }
   42.79 @@ -115,8 +131,8 @@
   42.80       * This version only visits types in bodies, that is, field initializers,
   42.81       * top-level blocks, and method bodies, and should be called from Attr.
   42.82       */
   42.83 -    public static void organizeTypeAnnotationsBodies(Symtab syms, Names names, Log log, JCClassDecl tree) {
   42.84 -        new TypeAnnotationPositions(syms, names, log, false).scan(tree);
   42.85 +    public void organizeTypeAnnotationsBodies(JCClassDecl tree) {
   42.86 +        new TypeAnnotationPositions(false).scan(tree);
   42.87      }
   42.88  
   42.89      public enum AnnotationType { DECLARATION, TYPE, BOTH };
   42.90 @@ -125,8 +141,7 @@
   42.91       * Determine whether an annotation is a declaration annotation,
   42.92       * a type annotation, or both.
   42.93       */
   42.94 -    public static AnnotationType annotationType(Symtab syms, Names names,
   42.95 -            Attribute.Compound a, Symbol s) {
   42.96 +    public AnnotationType annotationType(Attribute.Compound a, Symbol s) {
   42.97          Attribute.Compound atTarget =
   42.98              a.type.tsym.attribute(syms.annotationTargetType.tsym);
   42.99          if (atTarget == null) {
  42.100 @@ -215,17 +230,11 @@
  42.101      }
  42.102  
  42.103  
  42.104 -    private static class TypeAnnotationPositions extends TreeScanner {
  42.105 +    private class TypeAnnotationPositions extends TreeScanner {
  42.106  
  42.107 -        private final Symtab syms;
  42.108 -        private final Names names;
  42.109 -        private final Log log;
  42.110          private final boolean sigOnly;
  42.111  
  42.112 -        private TypeAnnotationPositions(Symtab syms, Names names, Log log, boolean sigOnly) {
  42.113 -            this.syms = syms;
  42.114 -            this.names = names;
  42.115 -            this.log = log;
  42.116 +        TypeAnnotationPositions(boolean sigOnly) {
  42.117              this.sigOnly = sigOnly;
  42.118          }
  42.119  
  42.120 @@ -233,7 +242,7 @@
  42.121           * When traversing the AST we keep the "frames" of visited
  42.122           * trees in order to determine the position of annotations.
  42.123           */
  42.124 -        private ListBuffer<JCTree> frames = ListBuffer.lb();
  42.125 +        private ListBuffer<JCTree> frames = new ListBuffer<>();
  42.126  
  42.127          protected void push(JCTree t) { frames = frames.prepend(t); }
  42.128          protected JCTree pop() { return frames.next(); }
  42.129 @@ -265,7 +274,7 @@
  42.130              ListBuffer<Attribute.TypeCompound> typeAnnos = new ListBuffer<Attribute.TypeCompound>();
  42.131  
  42.132              for (Attribute.Compound a : annotations) {
  42.133 -                switch (annotationType(syms, names, a, sym)) {
  42.134 +                switch (annotationType(a, sym)) {
  42.135                  case DECLARATION:
  42.136                      declAnnos.append(a);
  42.137                      break;
  42.138 @@ -301,7 +310,7 @@
  42.139              }
  42.140  
  42.141              // type is non-null and annotations are added to that type
  42.142 -            type = typeWithAnnotations(typetree, type, typeAnnotations, log);
  42.143 +            type = typeWithAnnotations(typetree, type, typeAnnotations);
  42.144  
  42.145              if (sym.getKind() == ElementKind.METHOD) {
  42.146                  sym.type.asMethodType().restype = type;
  42.147 @@ -352,8 +361,8 @@
  42.148          //
  42.149          // As a side effect the method sets the type annotation position of "annotations".
  42.150          // Note that it is assumed that all annotations share the same position.
  42.151 -        private static Type typeWithAnnotations(final JCTree typetree, final Type type,
  42.152 -                final List<Attribute.TypeCompound> annotations, Log log) {
  42.153 +        private Type typeWithAnnotations(final JCTree typetree, final Type type,
  42.154 +                final List<Attribute.TypeCompound> annotations) {
  42.155              // System.out.printf("typeWithAnnotations(typetree: %s, type: %s, annotations: %s)%n",
  42.156              //         typetree, type, annotations);
  42.157              if (annotations.isEmpty()) {
  42.158 @@ -381,7 +390,7 @@
  42.159                  }
  42.160                  JCArrayTypeTree arTree = arrayTypeTree(typetree);
  42.161  
  42.162 -                ListBuffer<TypePathEntry> depth = ListBuffer.lb();
  42.163 +                ListBuffer<TypePathEntry> depth = new ListBuffer<>();
  42.164                  depth = depth.append(TypePathEntry.ARRAY);
  42.165                  while (arType.elemtype.hasTag(TypeTag.ARRAY)) {
  42.166                      if (arType.elemtype.isAnnotated()) {
  42.167 @@ -400,7 +409,7 @@
  42.168                      arTree = arrayTypeTree(arTree.elemtype);
  42.169                      depth = depth.append(TypePathEntry.ARRAY);
  42.170                  }
  42.171 -                Type arelemType = typeWithAnnotations(arTree.elemtype, arType.elemtype, annotations, log);
  42.172 +                Type arelemType = typeWithAnnotations(arTree.elemtype, arType.elemtype, annotations);
  42.173                  tomodify.elemtype = arelemType;
  42.174                  {
  42.175                      // All annotations share the same position; modify the first one.
  42.176 @@ -417,7 +426,7 @@
  42.177                  // There is a TypeKind, but no TypeTag.
  42.178                  JCTypeUnion tutree = (JCTypeUnion) typetree;
  42.179                  JCExpression fst = tutree.alternatives.get(0);
  42.180 -                Type res = typeWithAnnotations(fst, fst.type, annotations, log);
  42.181 +                Type res = typeWithAnnotations(fst, fst.type, annotations);
  42.182                  fst.type = res;
  42.183                  // TODO: do we want to set res as first element in uct.alternatives?
  42.184                  // UnionClassType uct = (com.sun.tools.javac.code.Type.UnionClassType)type;
  42.185 @@ -473,7 +482,7 @@
  42.186                  // the correct nesting.
  42.187  
  42.188                  // The genericLocation for the annotation.
  42.189 -                ListBuffer<TypePathEntry> depth = ListBuffer.lb();
  42.190 +                ListBuffer<TypePathEntry> depth = new ListBuffer<>();
  42.191  
  42.192                  Type topTy = enclTy;
  42.193                  while (enclEl != null &&
  42.194 @@ -505,7 +514,7 @@
  42.195              }
  42.196          }
  42.197  
  42.198 -        private static JCArrayTypeTree arrayTypeTree(JCTree typetree) {
  42.199 +        private JCArrayTypeTree arrayTypeTree(JCTree typetree) {
  42.200              if (typetree.getKind() == JCTree.Kind.ARRAY_TYPE) {
  42.201                  return (JCArrayTypeTree) typetree;
  42.202              } else if (typetree.getKind() == JCTree.Kind.ANNOTATED_TYPE) {
  42.203 @@ -532,7 +541,7 @@
  42.204           * @param annotations The annotations to insert.
  42.205           * @return A copy of type that contains the annotations.
  42.206           */
  42.207 -        private static Type typeWithAnnotations(final Type type,
  42.208 +        private Type typeWithAnnotations(final Type type,
  42.209                  final Type stopAt,
  42.210                  final List<Attribute.TypeCompound> annotations) {
  42.211              Visitor<Type, List<TypeCompound>> visitor =
  42.212 @@ -619,7 +628,7 @@
  42.213              return type.accept(visitor, annotations);
  42.214          }
  42.215  
  42.216 -        private static Attribute.TypeCompound toTypeCompound(Attribute.Compound a, TypeAnnotationPosition p) {
  42.217 +        private Attribute.TypeCompound toTypeCompound(Attribute.Compound a, TypeAnnotationPosition p) {
  42.218              // It is safe to alias the position.
  42.219              return new Attribute.TypeCompound(a, p);
  42.220          }
  42.221 @@ -793,7 +802,7 @@
  42.222                  }
  42.223  
  42.224                  case ARRAY_TYPE: {
  42.225 -                    ListBuffer<TypePathEntry> index = ListBuffer.lb();
  42.226 +                    ListBuffer<TypePathEntry> index = new ListBuffer<>();
  42.227                      index = index.append(TypePathEntry.ARRAY);
  42.228                      List<JCTree> newPath = path.tail;
  42.229                      while (true) {
  42.230 @@ -953,10 +962,10 @@
  42.231              }
  42.232          }
  42.233  
  42.234 -        private static void locateNestedTypes(Type type, TypeAnnotationPosition p) {
  42.235 +        private void locateNestedTypes(Type type, TypeAnnotationPosition p) {
  42.236              // The number of "steps" to get from the full type to the
  42.237              // left-most outer type.
  42.238 -            ListBuffer<TypePathEntry> depth = ListBuffer.lb();
  42.239 +            ListBuffer<TypePathEntry> depth = new ListBuffer<>();
  42.240  
  42.241              Type encl = type.getEnclosingType();
  42.242              while (encl != null &&
  42.243 @@ -970,7 +979,7 @@
  42.244              }
  42.245          }
  42.246  
  42.247 -        private static int methodParamIndex(List<JCTree> path, JCTree param) {
  42.248 +        private int methodParamIndex(List<JCTree> path, JCTree param) {
  42.249              List<JCTree> curr = path;
  42.250              while (curr.head.getTag() != Tag.METHODDEF &&
  42.251                      curr.head.getTag() != Tag.LAMBDA) {
  42.252 @@ -1226,7 +1235,7 @@
  42.253          public void visitNewArray(JCNewArray tree) {
  42.254              findPosition(tree, tree, tree.annotations);
  42.255              int dimAnnosCount = tree.dimAnnotations.size();
  42.256 -            ListBuffer<TypePathEntry> depth = ListBuffer.lb();
  42.257 +            ListBuffer<TypePathEntry> depth = new ListBuffer<>();
  42.258  
  42.259              // handle annotations associated with dimensions
  42.260              for (int i = 0; i < dimAnnosCount; ++i) {
  42.261 @@ -1284,7 +1293,7 @@
  42.262              }
  42.263          }
  42.264  
  42.265 -        private static void setTypeAnnotationPos(List<JCAnnotation> annotations,
  42.266 +        private void setTypeAnnotationPos(List<JCAnnotation> annotations,
  42.267                  TypeAnnotationPosition position) {
  42.268              for (JCAnnotation anno : annotations) {
  42.269                  // attribute might be null during DeferredAttr;
    43.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Sep 26 10:43:55 2013 -0700
    43.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Sep 26 17:23:00 2013 -0700
    43.3 @@ -51,7 +51,6 @@
    43.4  import static com.sun.tools.javac.code.Type.*;
    43.5  import static com.sun.tools.javac.code.TypeTag.*;
    43.6  import static com.sun.tools.javac.jvm.ClassFile.externalize;
    43.7 -import static com.sun.tools.javac.util.ListBuffer.lb;
    43.8  
    43.9  /**
   43.10   * Utility class containing various operations on types.
   43.11 @@ -411,7 +410,7 @@
   43.12                  throw failure("not.a.functional.intf", origin);
   43.13              }
   43.14  
   43.15 -            final ListBuffer<Symbol> abstracts = ListBuffer.lb();
   43.16 +            final ListBuffer<Symbol> abstracts = new ListBuffer<>();
   43.17              for (Symbol sym : membersCache.getElements(new DescriptorFilter(origin))) {
   43.18                  Type mtype = memberType(origin.type, sym);
   43.19                  if (abstracts.isEmpty() ||
   43.20 @@ -434,7 +433,7 @@
   43.21                  FunctionDescriptor descRes = mergeDescriptors(origin, abstracts.toList());
   43.22                  if (descRes == null) {
   43.23                      //we can get here if the functional interface is ill-formed
   43.24 -                    ListBuffer<JCDiagnostic> descriptors = ListBuffer.lb();
   43.25 +                    ListBuffer<JCDiagnostic> descriptors = new ListBuffer<>();
   43.26                      for (Symbol desc : abstracts) {
   43.27                          String key = desc.type.getThrownTypes().nonEmpty() ?
   43.28                                  "descriptor.throws" : "descriptor";
   43.29 @@ -596,7 +595,7 @@
   43.30          Type capturedSite = capture(site);
   43.31          if (capturedSite != site) {
   43.32              Type formalInterface = site.tsym.type;
   43.33 -            ListBuffer<Type> typeargs = ListBuffer.lb();
   43.34 +            ListBuffer<Type> typeargs = new ListBuffer<>();
   43.35              List<Type> actualTypeargs = site.getTypeArguments();
   43.36              List<Type> capturedTypeargs = capturedSite.getTypeArguments();
   43.37              //simply replace the wildcards with its bound
   43.38 @@ -662,7 +661,7 @@
   43.39          Assert.check(isFunctionalInterface(origin));
   43.40          Symbol descSym = findDescriptorSymbol(origin);
   43.41          CompoundScope members = membersClosure(origin.type, false);
   43.42 -        ListBuffer<Symbol> overridden = ListBuffer.lb();
   43.43 +        ListBuffer<Symbol> overridden = new ListBuffer<>();
   43.44          outer: for (Symbol m2 : members.getElementsByName(descSym.name, bridgeFilter)) {
   43.45              if (m2 == descSym) continue;
   43.46              else if (descSym.overrides(m2, origin, Types.this, false)) {
   43.47 @@ -885,12 +884,12 @@
   43.48              private Type rewriteSupers(Type t) {
   43.49                  if (!t.isParameterized())
   43.50                      return t;
   43.51 -                ListBuffer<Type> from = lb();
   43.52 -                ListBuffer<Type> to = lb();
   43.53 +                ListBuffer<Type> from = new ListBuffer<>();
   43.54 +                ListBuffer<Type> to = new ListBuffer<>();
   43.55                  adaptSelf(t, from, to);
   43.56                  if (from.isEmpty())
   43.57                      return t;
   43.58 -                ListBuffer<Type> rewrite = lb();
   43.59 +                ListBuffer<Type> rewrite = new ListBuffer<>();
   43.60                  boolean changed = false;
   43.61                  for (Type orig : to.toList()) {
   43.62                      Type s = rewriteSupers(orig);
   43.63 @@ -2415,6 +2414,29 @@
   43.64              }
   43.65          };
   43.66  
   43.67 +    public List<Type> directSupertypes(Type t) {
   43.68 +        return directSupertypes.visit(t);
   43.69 +    }
   43.70 +    // where
   43.71 +        private final UnaryVisitor<List<Type>> directSupertypes = new UnaryVisitor<List<Type>>() {
   43.72 +
   43.73 +            public List<Type> visitType(final Type type, final Void ignored) {
   43.74 +                if (!type.isCompound()) {
   43.75 +                    final Type sup = supertype(type);
   43.76 +                    return (sup == Type.noType || sup == type || sup == null)
   43.77 +                        ? interfaces(type)
   43.78 +                        : interfaces(type).prepend(sup);
   43.79 +                } else {
   43.80 +                    return visitIntersectionType((IntersectionClassType) type);
   43.81 +                }
   43.82 +            }
   43.83 +
   43.84 +            private List<Type> visitIntersectionType(final IntersectionClassType it) {
   43.85 +                return it.getExplicitComponents();
   43.86 +            }
   43.87 +
   43.88 +        };
   43.89 +
   43.90      public boolean isDirectSuperInterface(TypeSymbol isym, TypeSymbol origin) {
   43.91          for (Type i2 : interfaces(origin.type)) {
   43.92              if (isym == i2.tsym) return true;
   43.93 @@ -2744,7 +2766,7 @@
   43.94          }
   43.95  
   43.96      public List<MethodSymbol> prune(List<MethodSymbol> methods) {
   43.97 -        ListBuffer<MethodSymbol> methodsMin = ListBuffer.lb();
   43.98 +        ListBuffer<MethodSymbol> methodsMin = new ListBuffer<>();
   43.99          for (MethodSymbol m1 : methods) {
  43.100              boolean isMin_m1 = true;
  43.101              for (MethodSymbol m2 : methods) {
  43.102 @@ -3001,7 +3023,7 @@
  43.103                                    List<Type> to) {
  43.104          if (tvars.isEmpty())
  43.105              return tvars;
  43.106 -        ListBuffer<Type> newBoundsBuf = lb();
  43.107 +        ListBuffer<Type> newBoundsBuf = new ListBuffer<>();
  43.108          boolean changed = false;
  43.109          // calculate new bounds
  43.110          for (Type t : tvars) {
  43.111 @@ -3013,7 +3035,7 @@
  43.112          }
  43.113          if (!changed)
  43.114              return tvars;
  43.115 -        ListBuffer<Type> newTvars = lb();
  43.116 +        ListBuffer<Type> newTvars = new ListBuffer<>();
  43.117          // create new type variables without bounds
  43.118          for (Type t : tvars) {
  43.119              newTvars.append(new TypeVar(t.tsym, null, syms.botType));
  43.120 @@ -3440,15 +3462,15 @@
  43.121       * compoundMin or glb.
  43.122       */
  43.123      private List<Type> closureMin(List<Type> cl) {
  43.124 -        ListBuffer<Type> classes = lb();
  43.125 -        ListBuffer<Type> interfaces = lb();
  43.126 +        ListBuffer<Type> classes = new ListBuffer<>();
  43.127 +        ListBuffer<Type> interfaces = new ListBuffer<>();
  43.128          while (!cl.isEmpty()) {
  43.129              Type current = cl.head;
  43.130              if (current.isInterface())
  43.131                  interfaces.append(current);
  43.132              else
  43.133                  classes.append(current);
  43.134 -            ListBuffer<Type> candidates = lb();
  43.135 +            ListBuffer<Type> candidates = new ListBuffer<>();
  43.136              for (Type t : cl.tail) {
  43.137                  if (!isSubtypeNoCapture(current, t))
  43.138                      candidates.append(t);
  43.139 @@ -3564,7 +3586,7 @@
  43.140      }
  43.141      // where
  43.142          List<Type> erasedSupertypes(Type t) {
  43.143 -            ListBuffer<Type> buf = lb();
  43.144 +            ListBuffer<Type> buf = new ListBuffer<>();
  43.145              for (Type sup : closure(t)) {
  43.146                  if (sup.hasTag(TYPEVAR)) {
  43.147                      buf.append(sup);
  43.148 @@ -3914,7 +3936,7 @@
  43.149      }
  43.150      // where
  43.151          public List<Type> freshTypeVariables(List<Type> types) {
  43.152 -            ListBuffer<Type> result = lb();
  43.153 +            ListBuffer<Type> result = new ListBuffer<>();
  43.154              for (Type t : types) {
  43.155                  if (t.hasTag(WILDCARD)) {
  43.156                      t = t.unannotatedType();
    44.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Sep 26 10:43:55 2013 -0700
    44.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java	Thu Sep 26 17:23:00 2013 -0700
    44.3 @@ -93,6 +93,7 @@
    44.4      final Types types;
    44.5      final JCDiagnostic.Factory diags;
    44.6      final Annotate annotate;
    44.7 +    final TypeAnnotations typeAnnotations;
    44.8      final DeferredLintHandler deferredLintHandler;
    44.9  
   44.10      public static Attr instance(Context context) {
   44.11 @@ -121,6 +122,7 @@
   44.12          types = Types.instance(context);
   44.13          diags = JCDiagnostic.Factory.instance(context);
   44.14          annotate = Annotate.instance(context);
   44.15 +        typeAnnotations = TypeAnnotations.instance(context);
   44.16          deferredLintHandler = DeferredLintHandler.instance(context);
   44.17  
   44.18          Options options = Options.instance(context);
   44.19 @@ -1724,7 +1726,7 @@
   44.20          boolean isConstructorCall =
   44.21              methName == names._this || methName == names._super;
   44.22  
   44.23 -        ListBuffer<Type> argtypesBuf = ListBuffer.lb();
   44.24 +        ListBuffer<Type> argtypesBuf = new ListBuffer<>();
   44.25          if (isConstructorCall) {
   44.26              // We are seeing a ...this(...) or ...super(...) call.
   44.27              // Check that this is the first statement in a constructor.
   44.28 @@ -1989,7 +1991,7 @@
   44.29          }
   44.30  
   44.31          // Attribute constructor arguments.
   44.32 -        ListBuffer<Type> argtypesBuf = ListBuffer.lb();
   44.33 +        ListBuffer<Type> argtypesBuf = new ListBuffer<>();
   44.34          int pkind = attribArgs(tree.args, localEnv, argtypesBuf);
   44.35          List<Type> argtypes = argtypesBuf.toList();
   44.36          List<Type> typeargtypes = attribTypes(tree.typeargs, localEnv);
   44.37 @@ -2228,7 +2230,7 @@
   44.38          // empty annotations, if only declaration annotations were given.
   44.39          // This method will raise an error for such a type.
   44.40          for (JCAnnotation ai : annotations) {
   44.41 -            if (TypeAnnotations.annotationType(syms, names, ai.attribute, sym) == TypeAnnotations.AnnotationType.DECLARATION) {
   44.42 +            if (typeAnnotations.annotationType(ai.attribute, sym) == TypeAnnotations.AnnotationType.DECLARATION) {
   44.43                  log.error(ai.pos(), "annotation.type.not.applicable");
   44.44              }
   44.45          }
   44.46 @@ -2476,8 +2478,8 @@
   44.47              }
   44.48  
   44.49              private TypeSymbol makeNotionalInterface(IntersectionClassType ict) {
   44.50 -                ListBuffer<Type> targs = ListBuffer.lb();
   44.51 -                ListBuffer<Type> supertypes = ListBuffer.lb();
   44.52 +                ListBuffer<Type> targs = new ListBuffer<>();
   44.53 +                ListBuffer<Type> supertypes = new ListBuffer<>();
   44.54                  for (Type i : ict.interfaces_field) {
   44.55                      if (i.isParameterized()) {
   44.56                          targs.appendList(i.tsym.type.allparams());
   44.57 @@ -2907,7 +2909,7 @@
   44.58                  }
   44.59              });
   44.60          } else {
   44.61 -            ListBuffer<Type> targets = ListBuffer.lb();
   44.62 +            ListBuffer<Type> targets = new ListBuffer<>();
   44.63              if (pt.hasTag(CLASS)) {
   44.64                  if (pt.isCompound()) {
   44.65                      targets.append(types.removeWildcards(primaryTarget)); //this goes first
   44.66 @@ -3102,8 +3104,14 @@
   44.67      public void visitTypeTest(JCInstanceOf tree) {
   44.68          Type exprtype = chk.checkNullOrRefType(
   44.69              tree.expr.pos(), attribExpr(tree.expr, env));
   44.70 -        Type clazztype = chk.checkReifiableReferenceType(
   44.71 -            tree.clazz.pos(), attribType(tree.clazz, env));
   44.72 +        Type clazztype = attribType(tree.clazz, env);
   44.73 +        if (!clazztype.hasTag(TYPEVAR)) {
   44.74 +            clazztype = chk.checkClassOrArrayType(tree.clazz.pos(), clazztype);
   44.75 +        }
   44.76 +        if (!clazztype.isErroneous() && !types.isReifiable(clazztype)) {
   44.77 +            log.error(tree.clazz.pos(), "illegal.generic.type.for.instof");
   44.78 +            clazztype = types.createErrorType(clazztype);
   44.79 +        }
   44.80          chk.validate(tree.clazz, env, false);
   44.81          chk.checkCastable(tree.expr.pos(), exprtype, clazztype);
   44.82          result = check(tree, syms.booleanType, VAL, resultInfo);
   44.83 @@ -3903,7 +3911,7 @@
   44.84      }
   44.85  
   44.86      public void visitTypeUnion(JCTypeUnion tree) {
   44.87 -        ListBuffer<Type> multicatchTypes = ListBuffer.lb();
   44.88 +        ListBuffer<Type> multicatchTypes = new ListBuffer<>();
   44.89          ListBuffer<Type> all_multicatchTypes = null; // lazy, only if needed
   44.90          for (JCExpression typeTree : tree.alternatives) {
   44.91              Type ctype = attribType(typeTree, env);
   44.92 @@ -3930,7 +3938,7 @@
   44.93                      all_multicatchTypes.append(ctype);
   44.94              } else {
   44.95                  if (all_multicatchTypes == null) {
   44.96 -                    all_multicatchTypes = ListBuffer.lb();
   44.97 +                    all_multicatchTypes = new ListBuffer<>();
   44.98                      all_multicatchTypes.appendList(multicatchTypes);
   44.99                  }
  44.100                  all_multicatchTypes.append(ctype);
  44.101 @@ -4085,7 +4093,7 @@
  44.102          if (annotations.isEmpty())
  44.103              return List.nil();
  44.104  
  44.105 -        ListBuffer<Attribute.TypeCompound> buf = ListBuffer.lb();
  44.106 +        ListBuffer<Attribute.TypeCompound> buf = new ListBuffer<>();
  44.107          for (JCAnnotation anno : annotations) {
  44.108              if (anno.attribute != null) {
  44.109                  // TODO: this null-check is only needed for an obscure
  44.110 @@ -4333,7 +4341,7 @@
  44.111          }
  44.112          if (allowTypeAnnos) {
  44.113              // Correctly organize the postions of the type annotations
  44.114 -            TypeAnnotations.organizeTypeAnnotationsBodies(this.syms, this.names, this.log, tree);
  44.115 +            typeAnnotations.organizeTypeAnnotationsBodies(tree);
  44.116  
  44.117              // Check type annotations applicability rules
  44.118              validateTypeAnnotations(tree);
    45.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Sep 26 10:43:55 2013 -0700
    45.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java	Thu Sep 26 17:23:00 2013 -0700
    45.3 @@ -706,20 +706,6 @@
    45.4          return t;
    45.5      }
    45.6  
    45.7 -    /** Check that type is a reifiable class, interface or array type.
    45.8 -     *  @param pos           Position to be used for error reporting.
    45.9 -     *  @param t             The type to be checked.
   45.10 -     */
   45.11 -    Type checkReifiableReferenceType(DiagnosticPosition pos, Type t) {
   45.12 -        t = checkClassOrArrayType(pos, t);
   45.13 -        if (!t.isErroneous() && !types.isReifiable(t)) {
   45.14 -            log.error(pos, "illegal.generic.type.for.instof");
   45.15 -            return types.createErrorType(t);
   45.16 -        } else {
   45.17 -            return t;
   45.18 -        }
   45.19 -    }
   45.20 -
   45.21      /** Check that type is a reference type, i.e. a class, interface or array type
   45.22       *  or a type variable.
   45.23       *  @param pos           Position to be used for error reporting.
   45.24 @@ -1245,6 +1231,7 @@
   45.25       */
   45.26      class Validator extends JCTree.Visitor {
   45.27  
   45.28 +        boolean checkRaw;
   45.29          boolean isOuter;
   45.30          Env<AttrContext> env;
   45.31  
   45.32 @@ -1254,7 +1241,7 @@
   45.33  
   45.34          @Override
   45.35          public void visitTypeArray(JCArrayTypeTree tree) {
   45.36 -            tree.elemtype.accept(this);
   45.37 +            validateTree(tree.elemtype, checkRaw, isOuter);
   45.38          }
   45.39  
   45.40          @Override
   45.41 @@ -1345,15 +1332,20 @@
   45.42          }
   45.43  
   45.44          public void validateTree(JCTree tree, boolean checkRaw, boolean isOuter) {
   45.45 -            try {
   45.46 -                if (tree != null) {
   45.47 -                    this.isOuter = isOuter;
   45.48 +            if (tree != null) {
   45.49 +                boolean prevCheckRaw = this.checkRaw;
   45.50 +                this.checkRaw = checkRaw;
   45.51 +                this.isOuter = isOuter;
   45.52 +
   45.53 +                try {
   45.54                      tree.accept(this);
   45.55                      if (checkRaw)
   45.56                          checkRaw(tree, env);
   45.57 +                } catch (CompletionFailure ex) {
   45.58 +                    completionError(tree.pos(), ex);
   45.59 +                } finally {
   45.60 +                    this.checkRaw = prevCheckRaw;
   45.61                  }
   45.62 -            } catch (CompletionFailure ex) {
   45.63 -                completionError(tree.pos(), ex);
   45.64              }
   45.65          }
   45.66  
   45.67 @@ -2446,8 +2438,8 @@
   45.68              Assert.check(m.kind == MTH);
   45.69              List<MethodSymbol> prov = types.interfaceCandidates(site, (MethodSymbol)m);
   45.70              if (prov.size() > 1) {
   45.71 -                ListBuffer<Symbol> abstracts = ListBuffer.lb();
   45.72 -                ListBuffer<Symbol> defaults = ListBuffer.lb();
   45.73 +                ListBuffer<Symbol> abstracts = new ListBuffer<>();
   45.74 +                ListBuffer<Symbol> defaults = new ListBuffer<>();
   45.75                  for (MethodSymbol provSym : prov) {
   45.76                      if ((provSym.flags() & DEFAULT) != 0) {
   45.77                          defaults = defaults.append(provSym);
    46.1 --- a/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Thu Sep 26 10:43:55 2013 -0700
    46.2 +++ b/src/share/classes/com/sun/tools/javac/comp/DeferredAttr.java	Thu Sep 26 17:23:00 2013 -0700
    46.3 @@ -637,7 +637,7 @@
    46.4                      Env<AttrContext> localEnv = env.dup(tree);
    46.5                      JCExpression exprTree = (JCExpression)attribSpeculative(tree.getQualifierExpression(), localEnv,
    46.6                              attr.memberReferenceQualifierResult(tree));
    46.7 -                    ListBuffer<Type> argtypes = ListBuffer.lb();
    46.8 +                    ListBuffer<Type> argtypes = new ListBuffer<>();
    46.9                      for (Type t : types.findDescriptorType(pt).getParameterTypes()) {
   46.10                          argtypes.append(Type.noType);
   46.11                      }
    47.1 --- a/src/share/classes/com/sun/tools/javac/comp/Enter.java	Thu Sep 26 10:43:55 2013 -0700
    47.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Enter.java	Thu Sep 26 17:23:00 2013 -0700
    47.3 @@ -288,7 +288,9 @@
    47.4                                                               JavaFileObject.Kind.SOURCE);
    47.5          if (tree.pid != null) {
    47.6              tree.packge = reader.enterPackage(TreeInfo.fullName(tree.pid));
    47.7 -            if (tree.packageAnnotations.nonEmpty() || pkginfoOpt == PkgInfo.ALWAYS) {
    47.8 +            if (tree.packageAnnotations.nonEmpty()
    47.9 +                    || pkginfoOpt == PkgInfo.ALWAYS
   47.10 +                    || tree.docComments != null) {
   47.11                  if (isPkgInfo) {
   47.12                      addEnv = true;
   47.13                  } else if (tree.packageAnnotations.nonEmpty()){
    48.1 --- a/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Sep 26 10:43:55 2013 -0700
    48.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Sep 26 17:23:00 2013 -0700
    48.3 @@ -713,7 +713,7 @@
    48.4              ListBuffer<PendingExit> prevPending = pendingExits;
    48.5              boolean prevAlive = alive;
    48.6              try {
    48.7 -                pendingExits = ListBuffer.lb();
    48.8 +                pendingExits = new ListBuffer<>();
    48.9                  alive = true;
   48.10                  scanStat(tree.body);
   48.11                  tree.canCompleteNormally = alive;
   48.12 @@ -1265,7 +1265,7 @@
   48.13              List<Type> prevThrown = thrown;
   48.14              ListBuffer<FlowPendingExit> prevPending = pendingExits;
   48.15              try {
   48.16 -                pendingExits = ListBuffer.lb();
   48.17 +                pendingExits = new ListBuffer<>();
   48.18                  caught = tree.getDescriptorType(types).getThrownTypes();
   48.19                  thrown = List.nil();
   48.20                  scan(tree.body);
   48.21 @@ -1338,7 +1338,7 @@
   48.22              ListBuffer<FlowPendingExit> prevPending = pendingExits;
   48.23              inLambda = true;
   48.24              try {
   48.25 -                pendingExits = ListBuffer.lb();
   48.26 +                pendingExits = new ListBuffer<>();
   48.27                  caught = List.of(syms.throwableType);
   48.28                  thrown = List.nil();
   48.29                  scan(tree.body);
   48.30 @@ -2030,7 +2030,7 @@
   48.31          void reportWarning(Lint.LintCategory lc, DiagnosticPosition pos, String key, Object ... args) {}
   48.32  
   48.33          public void visitTry(JCTry tree) {
   48.34 -            ListBuffer<JCVariableDecl> resourceVarDecls = ListBuffer.lb();
   48.35 +            ListBuffer<JCVariableDecl> resourceVarDecls = new ListBuffer<>();
   48.36              final Bits uninitsTryPrev = new Bits(uninitsTry);
   48.37              ListBuffer<P> prevPendingExits = pendingExits;
   48.38              pendingExits = new ListBuffer<>();
    49.1 --- a/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Sep 26 10:43:55 2013 -0700
    49.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Infer.java	Thu Sep 26 17:23:00 2013 -0700
    49.3 @@ -277,7 +277,7 @@
    49.4        * Infer cyclic inference variables as described in 15.12.2.8.
    49.5        */
    49.6      private void instantiateAsUninferredVars(List<Type> vars, InferenceContext inferenceContext) {
    49.7 -        ListBuffer<Type> todo = ListBuffer.lb();
    49.8 +        ListBuffer<Type> todo = new ListBuffer<>();
    49.9          //step 1 - create fresh tvars
   49.10          for (Type t : vars) {
   49.11              UndetVar uv = (UndetVar)inferenceContext.asFree(t);
   49.12 @@ -1832,7 +1832,7 @@
   49.13          }
   49.14  
   49.15          private List<Type> filterVars(Filter<UndetVar> fu) {
   49.16 -            ListBuffer<Type> res = ListBuffer.lb();
   49.17 +            ListBuffer<Type> res = new ListBuffer<>();
   49.18              for (Type t : undetvars) {
   49.19                  UndetVar uv = (UndetVar)t;
   49.20                  if (fu.accepts(uv)) {
   49.21 @@ -1860,7 +1860,7 @@
   49.22           * Returns a list of free variables in a given type
   49.23           */
   49.24          final List<Type> freeVarsIn(Type t) {
   49.25 -            ListBuffer<Type> buf = ListBuffer.lb();
   49.26 +            ListBuffer<Type> buf = new ListBuffer<>();
   49.27              for (Type iv : inferenceVars()) {
   49.28                  if (t.contains(iv)) {
   49.29                      buf.add(iv);
   49.30 @@ -1870,11 +1870,11 @@
   49.31          }
   49.32  
   49.33          final List<Type> freeVarsIn(List<Type> ts) {
   49.34 -            ListBuffer<Type> buf = ListBuffer.lb();
   49.35 +            ListBuffer<Type> buf = new ListBuffer<>();
   49.36              for (Type t : ts) {
   49.37                  buf.appendList(freeVarsIn(t));
   49.38              }
   49.39 -            ListBuffer<Type> buf2 = ListBuffer.lb();
   49.40 +            ListBuffer<Type> buf2 = new ListBuffer<>();
   49.41              for (Type t : buf) {
   49.42                  if (!buf2.contains(t)) {
   49.43                      buf2.add(t);
   49.44 @@ -1893,7 +1893,7 @@
   49.45          }
   49.46  
   49.47          final List<Type> asFree(List<Type> ts) {
   49.48 -            ListBuffer<Type> buf = ListBuffer.lb();
   49.49 +            ListBuffer<Type> buf = new ListBuffer<>();
   49.50              for (Type t : ts) {
   49.51                  buf.append(asFree(t));
   49.52              }
   49.53 @@ -1901,7 +1901,7 @@
   49.54          }
   49.55  
   49.56          List<Type> instTypes() {
   49.57 -            ListBuffer<Type> buf = ListBuffer.lb();
   49.58 +            ListBuffer<Type> buf = new ListBuffer<>();
   49.59              for (Type t : undetvars) {
   49.60                  UndetVar uv = (UndetVar)t;
   49.61                  buf.append(uv.inst != null ? uv.inst : uv.qtype);
   49.62 @@ -1919,7 +1919,7 @@
   49.63          }
   49.64  
   49.65          List<Type> asInstTypes(List<Type> ts) {
   49.66 -            ListBuffer<Type> buf = ListBuffer.lb();
   49.67 +            ListBuffer<Type> buf = new ListBuffer<>();
   49.68              for (Type t : ts) {
   49.69                  buf.append(asInstType(t));
   49.70              }
   49.71 @@ -1967,7 +1967,7 @@
   49.72           * Save the state of this inference context
   49.73           */
   49.74          List<Type> save() {
   49.75 -            ListBuffer<Type> buf = ListBuffer.lb();
   49.76 +            ListBuffer<Type> buf = new ListBuffer<>();
   49.77              for (Type t : undetvars) {
   49.78                  UndetVar uv = (UndetVar)t;
   49.79                  UndetVar uv2 = new UndetVar((TypeVar)uv.qtype, types);
    50.1 --- a/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Thu Sep 26 10:43:55 2013 -0700
    50.2 +++ b/src/share/classes/com/sun/tools/javac/comp/LambdaToMethod.java	Thu Sep 26 17:23:00 2013 -0700
    50.3 @@ -126,7 +126,7 @@
    50.4          private final VarSymbol deserParamSym;
    50.5  
    50.6          private KlassInfo(Symbol kSym) {
    50.7 -            appendedMethodList = ListBuffer.lb();
    50.8 +            appendedMethodList = new ListBuffer<>();
    50.9              deserializeCases = new HashMap<String, ListBuffer<JCStatement>>();
   50.10              long flags = PRIVATE | STATIC | SYNTHETIC;
   50.11              MethodType type = new MethodType(List.of(syms.serializedLambdaType), syms.objectType,
   50.12 @@ -153,6 +153,8 @@
   50.13          return instance;
   50.14      }
   50.15  
   50.16 +    private Attr attr;
   50.17 +
   50.18      private LambdaToMethod(Context context) {
   50.19          diags = JCDiagnostic.Factory.instance(context);
   50.20          log = Log.instance(context);
   50.21 @@ -166,6 +168,7 @@
   50.22          analyzer = new LambdaAnalyzerPreprocessor();
   50.23          Options options = Options.instance(context);
   50.24          dumpLambdaToMethodStats = options.isSet("dumpLambdaToMethodStats");
   50.25 +        attr = Attr.instance(context);
   50.26      }
   50.27      // </editor-fold>
   50.28  
   50.29 @@ -188,7 +191,7 @@
   50.30      }
   50.31  
   50.32      <T extends JCTree> List<T> translate(List<T> trees, TranslationContext<?> newContext) {
   50.33 -        ListBuffer<T> buf = ListBuffer.lb();
   50.34 +        ListBuffer<T> buf = new ListBuffer<>();
   50.35          for (T tree : trees) {
   50.36              buf.append(translate(tree, newContext));
   50.37          }
   50.38 @@ -301,7 +304,7 @@
   50.39          // * the "this" argument if it is an instance method
   50.40          // * enclosing locals captured by the lambda expression
   50.41  
   50.42 -        ListBuffer<JCExpression> syntheticInits = ListBuffer.lb();
   50.43 +        ListBuffer<JCExpression> syntheticInits = new ListBuffer<>();
   50.44  
   50.45          if (!sym.isStatic()) {
   50.46              syntheticInits.append(makeThis(
   50.47 @@ -368,6 +371,7 @@
   50.48  
   50.49              case BOUND:             /** Expr :: instMethod */
   50.50                  init = tree.getQualifierExpression();
   50.51 +                init = attr.makeNullCheck(init);
   50.52                  break;
   50.53  
   50.54              case UNBOUND:           /** Type :: instMethod */
   50.55 @@ -465,7 +469,7 @@
   50.56          } else if (isLambda_void && isTarget_Void) {
   50.57              //void to Void conversion:
   50.58              // BODY; return null;
   50.59 -            ListBuffer<JCStatement> stats = ListBuffer.lb();
   50.60 +            ListBuffer<JCStatement> stats = new ListBuffer<>();
   50.61              stats.append(make.Exec(expr));
   50.62              stats.append(make.Return(make.Literal(BOT, null).setType(syms.botType)));
   50.63              return make.Block(0, stats.toList());
   50.64 @@ -527,8 +531,8 @@
   50.65      }
   50.66  
   50.67      private JCMethodDecl makeDeserializeMethod(Symbol kSym) {
   50.68 -        ListBuffer<JCCase> cases = ListBuffer.lb();
   50.69 -        ListBuffer<JCBreak> breaks = ListBuffer.lb();
   50.70 +        ListBuffer<JCCase> cases = new ListBuffer<>();
   50.71 +        ListBuffer<JCBreak> breaks = new ListBuffer<>();
   50.72          for (Map.Entry<String, ListBuffer<JCStatement>> entry : kInfo.deserializeCases.entrySet()) {
   50.73              JCBreak br = make.Break(null);
   50.74              breaks.add(br);
   50.75 @@ -590,11 +594,11 @@
   50.76          String implMethodSignature = methodSig(types.erasure(refSym.type));
   50.77  
   50.78          JCExpression kindTest = eqTest(syms.intType, deserGetter("getImplMethodKind", syms.intType), make.Literal(implMethodKind));
   50.79 -        ListBuffer<JCExpression> serArgs = ListBuffer.lb();
   50.80 +        ListBuffer<JCExpression> serArgs = new ListBuffer<>();
   50.81          int i = 0;
   50.82          for (Type t : indyType.getParameterTypes()) {
   50.83 -            List<JCExpression> indexAsArg = ListBuffer.<JCExpression>lb().append(make.Literal(i)).toList();
   50.84 -            List<Type> argTypes = ListBuffer.<Type>lb().append(syms.intType).toList();
   50.85 +            List<JCExpression> indexAsArg = new ListBuffer<JCExpression>().append(make.Literal(i)).toList();
   50.86 +            List<Type> argTypes = new ListBuffer<Type>().append(syms.intType).toList();
   50.87              serArgs.add(make.TypeCast(types.erasure(t), deserGetter("getCapturedArg", syms.objectType, argTypes, indexAsArg)));
   50.88              ++i;
   50.89          }
   50.90 @@ -614,7 +618,7 @@
   50.91                  null);
   50.92          ListBuffer<JCStatement> stmts = kInfo.deserializeCases.get(implMethodName);
   50.93          if (stmts == null) {
   50.94 -            stmts = ListBuffer.lb();
   50.95 +            stmts = new ListBuffer<>();
   50.96              kInfo.deserializeCases.put(implMethodName, stmts);
   50.97          }
   50.98          /****
   50.99 @@ -724,8 +728,8 @@
  50.100  
  50.101          private final JCMemberReference tree;
  50.102          private final ReferenceTranslationContext localContext;
  50.103 -        private final ListBuffer<JCExpression> args = ListBuffer.lb();
  50.104 -        private final ListBuffer<JCVariableDecl> params = ListBuffer.lb();
  50.105 +        private final ListBuffer<JCExpression> args = new ListBuffer<>();
  50.106 +        private final ListBuffer<JCVariableDecl> params = new ListBuffer<>();
  50.107  
  50.108          MemberReferenceBridger(JCMemberReference tree, ReferenceTranslationContext localContext) {
  50.109              this.tree = tree;
  50.110 @@ -930,7 +934,7 @@
  50.111                  typeToMethodType(tree.getDescriptorType(types)));
  50.112  
  50.113          //computed indy arg types
  50.114 -        ListBuffer<Type> indy_args_types = ListBuffer.lb();
  50.115 +        ListBuffer<Type> indy_args_types = new ListBuffer<>();
  50.116          for (JCExpression arg : indy_args) {
  50.117              indy_args_types.append(arg.type);
  50.118          }
  50.119 @@ -945,7 +949,7 @@
  50.120                  names.altMetafactory : names.metafactory;
  50.121  
  50.122          if (context.needsAltMetafactory()) {
  50.123 -            ListBuffer<Object> markers = ListBuffer.lb();
  50.124 +            ListBuffer<Object> markers = new ListBuffer<>();
  50.125              for (Type t : tree.targets.tail) {
  50.126                  if (t.tsym != syms.serializableType.tsym) {
  50.127                      markers.append(t.tsym);
  50.128 @@ -1023,7 +1027,7 @@
  50.129      }
  50.130      //where
  50.131      private List<Type> bsmStaticArgToTypes(List<Object> args) {
  50.132 -        ListBuffer<Type> argtypes = ListBuffer.lb();
  50.133 +        ListBuffer<Type> argtypes = new ListBuffer<>();
  50.134          for (Object arg : args) {
  50.135              argtypes.append(bsmStaticArgToType(arg));
  50.136          }
  50.137 @@ -1847,7 +1851,7 @@
  50.138                          (thisReferenced? (inInterface? DEFAULT : 0) : STATIC);
  50.139  
  50.140                  //compute synthetic params
  50.141 -                ListBuffer<JCVariableDecl> params = ListBuffer.lb();
  50.142 +                ListBuffer<JCVariableDecl> params = new ListBuffer<>();
  50.143  
  50.144                  // The signature of the method is augmented with the following
  50.145                  // synthetic parameters:
    51.1 --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Sep 26 10:43:55 2013 -0700
    51.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java	Thu Sep 26 17:23:00 2013 -0700
    51.3 @@ -3725,7 +3725,7 @@
    51.4                  (JCVariableDecl)make.VarDef(dollar_tmp, make.Literal(INT, -1)).setType(dollar_tmp.type);
    51.5              dollar_tmp_def.init.type = dollar_tmp.type = syms.intType;
    51.6              stmtList.append(dollar_tmp_def);
    51.7 -            ListBuffer<JCCase> caseBuffer = ListBuffer.lb();
    51.8 +            ListBuffer<JCCase> caseBuffer = new ListBuffer<>();
    51.9              // hashCode will trigger nullcheck on original switch expression
   51.10              JCMethodInvocation hashCodeCall = makeCall(make.Ident(dollar_s),
   51.11                                                         names.hashCode,
   51.12 @@ -3749,7 +3749,7 @@
   51.13                                         elsepart);
   51.14                  }
   51.15  
   51.16 -                ListBuffer<JCStatement> lb = ListBuffer.lb();
   51.17 +                ListBuffer<JCStatement> lb = new ListBuffer<>();
   51.18                  JCBreak breakStmt = make.Break(null);
   51.19                  breakStmt.target = switch1;
   51.20                  lb.append(elsepart).append(breakStmt);
   51.21 @@ -3764,7 +3764,7 @@
   51.22              // with corresponding integer ones from the label to
   51.23              // position map.
   51.24  
   51.25 -            ListBuffer<JCCase> lb = ListBuffer.lb();
   51.26 +            ListBuffer<JCCase> lb = new ListBuffer<>();
   51.27              JCSwitch switch2 = make.Switch(make.Ident(dollar_tmp), lb.toList());
   51.28              for(JCCase oneCase : caseList ) {
   51.29                  // Rewire up old unlabeled break statements to the
    52.1 --- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Sep 26 10:43:55 2013 -0700
    52.2 +++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java	Thu Sep 26 17:23:00 2013 -0700
    52.3 @@ -79,6 +79,7 @@
    52.4      private final ClassReader reader;
    52.5      private final Todo todo;
    52.6      private final Annotate annotate;
    52.7 +    private final TypeAnnotations typeAnnotations;
    52.8      private final Types types;
    52.9      private final JCDiagnostic.Factory diags;
   52.10      private final Source source;
   52.11 @@ -105,6 +106,7 @@
   52.12          reader = ClassReader.instance(context);
   52.13          todo = Todo.instance(context);
   52.14          annotate = Annotate.instance(context);
   52.15 +        typeAnnotations = TypeAnnotations.instance(context);
   52.16          types = Types.instance(context);
   52.17          diags = JCDiagnostic.Factory.instance(context);
   52.18          source = Source.instance(context);
   52.19 @@ -1164,7 +1166,7 @@
   52.20              }
   52.21          }
   52.22          if (allowTypeAnnos) {
   52.23 -            TypeAnnotations.organizeTypeAnnotationsSignatures(syms, names, log, env, tree, annotate);
   52.24 +            typeAnnotations.organizeTypeAnnotationsSignatures(env, tree);
   52.25          }
   52.26      }
   52.27  
    53.1 --- a/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu Sep 26 10:43:55 2013 -0700
    53.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Resolve.java	Thu Sep 26 17:23:00 2013 -0700
    53.3 @@ -213,7 +213,7 @@
    53.4  
    53.5          int pos = 0;
    53.6          int mostSpecificPos = -1;
    53.7 -        ListBuffer<JCDiagnostic> subDiags = ListBuffer.lb();
    53.8 +        ListBuffer<JCDiagnostic> subDiags = new ListBuffer<>();
    53.9          for (Candidate c : currentResolutionContext.candidates) {
   53.10              if (currentResolutionContext.step != c.step ||
   53.11                      (c.isApplicable() && !verboseResolutionMode.contains(VerboseResolutionMode.APPLICABLE)) ||
   53.12 @@ -783,7 +783,7 @@
   53.13      };
   53.14  
   53.15      List<Type> dummyArgs(int length) {
   53.16 -        ListBuffer<Type> buf = ListBuffer.lb();
   53.17 +        ListBuffer<Type> buf = new ListBuffer<>();
   53.18          for (int i = 0 ; i < length ; i++) {
   53.19              buf.append(Type.noType);
   53.20          }
   53.21 @@ -3173,7 +3173,7 @@
   53.22      }
   53.23      //where
   53.24      private List<Type> pruneInterfaces(Type t) {
   53.25 -        ListBuffer<Type> result = ListBuffer.lb();
   53.26 +        ListBuffer<Type> result = new ListBuffer<>();
   53.27          for (Type t1 : types.interfaces(t)) {
   53.28              boolean shouldAdd = true;
   53.29              for (Type t2 : types.interfaces(t)) {
   53.30 @@ -3286,7 +3286,7 @@
   53.31          if (argtypes == null || argtypes.isEmpty()) {
   53.32              return noArgs;
   53.33          } else {
   53.34 -            ListBuffer<Object> diagArgs = ListBuffer.lb();
   53.35 +            ListBuffer<Object> diagArgs = new ListBuffer<>();
   53.36              for (Type t : argtypes) {
   53.37                  if (t.hasTag(DEFERRED)) {
   53.38                      diagArgs.append(((DeferredAttr.DeferredType)t).tree);
    54.1 --- a/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Sep 26 10:43:55 2013 -0700
    54.2 +++ b/src/share/classes/com/sun/tools/javac/comp/TransTypes.java	Thu Sep 26 17:23:00 2013 -0700
    54.3 @@ -887,7 +887,7 @@
    54.4  
    54.5      private List<JCTree> addOverrideBridgesIfNeeded(DiagnosticPosition pos,
    54.6                                      final ClassSymbol c) {
    54.7 -        ListBuffer<JCTree> buf = ListBuffer.lb();
    54.8 +        ListBuffer<JCTree> buf = new ListBuffer<>();
    54.9          if (c.isInterface() || !boundsRestricted(c))
   54.10              return buf.toList();
   54.11          Type t = types.supertype(c.type);
    55.1 --- a/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Sep 26 10:43:55 2013 -0700
    55.2 +++ b/src/share/classes/com/sun/tools/javac/file/RegularFileObject.java	Thu Sep 26 17:23:00 2013 -0700
    55.3 @@ -40,6 +40,7 @@
    55.4  import java.nio.CharBuffer;
    55.5  import java.nio.charset.CharsetDecoder;
    55.6  import javax.tools.JavaFileObject;
    55.7 +import java.text.Normalizer;
    55.8  
    55.9  /**
   55.10   * A subclass of JavaFileObject representing regular files.
   55.11 @@ -57,6 +58,7 @@
   55.12      private String name;
   55.13      final File file;
   55.14      private Reference<File> absFileRef;
   55.15 +    final static boolean isMacOS = System.getProperty("os.name", "").contains("OS X");
   55.16  
   55.17      public RegularFileObject(JavacFileManager fileManager, File f) {
   55.18          this(fileManager, f.getName(), f);
   55.19 @@ -180,7 +182,19 @@
   55.20          if (name.equals(n)) {
   55.21              return true;
   55.22          }
   55.23 -        if (name.equalsIgnoreCase(n)) {
   55.24 +        if (isMacOS && Normalizer.isNormalized(name, Normalizer.Form.NFD)
   55.25 +            && Normalizer.isNormalized(n, Normalizer.Form.NFC)) {
   55.26 +            // On Mac OS X it is quite possible to file name and class
   55.27 +            // name normalized in a different way - in that case we have to normalize file name
   55.28 +            // to the Normal Form Compised (NFC)
   55.29 +            String normName = Normalizer.normalize(name, Normalizer.Form.NFC);
   55.30 +            if (normName.equals(n)) {
   55.31 +                this.name = normName;
   55.32 +                return true;
   55.33 +            }
   55.34 +        }
   55.35 +
   55.36 +            if (name.equalsIgnoreCase(n)) {
   55.37              try {
   55.38                  // allow for Windows
   55.39                  return file.getCanonicalFile().getName().equals(n);
    56.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Sep 26 10:43:55 2013 -0700
    56.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassReader.java	Thu Sep 26 17:23:00 2013 -0700
    56.3 @@ -56,6 +56,7 @@
    56.4  import static com.sun.tools.javac.code.Flags.*;
    56.5  import static com.sun.tools.javac.code.Kinds.*;
    56.6  import static com.sun.tools.javac.code.TypeTag.CLASS;
    56.7 +import static com.sun.tools.javac.code.TypeTag.TYPEVAR;
    56.8  import static com.sun.tools.javac.jvm.ClassFile.*;
    56.9  import static com.sun.tools.javac.jvm.ClassFile.Version.*;
   56.10  
   56.11 @@ -703,6 +704,12 @@
   56.12                  sigp++;
   56.13                  thrown = thrown.prepend(sigToType());
   56.14              }
   56.15 +            // if there is a typevar in the throws clause we should state it.
   56.16 +            for (List<Type> l = thrown; l.nonEmpty(); l = l.tail) {
   56.17 +                if (l.head.hasTag(TYPEVAR)) {
   56.18 +                    l.head.tsym.flags_field |= THROWS;
   56.19 +                }
   56.20 +            }
   56.21              return new MethodType(argtypes,
   56.22                                    restype,
   56.23                                    thrown.reverse(),
   56.24 @@ -1439,8 +1446,7 @@
   56.25      void attachTypeAnnotations(final Symbol sym) {
   56.26          int numAttributes = nextChar();
   56.27          if (numAttributes != 0) {
   56.28 -            ListBuffer<TypeAnnotationProxy> proxies =
   56.29 -                ListBuffer.lb();
   56.30 +            ListBuffer<TypeAnnotationProxy> proxies = new ListBuffer<>();
   56.31              for (int i = 0; i < numAttributes; i++)
   56.32                  proxies.append(readTypeAnnotation());
   56.33              annotate.normal(new TypeAnnotationCompleter(sym, proxies.toList()));
   56.34 @@ -1589,7 +1595,7 @@
   56.35  
   56.36          { // See whether there is location info and read it
   56.37              int len = nextByte();
   56.38 -            ListBuffer<Integer> loc = ListBuffer.lb();
   56.39 +            ListBuffer<Integer> loc = new ListBuffer<>();
   56.40              for (int i = 0; i < len * TypeAnnotationPosition.TypePathEntry.bytesPerEntry; ++i)
   56.41                  loc = loc.append(nextByte());
   56.42              position.location = TypeAnnotationPosition.getTypePathFromBinary(loc.toList());
   56.43 @@ -1939,7 +1945,7 @@
   56.44          }
   56.45  
   56.46          List<Attribute.TypeCompound> deproxyTypeCompoundList(List<TypeAnnotationProxy> proxies) {
   56.47 -            ListBuffer<Attribute.TypeCompound> buf = ListBuffer.lb();
   56.48 +            ListBuffer<Attribute.TypeCompound> buf = new ListBuffer<>();
   56.49              for (TypeAnnotationProxy proxy: proxies) {
   56.50                  Attribute.Compound compound = deproxyCompound(proxy.compound);
   56.51                  Attribute.TypeCompound typeCompound = new Attribute.TypeCompound(compound, proxy.position);
   56.52 @@ -2026,7 +2032,7 @@
   56.53          boolean isVarargs = (flags & VARARGS) != 0;
   56.54          if (isVarargs) {
   56.55              Type varargsElem = args.last();
   56.56 -            ListBuffer<Type> adjustedArgs = ListBuffer.lb();
   56.57 +            ListBuffer<Type> adjustedArgs = new ListBuffer<>();
   56.58              for (Type t : args) {
   56.59                  adjustedArgs.append(t != varargsElem ?
   56.60                      t :
    57.1 --- a/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Sep 26 10:43:55 2013 -0700
    57.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/ClassWriter.java	Thu Sep 26 17:23:00 2013 -0700
    57.3 @@ -766,8 +766,8 @@
    57.4      int writeTypeAnnotations(List<Attribute.TypeCompound> typeAnnos, boolean inCode) {
    57.5          if (typeAnnos.isEmpty()) return 0;
    57.6  
    57.7 -        ListBuffer<Attribute.TypeCompound> visibles = ListBuffer.lb();
    57.8 -        ListBuffer<Attribute.TypeCompound> invisibles = ListBuffer.lb();
    57.9 +        ListBuffer<Attribute.TypeCompound> visibles = new ListBuffer<>();
   57.10 +        ListBuffer<Attribute.TypeCompound> invisibles = new ListBuffer<>();
   57.11  
   57.12          for (Attribute.TypeCompound tc : typeAnnos) {
   57.13              if (tc.hasUnknownPosition()) {
    58.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu Sep 26 10:43:55 2013 -0700
    58.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Code.java	Thu Sep 26 17:23:00 2013 -0700
    58.3 @@ -1595,7 +1595,7 @@
    58.4  
    58.5  
    58.6      public void compressCatchTable() {
    58.7 -        ListBuffer<char[]> compressedCatchInfo = ListBuffer.lb();
    58.8 +        ListBuffer<char[]> compressedCatchInfo = new ListBuffer<>();
    58.9          List<Integer> handlerPcs = List.nil();
   58.10          for (char[] catchEntry : catchInfo) {
   58.11              handlerPcs = handlerPcs.prepend((int)catchEntry[2]);
    59.1 --- a/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Sep 26 10:43:55 2013 -0700
    59.2 +++ b/src/share/classes/com/sun/tools/javac/main/JavaCompiler.java	Thu Sep 26 17:23:00 2013 -0700
    59.3 @@ -67,7 +67,6 @@
    59.4  import static com.sun.tools.javac.code.TypeTag.CLASS;
    59.5  import static com.sun.tools.javac.main.Option.*;
    59.6  import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticFlag.*;
    59.7 -import static com.sun.tools.javac.util.ListBuffer.lb;
    59.8  
    59.9  
   59.10  /** This class could be the main entry point for GJC when GJC is used as a
   59.11 @@ -586,7 +585,7 @@
   59.12      }
   59.13  
   59.14      protected final <T> Queue<T> stopIfError(CompileState cs, Queue<T> queue) {
   59.15 -        return shouldStop(cs) ? ListBuffer.<T>lb() : queue;
   59.16 +        return shouldStop(cs) ? new ListBuffer<T>() : queue;
   59.17      }
   59.18  
   59.19      protected final <T> List<T> stopIfError(CompileState cs, List<T> list) {
   59.20 @@ -952,7 +951,7 @@
   59.21             return List.nil();
   59.22  
   59.23          //parse all files
   59.24 -        ListBuffer<JCCompilationUnit> trees = lb();
   59.25 +        ListBuffer<JCCompilationUnit> trees = new ListBuffer<>();
   59.26          Set<JavaFileObject> filesSoFar = new HashSet<JavaFileObject>();
   59.27          for (JavaFileObject fileObject : fileObjects) {
   59.28              if (!filesSoFar.contains(fileObject)) {
   59.29 @@ -1002,7 +1001,7 @@
   59.30          // then remember the classes declared in
   59.31          // the original compilation units listed on the command line.
   59.32          if (needRootClasses || sourceOutput || stubOutput) {
   59.33 -            ListBuffer<JCClassDecl> cdefs = lb();
   59.34 +            ListBuffer<JCClassDecl> cdefs = new ListBuffer<>();
   59.35              for (JCCompilationUnit unit : roots) {
   59.36                  for (List<JCTree> defs = unit.defs;
   59.37                       defs.nonEmpty();
   59.38 @@ -1226,7 +1225,7 @@
   59.39       * @returns a list of environments for attributd classes.
   59.40       */
   59.41      public Queue<Env<AttrContext>> attribute(Queue<Env<AttrContext>> envs) {
   59.42 -        ListBuffer<Env<AttrContext>> results = lb();
   59.43 +        ListBuffer<Env<AttrContext>> results = new ListBuffer<>();
   59.44          while (!envs.isEmpty())
   59.45              results.append(attribute(envs.remove()));
   59.46          return stopIfError(CompileState.ATTR, results);
   59.47 @@ -1291,7 +1290,7 @@
   59.48       * @returns the list of attributed parse trees
   59.49       */
   59.50      public Queue<Env<AttrContext>> flow(Queue<Env<AttrContext>> envs) {
   59.51 -        ListBuffer<Env<AttrContext>> results = lb();
   59.52 +        ListBuffer<Env<AttrContext>> results = new ListBuffer<>();
   59.53          for (Env<AttrContext> env: envs) {
   59.54              flow(env, results);
   59.55          }
   59.56 @@ -1302,7 +1301,7 @@
   59.57       * Perform dataflow checks on an attributed parse tree.
   59.58       */
   59.59      public Queue<Env<AttrContext>> flow(Env<AttrContext> env) {
   59.60 -        ListBuffer<Env<AttrContext>> results = lb();
   59.61 +        ListBuffer<Env<AttrContext>> results = new ListBuffer<>();
   59.62          flow(env, results);
   59.63          return stopIfError(CompileState.FLOW, results);
   59.64      }
   59.65 @@ -1356,7 +1355,7 @@
   59.66       * @returns a list containing the classes to be generated
   59.67       */
   59.68      public Queue<Pair<Env<AttrContext>, JCClassDecl>> desugar(Queue<Env<AttrContext>> envs) {
   59.69 -        ListBuffer<Pair<Env<AttrContext>, JCClassDecl>> results = lb();
   59.70 +        ListBuffer<Pair<Env<AttrContext>, JCClassDecl>> results = new ListBuffer<>();
   59.71          for (Env<AttrContext> env: envs)
   59.72              desugar(env, results);
   59.73          return stopIfError(CompileState.FLOW, results);
   59.74 @@ -1605,7 +1604,7 @@
   59.75                  }
   59.76                  @Override
   59.77                  public void visitClassDef(JCClassDecl tree) {
   59.78 -                    ListBuffer<JCTree> newdefs = lb();
   59.79 +                    ListBuffer<JCTree> newdefs = new ListBuffer<>();
   59.80                      for (List<JCTree> it = tree.defs; it.tail != null; it = it.tail) {
   59.81                          JCTree t = it.head;
   59.82                          switch (t.getTag()) {
    60.1 --- a/src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java	Thu Sep 26 10:43:55 2013 -0700
    60.2 +++ b/src/share/classes/com/sun/tools/javac/model/JavacAnnoConstructs.java	Thu Sep 26 17:23:00 2013 -0700
    60.3 @@ -207,7 +207,7 @@
    60.4          Attribute[] contained0 = null;
    60.5          if (container != null)
    60.6              contained0 = unpackAttributes(container);
    60.7 -        ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
    60.8 +        ListBuffer<Attribute.Compound> compounds = new ListBuffer<>();
    60.9          if (contained0 != null) {
   60.10              for (Attribute a : contained0)
   60.11                  if (a instanceof Attribute.Compound)
   60.12 @@ -328,7 +328,7 @@
   60.13          Attribute[] contained0 = null;
   60.14          if (container != null)
   60.15              contained0 = unpackAttributes(container);
   60.16 -        ListBuffer<Attribute.Compound> compounds = ListBuffer.lb();
   60.17 +        ListBuffer<Attribute.Compound> compounds = new ListBuffer<>();
   60.18          if (contained0 != null) {
   60.19              for (Attribute a : contained0)
   60.20                  if (a instanceof Attribute.Compound)
    61.1 --- a/src/share/classes/com/sun/tools/javac/model/JavacTypes.java	Thu Sep 26 10:43:55 2013 -0700
    61.2 +++ b/src/share/classes/com/sun/tools/javac/model/JavacTypes.java	Thu Sep 26 17:23:00 2013 -0700
    61.3 @@ -116,11 +116,7 @@
    61.4  
    61.5      public List<Type> directSupertypes(TypeMirror t) {
    61.6          validateTypeNotIn(t, EXEC_OR_PKG);
    61.7 -        Type type = (Type) t;
    61.8 -        Type sup = types.supertype(type);
    61.9 -        return (sup == Type.noType || sup == type || sup == null)
   61.10 -              ? types.interfaces(type)
   61.11 -              : types.interfaces(type).prepend(sup);
   61.12 +        return types.directSupertypes((Type) t);
   61.13      }
   61.14  
   61.15      public TypeMirror erasure(TypeMirror t) {
    62.1 --- a/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Sep 26 10:43:55 2013 -0700
    62.2 +++ b/src/share/classes/com/sun/tools/javac/parser/JavacParser.java	Thu Sep 26 17:23:00 2013 -0700
    62.3 @@ -48,7 +48,6 @@
    62.4  import static com.sun.tools.javac.parser.Tokens.TokenKind.IMPORT;
    62.5  import static com.sun.tools.javac.parser.Tokens.TokenKind.LT;
    62.6  import static com.sun.tools.javac.tree.JCTree.Tag.*;
    62.7 -import static com.sun.tools.javac.util.ListBuffer.lb;
    62.8  
    62.9  /** The parser maps a token sequence into an abstract syntax
   62.10   *  tree. It operates by recursive descent, with code derived
   62.11 @@ -1767,7 +1766,7 @@
   62.12      /** Arguments = "(" [Expression { COMMA Expression }] ")"
   62.13       */
   62.14      List<JCExpression> arguments() {
   62.15 -        ListBuffer<JCExpression> args = lb();
   62.16 +        ListBuffer<JCExpression> args = new ListBuffer<>();
   62.17          if (token.kind == LPAREN) {
   62.18              nextToken();
   62.19              if (token.kind != RPAREN) {
   62.20 @@ -1834,7 +1833,7 @@
   62.21                  nextToken();
   62.22                  return List.nil();
   62.23              } else {
   62.24 -                ListBuffer<JCExpression> args = ListBuffer.lb();
   62.25 +                ListBuffer<JCExpression> args = new ListBuffer<>();
   62.26                  args.append(((mode & EXPR) == 0) ? typeArgument() : parseType());
   62.27                  while (token.kind == COMMA) {
   62.28                      nextToken();
   62.29 @@ -2175,7 +2174,7 @@
   62.30              ListBuffer<JCExpression> dims = new ListBuffer<JCExpression>();
   62.31  
   62.32              // maintain array dimension type annotations
   62.33 -            ListBuffer<List<JCAnnotation>> dimAnnotations = ListBuffer.lb();
   62.34 +            ListBuffer<List<JCAnnotation>> dimAnnotations = new ListBuffer<>();
   62.35              dimAnnotations.append(annos);
   62.36  
   62.37              dims.append(parseExpression());
   62.38 @@ -2626,7 +2625,7 @@
   62.39      }
   62.40  
   62.41      List<JCExpression> catchTypes() {
   62.42 -        ListBuffer<JCExpression> catchTypes = ListBuffer.lb();
   62.43 +        ListBuffer<JCExpression> catchTypes = new ListBuffer<>();
   62.44          catchTypes.add(parseType());
   62.45          while (token.kind == BAR) {
   62.46              checkMulticatch();
   62.47 @@ -2708,7 +2707,7 @@
   62.48       *           |  { FINAL | '@' Annotation } Type VariableDeclarators
   62.49       */
   62.50      List<JCStatement> forInit() {
   62.51 -        ListBuffer<JCStatement> stats = lb();
   62.52 +        ListBuffer<JCStatement> stats = new ListBuffer<>();
   62.53          int pos = token.pos;
   62.54          if (token.kind == FINAL || token.kind == MONKEYS_AT) {
   62.55              return variableDeclarators(optFinal(0), parseType(), stats).toList();
    63.1 --- a/src/share/classes/com/sun/tools/javac/parser/Tokens.java	Thu Sep 26 10:43:55 2013 -0700
    63.2 +++ b/src/share/classes/com/sun/tools/javac/parser/Tokens.java	Thu Sep 26 17:23:00 2013 -0700
    63.3 @@ -1,5 +1,5 @@
    63.4  /*
    63.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    63.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
    63.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    63.8   *
    63.9   * This code is free software; you can redistribute it and/or modify it
   63.10 @@ -402,7 +402,7 @@
   63.11              if (comments == null) {
   63.12                  return List.nil();
   63.13              } else {
   63.14 -                ListBuffer<Comment> buf = ListBuffer.lb();
   63.15 +                ListBuffer<Comment> buf = new ListBuffer<>();
   63.16                  for (Comment c : comments) {
   63.17                      if (c.getStyle() == style) {
   63.18                          buf.add(c);
    64.1 --- a/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    64.2 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    64.3 @@ -525,9 +525,6 @@
    64.4  compiler.misc.incompatible.ret.type.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u623B\u308A\u578B\u304C\u4E0D\u6B63\u3067\u3059\n{0}
    64.5  
    64.6  # 0: list of type
    64.7 -compiler.err.incompatible.thrown.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u3067\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059
    64.8 -
    64.9 -# 0: list of type
   64.10  compiler.err.incompatible.thrown.types.in.mref=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u306E\u30B9\u30ED\u30FC\u3055\u308C\u305F\u30BF\u30A4\u30D7{0}\u306F\u4E0D\u9069\u5408\u3067\u3059
   64.11  
   64.12  compiler.misc.incompatible.arg.types.in.lambda=\u30E9\u30E0\u30C0\u5F0F\u306E\u30D1\u30E9\u30E1\u30FC\u30BF\u578B\u306F\u4E0D\u9069\u5408\u3067\u3059
   64.13 @@ -642,12 +639,18 @@
   64.14  # 0: symbol, 1: set of modifier, 2: symbol
   64.15  compiler.err.report.access={0}\u306F{2}\u3067{1}\u30A2\u30AF\u30BB\u30B9\u3055\u308C\u307E\u3059
   64.16  
   64.17 +# 0: symbol, 1: set of modifier, 2: symbol
   64.18 +compiler.misc.report.access={0}\u306F{2}\u3067{1}\u30A2\u30AF\u30BB\u30B9\u3055\u308C\u307E\u3059
   64.19 +
   64.20  compiler.err.ret.outside.meth=\u30E1\u30BD\u30C3\u30C9\u306E\u5916\u306Ereturn\u6587\u3067\u3059
   64.21  
   64.22  compiler.err.signature.doesnt.match.supertype=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C{0}\u306B\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4E0D\u9069\u5408\u306A\u30B9\u30FC\u30D1\u30FC\u30BF\u30A4\u30D7\u3067\u3059
   64.23  
   64.24  compiler.err.signature.doesnt.match.intf=\u30B7\u30B0\u30CD\u30C1\u30E3\u304C{0}\u306B\u4E00\u81F4\u3057\u307E\u305B\u3093\u3002\u4E0D\u9069\u5408\u306A\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u3067\u3059
   64.25  
   64.26 +# 0: number, 1: number
   64.27 +compiler.err.method.invoked.with.incorrect.number.arguments=\u30E1\u30BD\u30C3\u30C9\u3092\u8D77\u52D5\u3057\u305F\u5F15\u6570\u306E\u6570\u304C\u6B63\u3057\u304F\u3042\u308A\u307E\u305B\u3093\u3002\u4E88\u671F\u3055\u308C\u308B\u6570\u306F{0}\u3067\u3059\u304C\u3001{1}\u304C\u898B\u3064\u304B\u308A\u307E\u3057\u305F
   64.28 +
   64.29  # 0: symbol, 1: symbol, 2: symbol
   64.30  compiler.err.does.not.override.abstract={0}\u306Fabstract\u3067\u306A\u304F\u3001{2}\u5185\u306Eabstract\u30E1\u30BD\u30C3\u30C9{1}\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3057\u307E\u305B\u3093
   64.31  
   64.32 @@ -756,6 +759,9 @@
   64.33  compiler.err.var.might.not.have.been.initialized=\u5909\u6570{0}\u306F\u521D\u671F\u5316\u3055\u308C\u3066\u3044\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
   64.34  
   64.35  # 0: symbol
   64.36 +compiler.err.var.not.initialized.in.default.constructor=\u5909\u6570{0}\u306F\u3001\u30C7\u30D5\u30A9\u30EB\u30C8\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30BF\u3067\u521D\u671F\u5316\u3055\u308C\u3066\u3044\u307E\u305B\u3093
   64.37 +
   64.38 +# 0: symbol
   64.39  compiler.err.var.might.be.assigned.in.loop=\u5909\u6570{0}\u306F\u30EB\u30FC\u30D7\u5185\u3067\u4EE3\u5165\u3055\u308C\u3066\u3044\u308B\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059
   64.40  
   64.41  # 0: symbol, 1: message segment
   64.42 @@ -829,6 +835,14 @@
   64.43  
   64.44  compiler.note.potential.lambda.found=\u3053\u306E\u533F\u540D\u5185\u90E8\u30AF\u30E9\u30B9\u3092\u30E9\u30E0\u30C0\u5F0F\u306B\u5909\u63DB\u3067\u304D\u307E\u3059\u3002
   64.45  
   64.46 +# 0: boolean, 1: symbol
   64.47 +compiler.note.lambda.stat=\u30E9\u30E0\u30C0\u5F0F\u3092\u5909\u63DB\u3057\u3066\u3044\u307E\u3059\n\u4EE3\u66FFmetafactory = {0}\n\u5408\u6210\u30E1\u30BD\u30C3\u30C9 = {1}
   64.48 +
   64.49 +# 0: boolean, 1: unused
   64.50 +compiler.note.mref.stat=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u3092\u5909\u63DB\u3057\u3066\u3044\u307E\u3059\n\u4EE3\u66FFmetafactory = {0}\n
   64.51 +# 0: boolean, 1: symbol
   64.52 +compiler.note.mref.stat.1=\u30E1\u30BD\u30C3\u30C9\u53C2\u7167\u3092\u5909\u63DB\u3057\u3066\u3044\u307E\u3059\n\u4EE3\u66FFmetafactory = {0}\n\u30D6\u30EA\u30C3\u30B8\u30FB\u30E1\u30BD\u30C3\u30C9 = {1}
   64.53 +
   64.54  compiler.note.note=\u6CE8\u610F:
   64.55  
   64.56  # 0: file name
   64.57 @@ -1015,6 +1029,14 @@
   64.58  # 0: string
   64.59  compiler.warn.source.no.bootclasspath=\u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30D1\u30B9\u304C-source {0}\u3068\u4E00\u7DD2\u306B\u8A2D\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
   64.60  
   64.61 +# 0: string
   64.62 +compiler.warn.option.obsolete.source=\u30BD\u30FC\u30B9\u5024{0}\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u3066\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059
   64.63 +
   64.64 +# 0: string
   64.65 +compiler.warn.option.obsolete.target=\u30BF\u30FC\u30B2\u30C3\u30C8\u5024{0}\u306F\u5EC3\u6B62\u3055\u308C\u3066\u3044\u3066\u3001\u4ECA\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u524A\u9664\u3055\u308C\u308B\u4E88\u5B9A\u3067\u3059
   64.66 +
   64.67 +compiler.warn.option.obsolete.suppression=\u5EC3\u6B62\u3055\u308C\u305F\u30AA\u30D7\u30B7\u30E7\u30F3\u306B\u3064\u3044\u3066\u306E\u8B66\u544A\u3092\u8868\u793A\u3057\u306A\u3044\u3088\u3046\u306B\u3059\u308B\u306B\u306F\u3001-Xlint:\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3057\u307E\u3059\u3002
   64.68 +
   64.69  # 0: name, 1: number, 2: number, 3: number, 4: number
   64.70  compiler.warn.future.attr=\u30D0\u30FC\u30B8\u30E7\u30F3{1}.{2}\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u5C0E\u5165\u3055\u308C\u305F{0}\u5C5E\u6027\u306F\u3001\u30D0\u30FC\u30B8\u30E7\u30F3{3}.{4}\u306E\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3067\u306F\u7121\u8996\u3055\u308C\u307E\u3059
   64.71  
   64.72 @@ -1550,7 +1572,7 @@
   64.73  
   64.74  compiler.warn.assert.as.identifier=\u30EA\u30EA\u30FC\u30B91.4\u304B\u3089''assert''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u3001\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''assert''\u3092\u30AD\u30FC\u30EF\u30FC\u30C9\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F\u3001-source 1.4\u4EE5\u964D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
   64.75  
   64.76 -compiler.warn.underscore.as.identifier=\u8B58\u5225\u5B50\u3068\u3057\u3066''_''\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F\n(\u8B58\u5225\u5B50\u3068\u3057\u3066\u306E''_''\u306E\u4F7F\u7528\u306F\u3001\u5C06\u6765\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059)
   64.77 +compiler.warn.underscore.as.identifier=\u8B58\u5225\u5B50\u3068\u3057\u3066''_''\u304C\u4F7F\u7528\u3055\u308C\u307E\u3057\u305F\n(\u8B58\u5225\u5B50\u3068\u3057\u3066\u306E''_''\u306E\u4F7F\u7528\u306F\u3001Java SE 8\u3088\u308A\u5F8C\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u306F\u30B5\u30DD\u30FC\u30C8\u3055\u308C\u306A\u3044\u53EF\u80FD\u6027\u304C\u3042\u308A\u307E\u3059)
   64.78  
   64.79  compiler.err.enum.as.identifier=\u30EA\u30EA\u30FC\u30B95\u304B\u3089''enum''\u306F\u30AD\u30FC\u30EF\u30FC\u30C9\u306A\u306E\u3067\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093\n(''enum''\u3092\u8B58\u5225\u5B50\u3068\u3057\u3066\u4F7F\u7528\u3059\u308B\u306B\u306F-source 1.4\u4EE5\u524D\u3092\u4F7F\u7528\u3057\u3066\u304F\u3060\u3055\u3044)
   64.80  
   64.81 @@ -1567,7 +1589,7 @@
   64.82  
   64.83  # TODO 308: make a better error message
   64.84  # 0: unused
   64.85 -compiler.err.cant.annotate.nested.type=\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30BF\u30A4\u30D7\u306F\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
   64.86 +compiler.err.cant.annotate.nested.type=static\u306E\u30CD\u30B9\u30C8\u3055\u308C\u305F\u30BF\u30A4\u30D7\u306E\u30B9\u30B3\u30FC\u30D7\u30FB\u30B3\u30F3\u30B9\u30C8\u30E9\u30AF\u30C8\u306B\u306F\u6CE8\u91C8\u4ED8\u3051\u3059\u308B\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
   64.87  
   64.88  # 0: type, 1: type
   64.89  compiler.err.incorrect.receiver.name=\u53D7\u53D6\u308A\u5074\u306E\u540D\u524D\u304C\u3001\u5305\u542B\u3059\u308B\u30AF\u30E9\u30B9\u30FB\u30BF\u30A4\u30D7\u3068\u4E00\u81F4\u3057\u307E\u305B\u3093\n\u5FC5\u9808: {0}\n\u691C\u51FA: {1}
    65.1 --- a/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    65.2 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    65.3 @@ -525,9 +525,6 @@
    65.4  compiler.misc.incompatible.ret.type.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u7684\u8FD4\u56DE\u7C7B\u578B\u9519\u8BEF\n{0}
    65.5  
    65.6  # 0: list of type
    65.7 -compiler.err.incompatible.thrown.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9
    65.8 -
    65.9 -# 0: list of type
   65.10  compiler.err.incompatible.thrown.types.in.mref=\u65B9\u6CD5\u5F15\u7528\u4E2D\u629B\u51FA\u7684\u7C7B\u578B{0}\u4E0D\u517C\u5BB9
   65.11  
   65.12  compiler.misc.incompatible.arg.types.in.lambda=lambda \u8868\u8FBE\u5F0F\u4E2D\u7684\u53C2\u6570\u7C7B\u578B\u4E0D\u517C\u5BB9
   65.13 @@ -642,12 +639,18 @@
   65.14  # 0: symbol, 1: set of modifier, 2: symbol
   65.15  compiler.err.report.access={0}\u53EF\u4EE5\u5728{2}\u4E2D\u8BBF\u95EE{1}
   65.16  
   65.17 +# 0: symbol, 1: set of modifier, 2: symbol
   65.18 +compiler.misc.report.access={0}\u53EF\u4EE5\u5728{2}\u4E2D\u8BBF\u95EE{1}
   65.19 +
   65.20  compiler.err.ret.outside.meth=\u8FD4\u56DE\u5916\u90E8\u65B9\u6CD5
   65.21  
   65.22  compiler.err.signature.doesnt.match.supertype=\u7B7E\u540D\u4E0E{0}\u4E0D\u5339\u914D; \u4E0D\u517C\u5BB9\u7684\u8D85\u7C7B\u578B
   65.23  
   65.24  compiler.err.signature.doesnt.match.intf=\u7B7E\u540D\u4E0E{0}\u4E0D\u5339\u914D; \u4E0D\u517C\u5BB9\u7684\u63A5\u53E3
   65.25  
   65.26 +# 0: number, 1: number
   65.27 +compiler.err.method.invoked.with.incorrect.number.arguments=\u4F7F\u7528\u4E0D\u6B63\u786E\u6570\u91CF\u7684\u53C2\u6570\u8C03\u7528\u4E86\u65B9\u6CD5; \u9884\u671F\u4E3A {0} \u4E2A, \u627E\u5230 {1} \u4E2A
   65.28 +
   65.29  # 0: symbol, 1: symbol, 2: symbol
   65.30  compiler.err.does.not.override.abstract={0}\u4E0D\u662F\u62BD\u8C61\u7684, \u5E76\u4E14\u672A\u8986\u76D6{2}\u4E2D\u7684\u62BD\u8C61\u65B9\u6CD5{1}
   65.31  
   65.32 @@ -756,6 +759,9 @@
   65.33  compiler.err.var.might.not.have.been.initialized=\u53EF\u80FD\u5C1A\u672A\u521D\u59CB\u5316\u53D8\u91CF{0}
   65.34  
   65.35  # 0: symbol
   65.36 +compiler.err.var.not.initialized.in.default.constructor=\u53D8\u91CF {0} \u672A\u5728\u9ED8\u8BA4\u6784\u9020\u5668\u4E2D\u521D\u59CB\u5316
   65.37 +
   65.38 +# 0: symbol
   65.39  compiler.err.var.might.be.assigned.in.loop=\u53EF\u80FD\u5728 loop \u4E2D\u5206\u914D\u4E86\u53D8\u91CF{0}
   65.40  
   65.41  # 0: symbol, 1: message segment
   65.42 @@ -829,6 +835,14 @@
   65.43  
   65.44  compiler.note.potential.lambda.found=\u53EF\u5C06\u6B64\u533F\u540D\u5185\u90E8\u7C7B\u521B\u5EFA\u8F6C\u6362\u4E3A lambda \u8868\u8FBE\u5F0F\u3002
   65.45  
   65.46 +# 0: boolean, 1: symbol
   65.47 +compiler.note.lambda.stat=\u8F6C\u6362 lambda \u8868\u8FBE\u5F0F\n\u66FF\u4EE3 metafactory = {0}\n\u5408\u6210\u65B9\u6CD5 = {1}
   65.48 +
   65.49 +# 0: boolean, 1: unused
   65.50 +compiler.note.mref.stat=\u8F6C\u6362\u65B9\u6CD5\u5F15\u7528\n\u66FF\u4EE3 metafactory = {0}\n
   65.51 +# 0: boolean, 1: symbol
   65.52 +compiler.note.mref.stat.1=\u8F6C\u6362\u65B9\u6CD5\u5F15\u7528\n\u66FF\u4EE3 metafactory = {0}\nbridge \u65B9\u6CD5 = {1}
   65.53 +
   65.54  compiler.note.note=\u6CE8: 
   65.55  
   65.56  # 0: file name
   65.57 @@ -1015,6 +1029,14 @@
   65.58  # 0: string
   65.59  compiler.warn.source.no.bootclasspath=\u672A\u4E0E -source {0} \u4E00\u8D77\u8BBE\u7F6E\u5F15\u5BFC\u7C7B\u8DEF\u5F84
   65.60  
   65.61 +# 0: string
   65.62 +compiler.warn.option.obsolete.source=\u6E90\u503C{0}\u5DF2\u8FC7\u65F6, \u5C06\u5728\u672A\u6765\u6240\u6709\u53D1\u884C\u7248\u4E2D\u5220\u9664
   65.63 +
   65.64 +# 0: string
   65.65 +compiler.warn.option.obsolete.target=\u76EE\u6807\u503C{0}\u5DF2\u8FC7\u65F6, \u5C06\u5728\u672A\u6765\u6240\u6709\u53D1\u884C\u7248\u4E2D\u5220\u9664
   65.66 +
   65.67 +compiler.warn.option.obsolete.suppression=\u8981\u9690\u85CF\u6709\u5173\u5DF2\u8FC7\u65F6\u9009\u9879\u7684\u8B66\u544A, \u8BF7\u4F7F\u7528 -Xlint:-options\u3002
   65.68 +
   65.69  # 0: name, 1: number, 2: number, 3: number, 4: number
   65.70  compiler.warn.future.attr={1}.{2} \u7248\u7C7B\u6587\u4EF6\u4E2D\u5F15\u5165\u7684 {0} \u5C5E\u6027\u5728 {3}.{4} \u7248\u7C7B\u6587\u4EF6\u4E2D\u88AB\u5FFD\u7565
   65.71  
   65.72 @@ -1550,7 +1572,7 @@
   65.73  
   65.74  compiler.warn.assert.as.identifier=\u4ECE\u53D1\u884C\u7248 1.4 \u5F00\u59CB, ''assert'' \u662F\u4E00\u4E2A\u5173\u952E\u5B57, \u4F46\u4E0D\u80FD\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.4 \u6216\u66F4\u9AD8\u7248\u672C\u4EE5\u5C06 ''assert'' \u7528\u4F5C\u5173\u952E\u5B57)
   65.75  
   65.76 -compiler.warn.underscore.as.identifier=''_'' \u5DF2\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u4EE5\u540E\u7684\u53D1\u884C\u7248\u53EF\u80FD\u4E0D\u652F\u6301\u5C06 ''_'' \u7528\u4F5C\u6807\u8BC6\u7B26)
   65.77 +compiler.warn.underscore.as.identifier=''_'' \u7528\u4F5C\u6807\u8BC6\u7B26\n(Java SE 8 \u4E4B\u540E\u7684\u53D1\u884C\u7248\u4E2D\u53EF\u80FD\u4E0D\u652F\u6301\u4F7F\u7528 ''_'' \u4F5C\u4E3A\u6807\u8BC6\u7B26)
   65.78  
   65.79  compiler.err.enum.as.identifier=\u4ECE\u53D1\u884C\u7248 5 \u5F00\u59CB, ''enum'' \u4E3A\u5173\u952E\u5B57, \u800C\u4E0D\u7528\u4F5C\u6807\u8BC6\u7B26\n(\u8BF7\u4F7F\u7528 -source 1.4 \u6216\u66F4\u4F4E\u7248\u672C\u4EE5\u5C06 ''enum'' \u7528\u4F5C\u6807\u8BC6\u7B26)
   65.80  
   65.81 @@ -1567,7 +1589,7 @@
   65.82  
   65.83  # TODO 308: make a better error message
   65.84  # 0: unused
   65.85 -compiler.err.cant.annotate.nested.type=\u65E0\u6CD5\u5BF9\u5D4C\u5957\u7C7B\u578B\u8FDB\u884C\u6CE8\u91CA
   65.86 +compiler.err.cant.annotate.nested.type=\u65E0\u6CD5\u6CE8\u91CA\u7528\u4E8E\u9759\u6001\u5D4C\u5957\u7C7B\u578B\u7684\u786E\u5B9A\u4F5C\u7528\u57DF\u7ED3\u6784
   65.87  
   65.88  # 0: type, 1: type
   65.89  compiler.err.incorrect.receiver.name=\u63A5\u6536\u65B9\u540D\u79F0\u4E0E\u5C01\u95ED\u7C7B\u7C7B\u578B\u4E0D\u5339\u914D\n\u9700\u8981: {0}\n\u627E\u5230: {1}
    66.1 --- a/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    66.2 +++ b/src/share/classes/com/sun/tools/javac/resources/javac_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    66.3 @@ -1,5 +1,5 @@
    66.4  #
    66.5 -# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    66.6 +# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
    66.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    66.8  #
    66.9  # This code is free software; you can redistribute it and/or modify it
   66.10 @@ -87,8 +87,12 @@
   66.11  javac.opt.Xlint=\u63A8\u5968\u306E\u8B66\u544A\u3092\u6709\u52B9\u306B\u3059\u308B
   66.12  javac.opt.Xlint.suboptlist=\u7279\u5B9A\u306E\u8B66\u544A\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3059\u308B
   66.13  javac.opt.Xdoclint=javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u63A8\u5968\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u306B\u3059\u308B
   66.14 -javac.opt.Xdoclint.subopts = (all|[-]<group>)[/<access>]
   66.15 -javac.opt.Xdoclint.custom=\n        javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u7279\u5B9A\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\n        \u3053\u3053\u3067\u3001<group>\u306Faccessibility\u3001html\u3001reference\u307E\u305F\u306Fsyntax\u306E\u3044\u305A\u308C\u304B\u3067\u3001\n        <access>\u306Fpublic\u3001protected\u3001package\u307E\u305F\u306Fprivate\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002
   66.16 +# L10N: do not localize: all none
   66.17 +javac.opt.Xdoclint.subopts = (all|none|[-]<group>)[/<access>]
   66.18 +
   66.19 +# L10N: do not localize: accessibility html missing reference syntax
   66.20 +# L10N: do not localize: public protected package private
   66.21 +javac.opt.Xdoclint.custom=\n        javadoc\u30B3\u30E1\u30F3\u30C8\u306E\u554F\u984C\u306B\u95A2\u3059\u308B\u7279\u5B9A\u306E\u30C1\u30A7\u30C3\u30AF\u3092\u6709\u52B9\u307E\u305F\u306F\u7121\u52B9\u306B\u3057\u307E\u3059\u3002\n        \u3053\u3053\u3067\u3001<group>\u306Faccessibility\u3001html\u3001missing\u3001reference\u307E\u305F\u306Fsyntax\u306E\u3044\u305A\u308C\u304B\u3067\u3001\n        <access>\u306Fpublic\u3001protected\u3001package\u307E\u305F\u306Fprivate\u306E\u3044\u305A\u308C\u304B\u3067\u3059\u3002
   66.22  javac.opt.Xstdout=\u6A19\u6E96\u51FA\u529B\u3092\u30EA\u30C0\u30A4\u30EC\u30AF\u30C8\u3059\u308B
   66.23  javac.opt.X=\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B
   66.24  javac.opt.help=\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B
   66.25 @@ -105,6 +109,7 @@
   66.26  javac.err.invalid.arg={0}\u306F\u7121\u52B9\u306A\u5F15\u6570\u3067\u3059
   66.27  javac.err.invalid.A.key=\u6CE8\u91C8\u30D7\u30ED\u30BB\u30C3\u30B5\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3''{0}''\u306E\u30AD\u30FC\u306B\u6307\u5B9A\u3055\u308C\u3066\u3044\u308B\u4E00\u9023\u306E\u8B58\u5225\u5B50\u304C\u3001\u30C9\u30C3\u30C8\u3067\u533A\u5207\u3089\u308C\u3066\u3044\u307E\u305B\u3093
   66.28  javac.err.invalid.flag={0}\u306F\u7121\u52B9\u306A\u30D5\u30E9\u30B0\u3067\u3059
   66.29 +javac.err.profile.bootclasspath.conflict=profile\u3068bootclasspath\u30AA\u30D7\u30B7\u30E7\u30F3\u306F\u540C\u6642\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
   66.30  javac.err.invalid.profile=\u7121\u52B9\u306A\u30D7\u30ED\u30D5\u30A1\u30A4\u30EB: {0}
   66.31  javac.err.invalid.target={0}\u306F\u7121\u52B9\u306A\u30BF\u30FC\u30B2\u30C3\u30C8\u30FB\u30EA\u30EA\u30FC\u30B9\u3067\u3059
   66.32  javac.err.no.source.files=\u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u304C\u3042\u308A\u307E\u305B\u3093
    67.1 --- a/src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    67.2 +++ b/src/share/classes/com/sun/tools/javac/resources/javac_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    67.3 @@ -1,5 +1,5 @@
    67.4  #
    67.5 -# Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    67.6 +# Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
    67.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    67.8  #
    67.9  # This code is free software; you can redistribute it and/or modify it
   67.10 @@ -87,8 +87,12 @@
   67.11  javac.opt.Xlint=\u542F\u7528\u5EFA\u8BAE\u7684\u8B66\u544A
   67.12  javac.opt.Xlint.suboptlist=\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u7684\u8B66\u544A
   67.13  javac.opt.Xdoclint=\u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u5EFA\u8BAE\u7684\u68C0\u67E5
   67.14 -javac.opt.Xdoclint.subopts = (all|[-]<group>)[/<access>]
   67.15 -javac.opt.Xdoclint.custom=\n        \u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u68C0\u67E5,\n        \u5176\u4E2D <group> \u4E3A\u53EF\u8BBF\u95EE\u6027, html, \u5F15\u7528\u6216\u8BED\u6CD5\u4E4B\u4E00,\n        <access> \u4E3A public, protected, package \u6216 private \u4E4B\u4E00\u3002
   67.16 +# L10N: do not localize: all none
   67.17 +javac.opt.Xdoclint.subopts = (all|none|[-]<group>)[/<access>]
   67.18 +
   67.19 +# L10N: do not localize: accessibility html missing reference syntax
   67.20 +# L10N: do not localize: public protected package private
   67.21 +javac.opt.Xdoclint.custom=\n        \u4E3A javadoc \u6CE8\u91CA\u4E2D\u7684\u95EE\u9898\u542F\u7528\u6216\u7981\u7528\u7279\u5B9A\u68C0\u67E5,\n        \u5176\u4E2D <group> \u4E3A accessibility, html, missing, reference \u6216 syntax \u4E4B\u4E00\u3002\n        <access> \u4E3A public, protected, package \u6216 private \u4E4B\u4E00\u3002
   67.22  javac.opt.Xstdout=\u91CD\u5B9A\u5411\u6807\u51C6\u8F93\u51FA
   67.23  javac.opt.X=\u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981
   67.24  javac.opt.help=\u8F93\u51FA\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981
   67.25 @@ -105,6 +109,7 @@
   67.26  javac.err.invalid.arg=\u65E0\u6548\u7684\u53C2\u6570: {0}
   67.27  javac.err.invalid.A.key=\u6CE8\u91CA\u5904\u7406\u7A0B\u5E8F\u9009\u9879 ''{0}'' \u4E2D\u7684\u5173\u952E\u5B57\u4E0D\u662F\u4EE5\u70B9\u5206\u9694\u7684\u6807\u8BC6\u7B26\u5E8F\u5217
   67.28  javac.err.invalid.flag=\u65E0\u6548\u7684\u6807\u8BB0: {0}
   67.29 +javac.err.profile.bootclasspath.conflict=\u6982\u8981\u4FE1\u606F\u548C\u5F15\u5BFC\u7C7B\u8DEF\u5F84\u9009\u9879\u4E0D\u80FD\u540C\u65F6\u4F7F\u7528
   67.30  javac.err.invalid.profile=\u914D\u7F6E\u6587\u4EF6\u65E0\u6548: {0}
   67.31  javac.err.invalid.target=\u65E0\u6548\u7684\u76EE\u6807\u53D1\u884C\u7248: {0}
   67.32  javac.err.no.source.files=\u65E0\u6E90\u6587\u4EF6
    68.1 --- a/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Thu Sep 26 10:43:55 2013 -0700
    68.2 +++ b/src/share/classes/com/sun/tools/javac/tree/TreeCopier.java	Thu Sep 26 17:23:00 2013 -0700
    68.3 @@ -234,7 +234,7 @@
    68.4      public JCTree visitLabeledStatement(LabeledStatementTree node, P p) {
    68.5          JCLabeledStatement t = (JCLabeledStatement) node;
    68.6          JCStatement body = copy(t.body, p);
    68.7 -        return M.at(t.pos).Labelled(t.label, t.body);
    68.8 +        return M.at(t.pos).Labelled(t.label, body);
    68.9      }
   68.10  
   68.11      public JCTree visitLiteral(LiteralTree node, P p) {
    69.1 --- a/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu Sep 26 10:43:55 2013 -0700
    69.2 +++ b/src/share/classes/com/sun/tools/javac/tree/TreeMaker.java	Thu Sep 26 17:23:00 2013 -0700
    69.3 @@ -946,6 +946,7 @@
    69.4      boolean isUnqualifiable(Symbol sym) {
    69.5          if (sym.name == names.empty ||
    69.6              sym.owner == null ||
    69.7 +            sym.owner == syms.rootPackage ||
    69.8              sym.owner.kind == MTH || sym.owner.kind == VAR) {
    69.9              return true;
   69.10          } else if (sym.kind == TYP && toplevel != null) {
    70.1 --- a/src/share/classes/com/sun/tools/javac/util/GraphUtils.java	Thu Sep 26 10:43:55 2013 -0700
    70.2 +++ b/src/share/classes/com/sun/tools/javac/util/GraphUtils.java	Thu Sep 26 17:23:00 2013 -0700
    70.3 @@ -103,8 +103,8 @@
    70.4       * directed graph in linear time. Works on TarjanNode.
    70.5       */
    70.6      public static <D, N extends TarjanNode<D>> List<? extends List<? extends N>> tarjan(Iterable<? extends N> nodes) {
    70.7 -        ListBuffer<List<N>> cycles = ListBuffer.lb();
    70.8 -        ListBuffer<N> stack = ListBuffer.lb();
    70.9 +        ListBuffer<List<N>> cycles = new ListBuffer<>();
   70.10 +        ListBuffer<N> stack = new ListBuffer<>();
   70.11          int index = 0;
   70.12          for (N node: nodes) {
   70.13              if (node.index == -1) {
   70.14 @@ -132,7 +132,7 @@
   70.15          }
   70.16          if (v.lowlink == v.index) {
   70.17              N n;
   70.18 -            ListBuffer<N> cycle = ListBuffer.lb();
   70.19 +            ListBuffer<N> cycle = new ListBuffer<>();
   70.20              do {
   70.21                  n = stack.remove();
   70.22                  n.active = false;
    71.1 --- a/src/share/classes/com/sun/tools/javac/util/List.java	Thu Sep 26 10:43:55 2013 -0700
    71.2 +++ b/src/share/classes/com/sun/tools/javac/util/List.java	Thu Sep 26 17:23:00 2013 -0700
    71.3 @@ -97,7 +97,7 @@
    71.4      }
    71.5  
    71.6      public List<A> intersect(List<A> that) {
    71.7 -        ListBuffer<A> buf = ListBuffer.lb();
    71.8 +        ListBuffer<A> buf = new ListBuffer<>();
    71.9          for (A el : this) {
   71.10              if (that.contains(el)) {
   71.11                  buf.append(el);
   71.12 @@ -107,7 +107,7 @@
   71.13      }
   71.14  
   71.15      public List<A> diff(List<A> that) {
   71.16 -        ListBuffer<A> buf = ListBuffer.lb();
   71.17 +        ListBuffer<A> buf = new ListBuffer<>();
   71.18          for (A el : this) {
   71.19              if (!that.contains(el)) {
   71.20                  buf.append(el);
   71.21 @@ -120,7 +120,7 @@
   71.22       * Create a new list from the first {@code n} elements of this list
   71.23       */
   71.24      public List<A> take(int n) {
   71.25 -        ListBuffer<A> buf = ListBuffer.lb();
   71.26 +        ListBuffer<A> buf = new ListBuffer<>();
   71.27          int count = 0;
   71.28          for (A el : this) {
   71.29              if (count++ == n) break;
   71.30 @@ -167,7 +167,7 @@
   71.31      }
   71.32  
   71.33      public static <A> List<A> from(Iterable<? extends A> coll) {
   71.34 -        ListBuffer<A> xs = ListBuffer.lb();
   71.35 +        ListBuffer<A> xs = new ListBuffer<>();
   71.36          for (A a : coll) {
   71.37              xs.append(a);
   71.38          }
    72.1 --- a/src/share/classes/com/sun/tools/javac/util/ListBuffer.java	Thu Sep 26 10:43:55 2013 -0700
    72.2 +++ b/src/share/classes/com/sun/tools/javac/util/ListBuffer.java	Thu Sep 26 17:23:00 2013 -0700
    72.3 @@ -1,5 +1,5 @@
    72.4  /*
    72.5 - * Copyright (c) 1999, 2012, Oracle and/or its affiliates. All rights reserved.
    72.6 + * Copyright (c) 1999, 2013, Oracle and/or its affiliates. All rights reserved.
    72.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    72.8   *
    72.9   * This code is free software; you can redistribute it and/or modify it
   72.10 @@ -40,10 +40,6 @@
   72.11   */
   72.12  public class ListBuffer<A> extends AbstractQueue<A> {
   72.13  
   72.14 -    public static <T> ListBuffer<T> lb() {
   72.15 -        return new ListBuffer<T>();
   72.16 -    }
   72.17 -
   72.18      public static <T> ListBuffer<T> of(T x) {
   72.19          ListBuffer<T> lb = new ListBuffer<T>();
   72.20          lb.add(x);
    73.1 --- a/src/share/classes/com/sun/tools/javac/util/Log.java	Thu Sep 26 10:43:55 2013 -0700
    73.2 +++ b/src/share/classes/com/sun/tools/javac/util/Log.java	Thu Sep 26 17:23:00 2013 -0700
    73.3 @@ -123,7 +123,7 @@
    73.4       * active diagnostic handler.
    73.5       */
    73.6      public static class DeferredDiagnosticHandler extends DiagnosticHandler {
    73.7 -        private Queue<JCDiagnostic> deferred = ListBuffer.lb();
    73.8 +        private Queue<JCDiagnostic> deferred = new ListBuffer<>();
    73.9          private final Filter<JCDiagnostic> filter;
   73.10  
   73.11          public DeferredDiagnosticHandler(Log log) {
    74.1 --- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    74.2 +++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    74.3 @@ -1,5 +1,5 @@
    74.4  #
    74.5 -# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
    74.6 +# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    74.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    74.8  #
    74.9  # This code is free software; you can redistribute it and/or modify it
   74.10 @@ -27,8 +27,13 @@
   74.11  main.error=\u30A8\u30E9\u30FC{0}\u500B
   74.12  main.warnings=\u8B66\u544A{0}\u500B
   74.13  main.warning=\u8B66\u544A{0}\u500B
   74.14 -main.usage=\u4F7F\u7528\u65B9\u6CD5: javadoc [options] [packagenames] [sourcefiles] [@files]\n-overview <file>          HTML\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u6982\u8981\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u3080\n-public                   public\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u306E\u307F\u3092\u793A\u3059\n-protected                protected/public\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u793A\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8)\n-package                  package/protected/public\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u793A\u3059\n-private                  \u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u793A\u3059\n-help                     \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n-doclet <class>           \u4EE3\u66FFdoclet\u3092\u4ECB\u3057\u3066\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n-docletpath <path>        doclet\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u63A2\u3059\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n-sourcepath <pathlist>    \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n-classpath <pathlist>     \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n-exclude <pkglist>        \u9664\u5916\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u6307\u5B9A\u3059\u308B\n-subpackages <subpkglist> \u518D\u5E30\u7684\u306B\u30ED\u30FC\u30C9\u3059\u308B\u30B5\u30D6\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6307\u5B9A\u3059\u308B\n-breakiterator            BreakIterator\u3067\u6700\u521D\u306E\u6587\u3092\u8A08\u7B97\u3059\u308B\n-bootclasspath <pathlist> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u306B\u3088\u308A\u30ED\u30FC\u30C9\u3055\u308C\u305F\n\t\t\t  \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n-source <release>         \u6307\u5B9A\u3055\u308C\u305F\u30EA\u30EA\u30FC\u30B9\u3068\u30BD\u30FC\u30B9\u306E\u4E92\u63DB\u6027\u3092\u63D0\u4F9B\u3059\u308B\n-extdirs <dirlist>        \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u62E1\u5F35\u6A5F\u80FD\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n-verbose                  Javadoc\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n-locale <name>            en_US\u3084en_US_WIN\u306A\u3069\u306E\u4F7F\u7528\u3059\u308B\u30ED\u30B1\u30FC\u30EB\n-encoding <name>          \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D\n-quiet                    \u72B6\u614B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u306A\u3044\n-J<flag>                  <flag>\u3092\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3059\n-X                        \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3059\u308B\n
   74.15 -main.Xusage=-Xmaxerrs <number>        \u51FA\u529B\u3059\u308B\u30A8\u30E9\u30FC\u306E\u6700\u5927\u6570\u3092\u8A2D\u5B9A\u3059\u308B\n-Xmaxwarns <number>       \u51FA\u529B\u3059\u308B\u8B66\u544A\u306E\u6700\u5927\u6570\u3092\u8A2D\u5B9A\u3059\u308B\n\n\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
   74.16 +
   74.17 +main.usage=\u4F7F\u7528\u65B9\u6CD5: javadoc [options] [packagenames] [sourcefiles] [@files]\n  -overview <file>          HTML\u30D5\u30A1\u30A4\u30EB\u304B\u3089\u6982\u8981\u30C9\u30AD\u30E5\u30E1\u30F3\u30C8\u3092\u8AAD\u307F\u8FBC\u3080\n  -public                   public\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u306E\u307F\u3092\u793A\u3059\n  -protected                protected/public\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u793A\u3059(\u30C7\u30D5\u30A9\u30EB\u30C8)\n  -package                  package/protected/public\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u793A\u3059\n  -private                  \u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u30E1\u30F3\u30D0\u30FC\u3092\u793A\u3059\n  -help                     \u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u30FB\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n  -doclet <class>           \u4EE3\u66FFdoclet\u3092\u4ECB\u3057\u3066\u51FA\u529B\u3092\u751F\u6210\u3059\u308B\n  -docletpath <path>        doclet\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u63A2\u3059\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n  -sourcepath <pathlist>    \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n  -classpath <pathlist>     \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\n  -cp <pathlist>                   \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u3042\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B\r\n  -exclude <pkglist>        \u9664\u5916\u3059\u308B\u30D1\u30C3\u30B1\u30FC\u30B8\u30FB\u30EA\u30B9\u30C8\u3092\u6307\u5B9A\u3059\u308B\n  -subpackages <subpkglist> \u518D\u5E30\u7684\u306B\u30ED\u30FC\u30C9\u3059\u308B\u30B5\u30D6\u30D1\u30C3\u30B1\u30FC\u30B8\u3092\u6307\u5B9A\u3059\u308B\n  -breakiterator            BreakIterator\u3067\u6700\u521D\u306E\u6587\u3092\u8A08\u7B97\u3059\u308B\n  -bootclasspath <pathlist> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30ED\u30FC\u30C0\u30FC\u306B\u3088\u308A\u30ED\u30FC\u30C9\u3055\u308C\u305F\n                                   \u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n  -source <release>         \u6307\u5B9A\u3055\u308C\u305F\u30EA\u30EA\u30FC\u30B9\u3068\u30BD\u30FC\u30B9\u306E\u4E92\u63DB\u6027\u3092\u63D0\u4F9B\u3059\u308B\n  -extdirs <dirlist>        \u30A4\u30F3\u30B9\u30C8\u30FC\u30EB\u3055\u308C\u305F\u62E1\u5F35\u6A5F\u80FD\u306E\u5834\u6240\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B\n  -verbose                  Javadoc\u306E\u52D5\u4F5C\u306B\u3064\u3044\u3066\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u51FA\u529B\u3059\u308B\n  -locale <name>            en_US\u3084en_US_WIN\u306A\u3069\u306E\u4F7F\u7528\u3059\u308B\u30ED\u30B1\u30FC\u30EB\n  -encoding <name>          \u30BD\u30FC\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u30A8\u30F3\u30B3\u30FC\u30C7\u30A3\u30F3\u30B0\u540D\n  -quiet                    \u72B6\u614B\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u306A\u3044\n  -J<flag>                  <flag>\u3092\u5B9F\u884C\u6642\u30B7\u30B9\u30C6\u30E0\u306B\u76F4\u63A5\u6E21\u3059\n  -X                        \u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u306E\u6982\u8981\u3092\u51FA\u529B\u3057\u7D42\u4E86\u3059\u308B\n
   74.18 +
   74.19 +main.Xusage=\  -Xmaxerrs <number>        \u51FA\u529B\u3059\u308B\u30A8\u30E9\u30FC\u306E\u6700\u5927\u6570\u3092\u8A2D\u5B9A\u3059\u308B\n  -Xmaxwarns <number>       \u51FA\u529B\u3059\u308B\u8B66\u544A\u306E\u6700\u5927\u6570\u3092\u8A2D\u5B9A\u3059\u308B\n
   74.20 +
   74.21 +main.Xusage.foot=\u3053\u308C\u3089\u306F\u975E\u6A19\u6E96\u30AA\u30D7\u30B7\u30E7\u30F3\u3067\u3042\u308A\u4E88\u544A\u306A\u3057\u306B\u5909\u66F4\u3055\u308C\u308B\u3053\u3068\u304C\u3042\u308A\u307E\u3059\u3002
   74.22 +
   74.23  main.option.already.seen={0}\u30AA\u30D7\u30B7\u30E7\u30F3\u304C\u8907\u6570\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u3059\u3002
   74.24  main.requires_argument=\u30AA\u30D7\u30B7\u30E7\u30F3{0}\u306B\u306F\u5F15\u6570\u304C\u5FC5\u8981\u3067\u3059\u3002
   74.25  main.locale_first=\u30AA\u30D7\u30B7\u30E7\u30F3-locale\u306F\u3001\u30B3\u30DE\u30F3\u30C9\u30E9\u30A4\u30F3\u306E\u6700\u521D\u306B\u6307\u5B9A\u3059\u308B\u5FC5\u8981\u304C\u3042\u308A\u307E\u3059\u3002
    75.1 --- a/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    75.2 +++ b/src/share/classes/com/sun/tools/javadoc/resources/javadoc_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    75.3 @@ -1,5 +1,5 @@
    75.4  #
    75.5 -# Copyright (c) 1997, 2012, Oracle and/or its affiliates. All rights reserved.
    75.6 +# Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
    75.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    75.8  #
    75.9  # This code is free software; you can redistribute it and/or modify it
   75.10 @@ -27,8 +27,13 @@
   75.11  main.error={0} \u4E2A\u9519\u8BEF
   75.12  main.warnings={0} \u4E2A\u8B66\u544A
   75.13  main.warning={0} \u4E2A\u8B66\u544A
   75.14 -main.usage=\u7528\u6CD5: javadoc [options] [packagenames] [sourcefiles] [@files]\n-overview <file>          \u4ECE HTML \u6587\u4EF6\u8BFB\u53D6\u6982\u89C8\u6587\u6863\n-public                   \u4EC5\u663E\u793A public \u7C7B\u548C\u6210\u5458\n-protected                \u663E\u793A protected/public \u7C7B\u548C\u6210\u5458 (\u9ED8\u8BA4\u503C)\n-package                  \u663E\u793A package/protected/public \u7C7B\u548C\u6210\u5458\n-private                  \u663E\u793A\u6240\u6709\u7C7B\u548C\u6210\u5458\n-help                     \u663E\u793A\u547D\u4EE4\u884C\u9009\u9879\u5E76\u9000\u51FA\n-doclet <class>            \u901A\u8FC7\u66FF\u4EE3 doclet \u751F\u6210\u8F93\u51FA\n-docletpath <path>        \u6307\u5B9A\u67E5\u627E doclet \u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n-sourcepath <pathlist>    \u6307\u5B9A\u67E5\u627E\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E\n-classpath <pathlist>     \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n-exclude <pkglist>        \u6307\u5B9A\u8981\u6392\u9664\u7684\u7A0B\u5E8F\u5305\u5217\u8868\n-subpackages <subpkglist> \u6307\u5B9A\u8981\u9012\u5F52\u52A0\u8F7D\u7684\u5B50\u7A0B\u5E8F\u5305\n-breakiterator            \u8BA1\u7B97\u5E26\u6709 BreakIterator \u7684\u7B2C\u4E00\u4E2A\u8BED\u53E5\n-bootclasspath <pathlist> \u8986\u76D6\u7531\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u6240\u52A0\u8F7D\u7684\n\t\t\t   \u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n-source <release>         \u63D0\u4F9B\u4E0E\u6307\u5B9A\u53D1\u884C\u7248\u7684\u6E90\u517C\u5BB9\u6027\n-extdirs <dirlist>        \u8986\u76D6\u6240\u5B89\u88C5\u6269\u5C55\u7684\u4F4D\u7F6E\n-verbose                  \u8F93\u51FA\u6709\u5173 Javadoc \u6B63\u5728\u6267\u884C\u7684\u64CD\u4F5C\u7684\u4FE1\u606F\n-locale <name>            \u8981\u4F7F\u7528\u7684\u533A\u57DF\u8BBE\u7F6E, \u4F8B\u5982 en_US \u6216 en_US_WIN\n-encoding <name>          \u6E90\u6587\u4EF6\u7F16\u7801\u540D\u79F0\n-quiet                    \u4E0D\u663E\u793A\u72B6\u6001\u6D88\u606F\n-J<flag>                  \u76F4\u63A5\u5C06 <flag> \u4F20\u9012\u5230\u8FD0\u884C\u65F6\u7CFB\u7EDF\n-X                        \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981\n
   75.15 -main.Xusage=-Xmaxerrs <number>        \u8BBE\u7F6E\u8981\u8F93\u51FA\u7684\u6700\u5927\u9519\u8BEF\u6570\n-Xmaxwarns <number>       \u8BBE\u7F6E\u8981\u8F93\u51FA\u7684\u6700\u5927\u8B66\u544A\u6570\n\n\u8FD9\u4E9B\u9009\u9879\u90FD\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002
   75.16 +
   75.17 +main.usage=\u7528\u6CD5: javadoc [options] [packagenames] [sourcefiles] [@files]\n  -overview <file>                 \u4ECE HTML \u6587\u4EF6\u8BFB\u53D6\u6982\u89C8\u6587\u6863\n  -public                          \u4EC5\u663E\u793A public \u7C7B\u548C\u6210\u5458\n  -protected                       \u663E\u793A protected/public \u7C7B\u548C\u6210\u5458 (\u9ED8\u8BA4\u503C)\n  -package                         \u663E\u793A package/protected/public \u7C7B\u548C\u6210\u5458\n  -private                         \u663E\u793A\u6240\u6709\u7C7B\u548C\u6210\u5458\n  -help                            \u663E\u793A\u547D\u4EE4\u884C\u9009\u9879\u5E76\u9000\u51FA\n  -doclet <class>                  \u901A\u8FC7\u66FF\u4EE3 doclet \u751F\u6210\u8F93\u51FA\n  -docletpath <path>               \u6307\u5B9A\u67E5\u627E doclet \u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -sourcepath <pathlist>           \u6307\u5B9A\u67E5\u627E\u6E90\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -classpath <pathlist>            \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -cp <pathlist>                   \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -exclude <pkglist>               \u6307\u5B9A\u8981\u6392\u9664\u7684\u7A0B\u5E8F\u5305\u5217\u8868\n  -subpackages <subpkglist>        \u6307\u5B9A\u8981\u9012\u5F52\u52A0\u8F7D\u7684\u5B50\u7A0B\u5E8F\u5305\n  -breakiterator                   \u8BA1\u7B97\u5E26\u6709 BreakIterator \u7684\u7B2C\u4E00\u4E2A\u8BED\u53E5\n  -bootclasspath <pathlist>        \u8986\u76D6\u7531\u5F15\u5BFC\u7C7B\u52A0\u8F7D\u5668\u6240\u52A0\u8F7D\u7684\n                                   \u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E\n  -source <release>                \u63D0\u4F9B\u4E0E\u6307\u5B9A\u53D1\u884C\u7248\u7684\u6E90\u517C\u5BB9\u6027\n  -extdirs <dirlist>               \u8986\u76D6\u6240\u5B89\u88C5\u6269\u5C55\u7684\u4F4D\u7F6E\n  -verbose                         \u8F93\u51FA\u6709\u5173 Javadoc \u6B63\u5728\u6267\u884C\u7684\u64CD\u4F5C\u7684\u4FE1\u606F\n  -locale <name>                   \u8981\u4F7F\u7528\u7684\u533A\u57DF\u8BBE\u7F6E, \u4F8B\u5982 en_US \u6216 en_US_WIN\n  -encoding <name>                 \u6E90\u6587\u4EF6\u7F16\u7801\u540D\u79F0\n  -quiet                           \u4E0D\u663E\u793A\u72B6\u6001\u6D88\u606F\n  -J<flag>                         \u76F4\u63A5\u5C06 <flag> \u4F20\u9012\u5230\u8FD0\u884C\u65F6\u7CFB\u7EDF\n  -X                               \u8F93\u51FA\u975E\u6807\u51C6\u9009\u9879\u7684\u63D0\u8981\n
   75.18 +
   75.19 +main.Xusage=\  -Xmaxerrs <number>               \u8BBE\u7F6E\u8981\u8F93\u51FA\u7684\u6700\u5927\u9519\u8BEF\u6570\n  -Xmaxwarns <number>              \u8BBE\u7F6E\u8981\u8F93\u51FA\u7684\u6700\u5927\u8B66\u544A\u6570\n
   75.20 +
   75.21 +main.Xusage.foot=\u8FD9\u4E9B\u9009\u9879\u90FD\u662F\u975E\u6807\u51C6\u9009\u9879, \u5982\u6709\u66F4\u6539, \u6055\u4E0D\u53E6\u884C\u901A\u77E5\u3002
   75.22 +
   75.23  main.option.already.seen={0}\u9009\u9879\u53EA\u80FD\u6307\u5B9A\u4E00\u6B21\u3002
   75.24  main.requires_argument=\u9009\u9879{0}\u9700\u8981\u53C2\u6570\u3002
   75.25  main.locale_first=\u5728\u547D\u4EE4\u884C\u4E2D, \u9009\u9879 -locale \u5FC5\u987B\u4E3A\u7B2C\u4E00\u4E2A\u9009\u9879\u3002
    76.1 --- a/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    76.2 +++ b/src/share/classes/com/sun/tools/javah/resources/l10n_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    76.3 @@ -1,5 +1,5 @@
    76.4  #
    76.5 -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    76.6 +# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
    76.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    76.8  #
    76.9  # This code is free software; you can redistribute it and/or modify it
   76.10 @@ -49,7 +49,7 @@
   76.11  #
   76.12  # Usage message.
   76.13  #
   76.14 -usage=\u4F7F\u7528\u65B9\u6CD5: javah [options] <classes>\n\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n\n\t-help           \u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n\t-classpath <path>   \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-bootclasspath <path> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-d<dir>         \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n\t-o <file>         \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B)\n\t-jni           JNI\u5F62\u5F0F\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n\t-version         \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3059\u308B\n\t-verbose         \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n\t-force          \u5E38\u306B\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\n\n<classes> \u306F\u5B8C\u5168\u6307\u5B9A\u306E\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\n(java.lang.Object\u306A\u3069)\u3002\n
   76.15 +usage=\u4F7F\u7528\u65B9\u6CD5: javah [options] <classes>\n\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002\n\n\t-help           \u30D8\u30EB\u30D7\u30FB\u30E1\u30C3\u30BB\u30FC\u30B8\u3092\u8868\u793A\u3057\u3066\u7D42\u4E86\u3059\u308B\n\t-classpath <path>   \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-cp <path>            \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\r\n\t-bootclasspath <path> \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9\n\t-d<dir>         \u51FA\u529B\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA\n\t-o <file>         \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B)\n\t-jni           JNI\u5F62\u5F0F\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)\n\t-version         \u30D0\u30FC\u30B8\u30E7\u30F3\u60C5\u5831\u3092\u8868\u793A\u3059\u308B\n\t-verbose         \u8A73\u7D30\u306A\u51FA\u529B\u3092\u884C\u3046\n\t-force          \u5E38\u306B\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080\n\n<classes>\u306F\u5B8C\u5168\u6307\u5B9A\u306E\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\n(java.lang.Object\u306A\u3069)\u3002\n
   76.16  
   76.17  main.usage=\u4F7F\u7528\u65B9\u6CD5: \n  javah [options] <classes>\n[options]\u306B\u306F\u6B21\u306E\u3082\u306E\u304C\u3042\u308A\u307E\u3059\u3002
   76.18  main.opt.o=\  -o <file>                \u51FA\u529B\u30D5\u30A1\u30A4\u30EB(-d\u304B-o\u306E\u3069\u3061\u3089\u304B\u4E00\u65B9\u3092\u4F7F\u7528\u3059\u308B)
   76.19 @@ -60,6 +60,7 @@
   76.20  main.opt.jni=\  -jni                     JNI\u5F62\u5F0F\u306E\u30D8\u30C3\u30C0\u30FC\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u751F\u6210\u3059\u308B(\u30C7\u30D5\u30A9\u30EB\u30C8)
   76.21  main.opt.force=\  -force                   \u5E38\u306B\u51FA\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u66F8\u304D\u8FBC\u3080
   76.22  main.opt.classpath=\  -classpath <path>        \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9
   76.23 +main.opt.cp=\  -cp <path>               \u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9
   76.24  main.opt.bootclasspath=\  -bootclasspath <path>    \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u3092\u30ED\u30FC\u30C9\u3059\u308B\u30D1\u30B9
   76.25  main.usage.foot=<classes>\u306F\u5B8C\u5168\u6307\u5B9A\u306E\u540D\u524D\u3067\u6307\u5B9A\u3057\u307E\u3059\n(java.lang.Object\u306A\u3069)\u3002
   76.26  
   76.27 @@ -90,7 +91,7 @@
   76.28  err.prefix=\u30A8\u30E9\u30FC:
   76.29  err.cant.use.option.for.fm=\u6307\u5B9A\u3055\u308C\u305F\u30D5\u30A1\u30A4\u30EB\u30FB\u30DE\u30CD\u30FC\u30B8\u30E3\u3067{0}\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093
   76.30  err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0}
   76.31 -err.ioerror=\u5165\u51FA\u529B\u30A8\u30E9\u30FC: {0}
   76.32 +err.ioerror=IO\u30A8\u30E9\u30FC: {0}
   76.33  err.missing.arg={0}\u306E\u5024\u304C\u3042\u308A\u307E\u305B\u3093
   76.34  err.no.classes.specified=\u30AF\u30E9\u30B9\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
   76.35  err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
    77.1 --- a/src/share/classes/com/sun/tools/javah/resources/l10n_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    77.2 +++ b/src/share/classes/com/sun/tools/javah/resources/l10n_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    77.3 @@ -1,5 +1,5 @@
    77.4  #
    77.5 -# Copyright (c) 1998, 2010, Oracle and/or its affiliates. All rights reserved.
    77.6 +# Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
    77.7  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    77.8  #
    77.9  # This code is free software; you can redistribute it and/or modify it
   77.10 @@ -49,7 +49,7 @@
   77.11  #
   77.12  # Usage message.
   77.13  #
   77.14 -usage=\u7528\u6CD5: javah [options] <classes>\n\n\u5176\u4E2D, [options] \u5305\u62EC:\n\n\t-help                 \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\u5E76\u9000\u51FA\n\t-classpath <path>     \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84\n\t-bootclasspath <path> \u4ECE\u4E2D\u52A0\u8F7D\u5F15\u5BFC\u7C7B\u7684\u8DEF\u5F84\n\t-d <dir>              \u8F93\u51FA\u76EE\u5F55\n\t-o <file>             \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00)\n\t-jni                  \u751F\u6210 JNI \u6837\u5F0F\u7684\u6807\u5934\u6587\u4EF6 (\u9ED8\u8BA4\u503C)\n\t-version              \u8F93\u51FA\u7248\u672C\u4FE1\u606F\n\t-verbose              \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n\t-force                \u59CB\u7EC8\u5199\u5165\u8F93\u51FA\u6587\u4EF6\n\n<classes> \u662F\u4F7F\u7528\u5176\u5168\u9650\u5B9A\u540D\u79F0\u6307\u5B9A\u7684,\n(\u4F8B\u5982 java.lang.Object)\u3002\n
   77.15 +usage=\u7528\u6CD5: javah [options] <classes>\n\n\u5176\u4E2D, [options] \u5305\u62EC:\n\n\t-help                 \u8F93\u51FA\u6B64\u5E2E\u52A9\u6D88\u606F\u5E76\u9000\u51FA\n\t-classpath <path>     \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84\n\t-cp <path>            \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84\n\t-bootclasspath <path> \u4ECE\u4E2D\u52A0\u8F7D\u5F15\u5BFC\u7C7B\u7684\u8DEF\u5F84\n\t-d <dir>              \u8F93\u51FA\u76EE\u5F55\n\t-o <file>             \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00)\n\t-jni                  \u751F\u6210 JNI \u6837\u5F0F\u7684\u6807\u5934\u6587\u4EF6 (\u9ED8\u8BA4\u503C)\n\t-version              \u8F93\u51FA\u7248\u672C\u4FE1\u606F\n\t-verbose              \u542F\u7528\u8BE6\u7EC6\u8F93\u51FA\n\t-force                \u59CB\u7EC8\u5199\u5165\u8F93\u51FA\u6587\u4EF6\n\n<classes> \u662F\u4F7F\u7528\u5176\u5168\u9650\u5B9A\u540D\u79F0\u6307\u5B9A\u7684,\n(\u4F8B\u5982, java.lang.Object)\u3002\n
   77.16  
   77.17  main.usage=\u7528\u6CD5: \n  javah [options] <classes>\n\u5176\u4E2D, [options] \u5305\u62EC:
   77.18  main.opt.o=\  -o <file>                \u8F93\u51FA\u6587\u4EF6 (\u53EA\u80FD\u4F7F\u7528 -d \u6216 -o \u4E4B\u4E00)
   77.19 @@ -60,6 +60,7 @@
   77.20  main.opt.jni=\  -jni                     \u751F\u6210 JNI \u6837\u5F0F\u7684\u6807\u5934\u6587\u4EF6 (\u9ED8\u8BA4\u503C)
   77.21  main.opt.force=\  -force                   \u59CB\u7EC8\u5199\u5165\u8F93\u51FA\u6587\u4EF6
   77.22  main.opt.classpath=\  -classpath <path>        \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84
   77.23 +main.opt.cp=\  -cp <path>               \u4ECE\u4E2D\u52A0\u8F7D\u7C7B\u7684\u8DEF\u5F84
   77.24  main.opt.bootclasspath=\  -bootclasspath <path>    \u4ECE\u4E2D\u52A0\u8F7D\u5F15\u5BFC\u7C7B\u7684\u8DEF\u5F84
   77.25  main.usage.foot=<classes> \u662F\u4F7F\u7528\u5176\u5168\u9650\u5B9A\u540D\u79F0\u6307\u5B9A\u7684\n(\u4F8B\u5982, java.lang.Object)\u3002
   77.26  
    78.1 --- a/src/share/classes/com/sun/tools/javap/CodeWriter.java	Thu Sep 26 10:43:55 2013 -0700
    78.2 +++ b/src/share/classes/com/sun/tools/javap/CodeWriter.java	Thu Sep 26 17:23:00 2013 -0700
    78.3 @@ -208,7 +208,7 @@
    78.4  
    78.5  
    78.6      public void writeExceptionTable(Code_attribute attr) {
    78.7 -        if (attr.exception_table_langth > 0) {
    78.8 +        if (attr.exception_table_length > 0) {
    78.9              println("Exception table:");
   78.10              indent(+1);
   78.11              println(" from    to  target type");
    79.1 --- a/src/share/classes/com/sun/tools/javap/resources/javap_ja.properties	Thu Sep 26 10:43:55 2013 -0700
    79.2 +++ b/src/share/classes/com/sun/tools/javap/resources/javap_ja.properties	Thu Sep 26 17:23:00 2013 -0700
    79.3 @@ -1,5 +1,5 @@
    79.4  
    79.5 -err.prefix=\u30A8\u30E9\u30FC: 
    79.6 +err.prefix=\u30A8\u30E9\u30FC:
    79.7  
    79.8  err.bad.constant.pool={0}\u306E\u5B9A\u6570\u30D7\u30FC\u30EB\u306E\u8AAD\u53D6\u308A\u4E2D\u306B\u30A8\u30E9\u30FC\u304C\u767A\u751F\u3057\u307E\u3057\u305F: {1}
    79.9  err.class.not.found=\u30AF\u30E9\u30B9\u304C\u898B\u3064\u304B\u308A\u307E\u305B\u3093: {0}
   79.10 @@ -55,6 +55,8 @@
   79.11  
   79.12  main.opt.classpath=\  -classpath <path>        \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B
   79.13  
   79.14 +main.opt.cp=\  -cp <path>               \u30E6\u30FC\u30B6\u30FC\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u3092\u691C\u7D22\u3059\u308B\u5834\u6240\u3092\u6307\u5B9A\u3059\u308B
   79.15 +
   79.16  main.opt.bootclasspath=\  -bootclasspath <path>    \u30D6\u30FC\u30C8\u30B9\u30C8\u30E9\u30C3\u30D7\u30FB\u30AF\u30E9\u30B9\u30FB\u30D5\u30A1\u30A4\u30EB\u306E\u4F4D\u7F6E\u3092\u30AA\u30FC\u30D0\u30FC\u30E9\u30A4\u30C9\u3059\u308B
   79.17  
   79.18  main.opt.constants=\  -constants               \u9759\u7684final\u5B9A\u6570\u3092\u8868\u793A\u3059\u308B
    80.1 --- a/src/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties	Thu Sep 26 10:43:55 2013 -0700
    80.2 +++ b/src/share/classes/com/sun/tools/javap/resources/javap_zh_CN.properties	Thu Sep 26 17:23:00 2013 -0700
    80.3 @@ -1,5 +1,5 @@
    80.4  
    80.5 -err.prefix=\u9519\u8BEF: 
    80.6 +err.prefix=\u9519\u8BEF:
    80.7  
    80.8  err.bad.constant.pool=\u8BFB\u53D6{0}\u7684\u5E38\u91CF\u6C60\u65F6\u51FA\u9519: {1}
    80.9  err.class.not.found=\u627E\u4E0D\u5230\u7C7B: {0}
   80.10 @@ -55,6 +55,8 @@
   80.11  
   80.12  main.opt.classpath=\  -classpath <path>        \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E
   80.13  
   80.14 +main.opt.cp=\  -cp <path>               \u6307\u5B9A\u67E5\u627E\u7528\u6237\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E
   80.15 +
   80.16  main.opt.bootclasspath=\  -bootclasspath <path>    \u8986\u76D6\u5F15\u5BFC\u7C7B\u6587\u4EF6\u7684\u4F4D\u7F6E
   80.17  
   80.18  main.opt.constants=\  -constants               \u663E\u793A\u9759\u6001\u6700\u7EC8\u5E38\u91CF
    81.1 --- a/src/share/classes/com/sun/tools/sjavac/BuildState.java	Thu Sep 26 10:43:55 2013 -0700
    81.2 +++ b/src/share/classes/com/sun/tools/sjavac/BuildState.java	Thu Sep 26 17:23:00 2013 -0700
    81.3 @@ -1,5 +1,5 @@
    81.4  /*
    81.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    81.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    81.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    81.8   *
    81.9   * This code is free software; you can redistribute it and/or modify it
   81.10 @@ -81,12 +81,13 @@
   81.11      }
   81.12  
   81.13      /**
   81.14 -     * Collect all packages, sources and artifacts for all modules
   81.15 -     * into the build state.
   81.16 +     * Store references to all packages, sources and artifacts for all modules
   81.17 +     * into the build state. I.e. flatten the module tree structure
   81.18 +     * into global maps stored in the BuildState for easy access.
   81.19       *
   81.20       * @param m The set of modules.
   81.21       */
   81.22 -    public void collectPackagesSourcesAndArtifacts(Map<String,Module> m) {
   81.23 +    public void flattenPackagesSourcesAndArtifacts(Map<String,Module> m) {
   81.24          modules = m;
   81.25          // Extract all the found packages.
   81.26          for (Module i : modules.values()) {
   81.27 @@ -121,11 +122,12 @@
   81.28      }
   81.29  
   81.30      /**
   81.31 -     * Collect all the artifacts of all modules and packages.
   81.32 +     * Store references to all artifacts found in the module tree into the maps
   81.33 +     * stored in the build state.
   81.34       *
   81.35       * @param m The set of modules.
   81.36       */
   81.37 -    public void collectArtifacts(Map<String,Module> m) {
   81.38 +    public void flattenArtifacts(Map<String,Module> m) {
   81.39          modules = m;
   81.40          // Extract all the found packages.
   81.41          for (Module i : modules.values()) {
   81.42 @@ -270,6 +272,8 @@
   81.43              Module mnew = findModuleFromPackageName(pkg);
   81.44              Package pprev = prev.packages().get(pkg);
   81.45              mnew.addPackage(pprev);
   81.46 +            // Do not forget to update the flattened data.
   81.47 +            packages.put(pkg, pprev);
   81.48          }
   81.49      }
   81.50  }
    82.1 --- a/src/share/classes/com/sun/tools/sjavac/Main.java	Thu Sep 26 10:43:55 2013 -0700
    82.2 +++ b/src/share/classes/com/sun/tools/sjavac/Main.java	Thu Sep 26 17:23:00 2013 -0700
    82.3 @@ -274,7 +274,7 @@
    82.4  //          findFiles(args, "-modulepath", Util.set(".class"), modules_to_link_to, modules, current_module, true);
    82.5  
    82.6              // Add the set of sources to the build database.
    82.7 -            javac_state.now().collectPackagesSourcesAndArtifacts(modules);
    82.8 +            javac_state.now().flattenPackagesSourcesAndArtifacts(modules);
    82.9              javac_state.now().checkInternalState("checking sources", false, sources);
   82.10              javac_state.now().checkInternalState("checking linked sources", true, sources_to_link_to);
   82.11              javac_state.setVisibleSources(sources_to_link_to);
   82.12 @@ -311,7 +311,7 @@
   82.13              Map<String,Source> generated_sources = new HashMap<String,Source>();
   82.14              Source.scanRoot(gensrc_dir, Util.set(".java"), null, null, null, null,
   82.15                     generated_sources, modules, current_module, false, true, false);
   82.16 -            javac_state.now().collectPackagesSourcesAndArtifacts(modules);
   82.17 +            javac_state.now().flattenPackagesSourcesAndArtifacts(modules);
   82.18              // Recheck the the source files and their timestamps again.
   82.19              javac_state.checkSourceStatus(true);
   82.20  
   82.21 @@ -336,8 +336,8 @@
   82.22              // Only update the state if the compile went well.
   82.23              if (rc[0]) {
   82.24                  javac_state.save();
   82.25 -                // Collect all the artifacts.
   82.26 -                javac_state.now().collectArtifacts(modules);
   82.27 +                // Reflatten only the artifacts.
   82.28 +                javac_state.now().flattenArtifacts(modules);
   82.29                  // Remove artifacts that were generated during the last compile, but not this one.
   82.30                  javac_state.removeSuperfluousArtifacts(recently_compiled);
   82.31              }
    83.1 --- a/src/share/classes/com/sun/tools/sjavac/server/JavacServer.java	Thu Sep 26 10:43:55 2013 -0700
    83.2 +++ b/src/share/classes/com/sun/tools/sjavac/server/JavacServer.java	Thu Sep 26 17:23:00 2013 -0700
    83.3 @@ -464,7 +464,7 @@
    83.4              PrintStream err) {
    83.5          int rc = -3;
    83.6          try {
    83.7 -            int port = portFile.getPort();
    83.8 +            int port = portFile.containsPortInfo() ? portFile.getPort() : 0;
    83.9              if (port == 0) {
   83.10                  return ERROR_BUT_TRY_AGAIN;
   83.11              }
    84.1 --- a/test/com/sun/javadoc/lib/JavadocTester.java	Thu Sep 26 10:43:55 2013 -0700
    84.2 +++ b/test/com/sun/javadoc/lib/JavadocTester.java	Thu Sep 26 17:23:00 2013 -0700
    84.3 @@ -1,5 +1,5 @@
    84.4  /*
    84.5 - * Copyright (c) 2002, 2011, Oracle and/or its affiliates. All rights reserved.
    84.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    84.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    84.8   *
    84.9   * This code is free software; you can redistribute it and/or modify it
   84.10 @@ -57,6 +57,7 @@
   84.11      protected static final String SRC_DIR = System.getProperty("test.src", ".");
   84.12      protected static final String JAVA_VERSION = System.getProperty("java.version");
   84.13      protected static final String[][] NO_TEST = new String[][] {};
   84.14 +    protected static final String[] NO_FILE_TEST = new String[] {};
   84.15  
   84.16      /**
   84.17       * Use this as the file name in the test array when you want to search
   84.18 @@ -166,6 +167,26 @@
   84.19      }
   84.20  
   84.21      /**
   84.22 +     * Execute the tests.
   84.23 +     *
   84.24 +     * @param tester               the tester to execute
   84.25 +     * @param args                 the arguments to pass to Javadoc
   84.26 +     * @param testArray            the array of tests
   84.27 +     * @param negatedTestArray     the array of negated tests
   84.28 +     * @param fileTestArray        the array of file tests
   84.29 +     * @param negatedFileTestArray the array of negated file tests
   84.30 +     * @return                     the return code for the execution of Javadoc
   84.31 +     */
   84.32 +    public static int run(JavadocTester tester, String[] args,
   84.33 +            String[][] testArray, String[][] negatedTestArray, String[] fileTestArray,
   84.34 +            String[] negatedFileTestArray) {
   84.35 +        int returnCode = tester.runJavadoc(args);
   84.36 +        tester.runTestsOnHTML(testArray, negatedTestArray);
   84.37 +        tester.runTestsOnFile(fileTestArray, negatedFileTestArray);
   84.38 +        return returnCode;
   84.39 +    }
   84.40 +
   84.41 +    /**
   84.42       * Execute Javadoc using the default doclet.
   84.43       *
   84.44       * @param args  the arguments to pass to Javadoc
   84.45 @@ -244,6 +265,19 @@
   84.46      }
   84.47  
   84.48      /**
   84.49 +     * Run array of tests on the generated files.
   84.50 +     * This method accepts a fileTestArray for testing if a file is generated
   84.51 +     * and a negatedFileTestArray for testing if a file is not found.
   84.52 +     *
   84.53 +     * @param testArray         the array of file tests
   84.54 +     * @param negatedTestArray  the array of negated file tests
   84.55 +     */
   84.56 +    public void runTestsOnFile(String[] fileTestArray, String[] negatedFileTestArray) {
   84.57 +        runTestsOnFile(fileTestArray, false);
   84.58 +        runTestsOnFile(negatedFileTestArray, true);
   84.59 +    }
   84.60 +
   84.61 +    /**
   84.62       * Run the array of tests on the resulting HTML.
   84.63       *
   84.64       * @param testArray the array of tests
   84.65 @@ -265,9 +299,11 @@
   84.66                  fileString = readFileToString(testArray[i][0]);
   84.67              } catch (Error e) {
   84.68                  if (isNegated) {
   84.69 -                  numTestsPassed += 1;
   84.70 -                  System.out.println("Passed\n not found:\n"
   84.71 -                    + stringToFind + " in non-existent " + testArray[i][0] + "\n");
   84.72 +                  System.out.println( "FAILED" + "\n"
   84.73 +                                    + "for bug " + getBugId()
   84.74 +                                    + " (" + getBugName() + ") "
   84.75 +                                    + "due to "
   84.76 +                                    + e + "\n");
   84.77                    continue;
   84.78                  }
   84.79                  throw e;
   84.80 @@ -291,6 +327,39 @@
   84.81      }
   84.82  
   84.83      /**
   84.84 +     * Run the array of file tests on the generated files.
   84.85 +     *
   84.86 +     * @param testArray the array of file tests
   84.87 +     * @param isNegated true if test is negated; false otherwise
   84.88 +     */
   84.89 +    private void runTestsOnFile(String[] testArray, boolean isNegated) {
   84.90 +        String fileName;
   84.91 +        String failedString;
   84.92 +        String passedString;
   84.93 +        for (int i = 0; i < testArray.length; i++) {
   84.94 +            numTestsRun++;
   84.95 +            fileName = testArray[i];
   84.96 +            failedString = "FAILED" + "\n"
   84.97 +                    + "for bug " + getBugId() + " (" + getBugName() + ") "
   84.98 +                    + "file (" + fileName + ") found" + "\n";
   84.99 +            passedString = "Passed" + "\n" +
  84.100 +                        "file (" + fileName + ") not found" + "\n";
  84.101 +            System.out.print("Running subtest #" + numTestsRun + "... ");
  84.102 +            try {
  84.103 +                File file = new File(fileName);
  84.104 +                if ((file.exists() && !isNegated) || (!file.exists() && isNegated)) {
  84.105 +                    numTestsPassed += 1;
  84.106 +                    System.out.println(passedString);
  84.107 +                } else {
  84.108 +                    System.out.println(failedString);
  84.109 +                }
  84.110 +            } catch (Error e) {
  84.111 +                System.err.println(e);
  84.112 +            }
  84.113 +        }
  84.114 +    }
  84.115 +
  84.116 +    /**
  84.117       * Iterate through the list of given file pairs and diff each file.
  84.118       *
  84.119       * @param filePairs the pairs of files to diff.
    85.1 --- a/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java	Thu Sep 26 10:43:55 2013 -0700
    85.2 +++ b/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java	Thu Sep 26 17:23:00 2013 -0700
    85.3 @@ -1,5 +1,5 @@
    85.4  /*
    85.5 - * Copyright (c) 2004, Oracle and/or its affiliates. All rights reserved.
    85.6 + * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
    85.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    85.8   *
    85.9   * This code is free software; you can redistribute it and/or modify it
   85.10 @@ -23,20 +23,19 @@
   85.11  
   85.12  /*
   85.13   * @test
   85.14 - * @bug      4973609
   85.15 + * @bug      4973609 8015249
   85.16   * @summary  Make sure that annotation types with 0 members does not have
   85.17   *           extra HR tags.
   85.18   * @author   jamieh
   85.19   * @library  ../lib/
   85.20 - * @build    JavadocTester
   85.21 - * @build    TestAnnotationTypes
   85.22 + * @build    JavadocTester TestAnnotationTypes
   85.23   * @run main TestAnnotationTypes
   85.24   */
   85.25  
   85.26  public class TestAnnotationTypes extends JavadocTester {
   85.27  
   85.28      //Test information.
   85.29 -    private static final String BUG_ID = "4973609";
   85.30 +    private static final String BUG_ID = "4973609-8015249";
   85.31  
   85.32      //Javadoc arguments.
   85.33      private static final String[] ARGS = new String[] {
   85.34 @@ -44,7 +43,31 @@
   85.35      };
   85.36  
   85.37      //Input for string search tests.
   85.38 -    private static final String[][] TEST = NO_TEST;
   85.39 +    private static final String[][] TEST = {
   85.40 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.41 +            "<li>Summary:&nbsp;</li>" + NL + "<li><a href=\"#annotation_type_" +
   85.42 +            "field_summary\">Field</a>&nbsp;|&nbsp;</li>"},
   85.43 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.44 +            "<li>Detail:&nbsp;</li>" + NL + "<li><a href=\"#annotation_type_" +
   85.45 +            "field_detail\">Field</a>&nbsp;|&nbsp;</li>"},
   85.46 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.47 +            "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"},
   85.48 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.49 +            "<h3>Field Summary</h3>"},
   85.50 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.51 +            "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../" +
   85.52 +            "pkg/AnnotationTypeField.html#DEFAULT_NAME\">DEFAULT_NAME</a></span>" +
   85.53 +            "</code>&nbsp;</td>"},
   85.54 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.55 +            "<!-- ============ ANNOTATION TYPE FIELD DETAIL =========== -->"},
   85.56 +        {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
   85.57 +            "<h4>DEFAULT_NAME</h4>" + NL + "<pre>public static final&nbsp;java." +
   85.58 +            "lang.String&nbsp;DEFAULT_NAME</pre>"},
   85.59 +        {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
   85.60 +            "<li>Summary:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>"},
   85.61 +        {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
   85.62 +            "<li>Detail:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>"},
   85.63 +    };
   85.64      private static final String[][] NEGATED_TEST = {
   85.65          {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
   85.66              "<HR>" + NL + NL + "<P>" + NL + NL + "<P>" +
    86.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
    86.2 +++ b/test/com/sun/javadoc/testAnnotationTypes/pkg/AnnotationTypeField.java	Thu Sep 26 17:23:00 2013 -0700
    86.3 @@ -0,0 +1,35 @@
    86.4 +/*
    86.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
    86.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    86.7 + *
    86.8 + * This code is free software; you can redistribute it and/or modify it
    86.9 + * under the terms of the GNU General Public License version 2 only, as
   86.10 + * published by the Free Software Foundation.
   86.11 + *
   86.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
   86.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
   86.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
   86.15 + * version 2 for more details (a copy is included in the LICENSE file that
   86.16 + * accompanied this code).
   86.17 + *
   86.18 + * You should have received a copy of the GNU General Public License version
   86.19 + * 2 along with this work; if not, write to the Free Software Foundation,
   86.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
   86.21 + *
   86.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
   86.23 + * or visit www.oracle.com if you need additional information or have any
   86.24 + * questions.
   86.25 + */
   86.26 +
   86.27 +package pkg;
   86.28 +
   86.29 +import java.lang.annotation.*;
   86.30 +
   86.31 +/**
   86.32 + * This is just a test for annotation type fields.
   86.33 + */
   86.34 +@Documented public @interface AnnotationTypeField {
   86.35 +    String DEFAULT_NAME = "test";
   86.36 +
   86.37 +    String name() default DEFAULT_NAME;
   86.38 +}
    87.1 --- a/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java	Thu Sep 26 10:43:55 2013 -0700
    87.2 +++ b/test/com/sun/javadoc/testDocFileDir/TestDocFileDir.java	Thu Sep 26 17:23:00 2013 -0700
    87.3 @@ -1,5 +1,5 @@
    87.4  /*
    87.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
    87.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    87.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    87.8   *
    87.9   * This code is free software; you can redistribute it and/or modify it
   87.10 @@ -25,7 +25,7 @@
   87.11  
   87.12  /*
   87.13   * @test
   87.14 - * @bug 4258405 4973606
   87.15 + * @bug 4258405 4973606 8024096
   87.16   * @summary This test verifies that the doc-file directory does not
   87.17   *          get overwritten when the sourcepath is equal to the destination
   87.18   *          directory.
   87.19 @@ -47,25 +47,17 @@
   87.20          };
   87.21      private static final String[][] NEGATED_TEST1 = NO_TEST;
   87.22  
   87.23 -    private static final String[][] TEST2 = {
   87.24 -        {BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used1" +
   87.25 +    private static final String[] FILE_TEST2 = {
   87.26 +        BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used1" +
   87.27              FS + "testfile.txt",
   87.28 -            "passed"
   87.29 -        },
   87.30 -        {BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used2" +
   87.31 +        BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-used2" +
   87.32 +            FS + "testfile.txt"
   87.33 +    };
   87.34 +    private static final String[] FILE_NEGATED_TEST2 = {
   87.35 +        BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded1" +
   87.36              FS + "testfile.txt",
   87.37 -            "passed"
   87.38 -        },
   87.39 -    };
   87.40 -    private static final String[][] NEGATED_TEST2 = {
   87.41 -        {BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded1" +
   87.42 -            FS + "testfile.txt",
   87.43 -            "passed"
   87.44 -        },
   87.45 -        {BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded2" +
   87.46 -            FS + "testfile.txt",
   87.47 -            "passed"
   87.48 -        },
   87.49 +        BUG_ID + "-2" + FS + "pkg" + FS + "doc-files" + FS + "subdir-excluded2" +
   87.50 +            FS + "testfile.txt"
   87.51      };
   87.52  
   87.53      private static final String[][] TEST0 = {
   87.54 @@ -106,7 +98,7 @@
   87.55          run(tester, ARGS0, TEST0, NEGATED_TEST0);
   87.56          copyDir(SRC_DIR + FS + "pkg", BUG_ID + "-1");
   87.57          run(tester, ARGS1, TEST1, NEGATED_TEST1);
   87.58 -        run(tester, ARGS2, TEST2, NEGATED_TEST2);
   87.59 +        run(tester, ARGS2, NO_TEST, NO_TEST, FILE_TEST2, FILE_NEGATED_TEST2);
   87.60          tester.printSummary();
   87.61      }
   87.62  
    88.1 --- a/test/com/sun/javadoc/testEncoding/EncodeTest.java	Thu Sep 26 10:43:55 2013 -0700
    88.2 +++ b/test/com/sun/javadoc/testEncoding/EncodeTest.java	Thu Sep 26 17:23:00 2013 -0700
    88.3 @@ -1,5 +1,5 @@
    88.4  /*
    88.5 - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
    88.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    88.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    88.8   *
    88.9   * This code is free software; you can redistribute it and/or modify it
   88.10 @@ -23,7 +23,9 @@
   88.11  
   88.12  
   88.13  /**
   88.14 - * ±ñÉ¿í ¹©¢!
   88.15 + * Testing en\u00e7\u00f4ded string.
   88.16 + * In the encoded comment string, Unicode U+00E7 is "Latin small letter C with cedilla"
   88.17 + * and Unicode U+00F4 is "Latin small letter O with circumflex"
   88.18   */
   88.19  public class EncodeTest {
   88.20  }
    89.1 --- a/test/com/sun/javadoc/testEncoding/TestEncoding.java	Thu Sep 26 10:43:55 2013 -0700
    89.2 +++ b/test/com/sun/javadoc/testEncoding/TestEncoding.java	Thu Sep 26 17:23:00 2013 -0700
    89.3 @@ -1,5 +1,5 @@
    89.4  /*
    89.5 - * Copyright (c) 2002, Oracle and/or its affiliates. All rights reserved.
    89.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    89.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    89.8   *
    89.9   * This code is free software; you can redistribute it and/or modify it
   89.10 @@ -23,7 +23,7 @@
   89.11  
   89.12  /*
   89.13   * @test
   89.14 - * @bug 4661481
   89.15 + * @bug 4661481 8024096
   89.16   * @summary This test determines if the value of the -encoding option is
   89.17   * properly passed from Javadoc to the source file parser.
   89.18   * @author jamieh
   89.19 @@ -40,12 +40,12 @@
   89.20  
   89.21      //If ??? is found in the output, the source file was not read with the correct encoding setting.
   89.22      private static final String[][] NEGATED_TEST = {
   89.23 -        {BUG_ID + FS + "EncodeTest.html", "???"}
   89.24 +        {BUG_ID + FS + "EncodeTest.html", "??"}
   89.25      };
   89.26      private static final String[] ARGS =
   89.27          new String[] {
   89.28              "-d", BUG_ID, "-sourcepath", SRC_DIR,
   89.29 -            "-encoding", "SJIS", SRC_DIR + FS + "EncodeTest.java"
   89.30 +            "-encoding", "iso-8859-1", SRC_DIR + FS + "EncodeTest.java"
   89.31          };
   89.32  
   89.33      /**
    90.1 --- a/test/com/sun/javadoc/testHref/TestHref.java	Thu Sep 26 10:43:55 2013 -0700
    90.2 +++ b/test/com/sun/javadoc/testHref/TestHref.java	Thu Sep 26 17:23:00 2013 -0700
    90.3 @@ -23,7 +23,7 @@
    90.4  
    90.5  /*
    90.6   * @test
    90.7 - * @bug      4663254
    90.8 + * @bug      4663254 8016328
    90.9   * @summary  Verify that spaces do not appear in hrefs and anchors.
   90.10   * @author   jamieh
   90.11   * @library  ../lib/
   90.12 @@ -46,11 +46,11 @@
   90.13      private static final String[][] TEST = {
   90.14          //External link.
   90.15          {BUG_ID + FS + "pkg" + FS + "C1.html",
   90.16 -            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)\""
   90.17 +            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\""
   90.18          },
   90.19          //Member summary table link.
   90.20          {BUG_ID + FS + "pkg" + FS + "C1.html",
   90.21 -            "href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\""
   90.22 +            "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\""
   90.23          },
   90.24          //Anchor test.
   90.25          {BUG_ID + FS + "pkg" + FS + "C1.html",
   90.26 @@ -66,11 +66,11 @@
   90.27          },
   90.28          //{@link} test.
   90.29          {BUG_ID + FS + "pkg" + FS + "C2.html",
   90.30 -            "Link: <a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
   90.31 +            "Link: <a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
   90.32          },
   90.33          //@see test.
   90.34          {BUG_ID + FS + "pkg" + FS + "C2.html",
   90.35 -            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
   90.36 +            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
   90.37          },
   90.38  
   90.39          //Header does not link to the page itself.
    91.1 --- a/test/com/sun/javadoc/testJavascript/TestJavascript.java	Thu Sep 26 10:43:55 2013 -0700
    91.2 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java	Thu Sep 26 17:23:00 2013 -0700
    91.3 @@ -23,7 +23,7 @@
    91.4  
    91.5  /*
    91.6   * @test
    91.7 - * @bug      4665566 4855876 7025314 8012375 8015997
    91.8 + * @bug      4665566 4855876 7025314 8012375 8015997 8016328
    91.9   * @summary  Verify that the output has the right javascript.
   91.10   * @author   jamieh
   91.11   * @library  ../lib/
   91.12 @@ -56,6 +56,12 @@
   91.13              "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + NL +
   91.14              "        targetPage = \"undefined\";" + NL +
   91.15              "    function validURL(url) {" + NL +
   91.16 +            "        try {" + NL +
   91.17 +            "            url = decodeURIComponent(url);" + NL +
   91.18 +            "        }" + NL +
   91.19 +            "        catch (error) {" + NL +
   91.20 +            "            return false;" + NL +
   91.21 +            "        }" + NL +
   91.22              "        var pos = url.indexOf(\".html\");" + NL +
   91.23              "        if (pos == -1 || pos != url.length - 5)" + NL +
   91.24              "            return false;" + NL +
   91.25 @@ -67,7 +73,8 @@
   91.26              "            if ('a' <= ch && ch <= 'z' ||" + NL +
   91.27              "                    'A' <= ch && ch <= 'Z' ||" + NL +
   91.28              "                    ch == '$' ||" + NL +
   91.29 -            "                    ch == '_') {" + NL +
   91.30 +            "                    ch == '_' ||" + NL +
   91.31 +            "                    ch.charCodeAt(0) > 127) {" + NL +
   91.32              "                allowNumber = true;" + NL +
   91.33              "                allowSep = true;" + NL +
   91.34              "            } else if ('0' <= ch && ch <= '9'" + NL +
    92.1 --- a/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Thu Sep 26 10:43:55 2013 -0700
    92.2 +++ b/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Thu Sep 26 17:23:00 2013 -0700
    92.3 @@ -23,7 +23,7 @@
    92.4  
    92.5  /*
    92.6   * @test
    92.7 - * @bug      4732864 6280605 7064544 8014636
    92.8 + * @bug      4732864 6280605 7064544 8014636 8016328
    92.9   * @summary  Make sure that you can link from one member to another using
   92.10   *           non-qualified name, furthermore, ensure the right one is linked.
   92.11   * @author   jamieh
   92.12 @@ -49,9 +49,9 @@
   92.13              "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
   92.14              " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
   92.15              " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
   92.16 -            " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>" + NL +
   92.17 -            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
   92.18 -            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
   92.19 +            " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>" + NL +
   92.20 +            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
   92.21 +            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
   92.22          },
   92.23          {BUG_ID + FS + "pkg" + FS + "C.InnerC.html",
   92.24              "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>" + NL +
    93.1 --- a/test/com/sun/javadoc/testMethodTypes/TestMethodTypes.java	Thu Sep 26 10:43:55 2013 -0700
    93.2 +++ b/test/com/sun/javadoc/testMethodTypes/TestMethodTypes.java	Thu Sep 26 17:23:00 2013 -0700
    93.3 @@ -1,5 +1,5 @@
    93.4  /*
    93.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    93.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    93.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    93.8   *
    93.9   * This code is free software; you can redistribute it and/or modify it
   93.10 @@ -23,7 +23,7 @@
   93.11  
   93.12  /*
   93.13   * @test
   93.14 - * @bug      8002304
   93.15 + * @bug      8002304 8024096
   93.16   * @summary  Test for various method types in the method summary table
   93.17   * @author   Bhavesh Patel
   93.18   * @library  ../lib/
   93.19 @@ -107,7 +107,7 @@
   93.20              "</caption>"
   93.21          },
   93.22  
   93.23 -        {BUG_ID + FS + "pkg" + FS + "D.html",
   93.24 +        {BUG_ID + FS + "pkg1" + FS + "D.html",
   93.25              "<caption><span>Methods</span><span class=\"tabEnd\">&nbsp;</span>" +
   93.26              "</caption>"
   93.27          },
    94.1 --- a/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Sep 26 10:43:55 2013 -0700
    94.2 +++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Sep 26 17:23:00 2013 -0700
    94.3 @@ -155,13 +155,13 @@
    94.4              //=================================
    94.5              //Make sure the summary links are correct.
    94.6              {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
    94.7 -                "<li>Summary:&nbsp;</li>" + NL +
    94.8 +                "<li>Summary:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>" + NL +
    94.9                  "<li><a href=\"#annotation_type_required_element_summary\">" +
   94.10                  "Required</a>&nbsp;|&nbsp;</li>" + NL + "<li>" +
   94.11                  "<a href=\"#annotation_type_optional_element_summary\">Optional</a></li>"},
   94.12              //Make sure the detail links are correct.
   94.13              {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
   94.14 -                "<li>Detail:&nbsp;</li>" + NL +
   94.15 +                "<li>Detail:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>" + NL +
   94.16                  "<li><a href=\"#annotation_type_element_detail\">Element</a></li>"},
   94.17              //Make sure the heading is correct.
   94.18              {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
    95.1 --- a/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Thu Sep 26 10:43:55 2013 -0700
    95.2 +++ b/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Thu Sep 26 17:23:00 2013 -0700
    95.3 @@ -23,7 +23,7 @@
    95.4  
    95.5  /*
    95.6   * @test
    95.7 - * @bug      4780441 4874845 4978816 8014017
    95.8 + * @bug      4780441 4874845 4978816 8014017 8016328
    95.9   * @summary  Make sure that when the -private flag is not used, members
   95.10   *           inherited from package private class are documented in the child.
   95.11   *
   95.12 @@ -177,7 +177,7 @@
   95.13          // Should document that a method overrides method from private class.
   95.14         {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
   95.15              "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
   95.16 -            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[], int, T, V, java.util.List)\">" +
   95.17 +            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[],%20int,%20T,%20V,%20java.util.List)\">" +
   95.18              "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" +
   95.19              "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
   95.20              "PrivateParent</a></code></dd>"},
    96.1 --- a/test/com/sun/javadoc/testProfiles/TestProfiles.java	Thu Sep 26 10:43:55 2013 -0700
    96.2 +++ b/test/com/sun/javadoc/testProfiles/TestProfiles.java	Thu Sep 26 17:23:00 2013 -0700
    96.3 @@ -23,7 +23,7 @@
    96.4  
    96.5  /*
    96.6   * @test
    96.7 - * @bug      8006124 8009684 8016921 8023700
    96.8 + * @bug      8006124 8009684 8016921 8023700 8024096
    96.9   * @summary  Test javadoc support for profiles.
   96.10   * @author   Bhavesh Patel, Evgeniya Stepanova
   96.11   * @library  ../lib/
   96.12 @@ -187,26 +187,6 @@
   96.13          }
   96.14      };
   96.15      private static final String[][] PACKAGES_NEGATED_TEST = {
   96.16 -        {PACKAGE_BUG_ID + FS + "profile-overview-frame.html",
   96.17 -            "<span><a href=\"overview-frame.html\" "
   96.18 -            + "target=\"packageListFrame\">All&nbsp;Packages</a></span>"
   96.19 -        },
   96.20 -        {PACKAGE_BUG_ID + FS + "compact2-frame.html",
   96.21 -            "<span><a href=\"overview-frame.html\" target=\"packageListFrame\">"
   96.22 -            + "All&nbsp;Packages</a></span><span><a href=\"profile-overview-frame.html\" "
   96.23 -            + "target=\"packageListFrame\">All&nbsp;Profiles</a></span>"
   96.24 -        },
   96.25 -        {PACKAGE_BUG_ID + FS + "pkg2" + FS + "compact2-package-frame.html",
   96.26 -            "<a href=\"../compact2-summary.html\" target=\"classFrame\">"
   96.27 -            + "compact2</a> - <a href=\"../pkg2/compact2-package-summary.html\" "
   96.28 -            + "target=\"classFrame\">pkg2</a>"
   96.29 -        },
   96.30 -        {PACKAGE_BUG_ID + FS + "compact2-summary.html",
   96.31 -            "<h1 title=\"Profile\" class=\"title\">Profile&nbsp;compact2</h1>"
   96.32 -        },
   96.33 -        {PACKAGE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html",
   96.34 -            "<div class=\"subTitle\">compact3</div>"
   96.35 -        },
   96.36          {PACKAGE_BUG_ID + FS + "overview-frame.html",
   96.37              "<span><a href=\"profile-overview-frame.html\" "
   96.38              + "target=\"packageListFrame\">All&nbsp;Profiles</a></span>"
   96.39 @@ -222,6 +202,13 @@
   96.40              "</ul>"
   96.41          }
   96.42      };
   96.43 +    private static final String[] PACKAGES_NEGATED_FILE_TEST = {
   96.44 +        PACKAGE_BUG_ID + FS + "profile-overview-frame.html",
   96.45 +        PACKAGE_BUG_ID + FS + "compact2-frame.html",
   96.46 +        PACKAGE_BUG_ID + FS + "pkg2" + FS + "compact2-package-frame.html",
   96.47 +        PACKAGE_BUG_ID + FS + "compact2-summary.html",
   96.48 +        PACKAGE_BUG_ID + FS + "pkg5" + FS + "compact3-package-summary.html"
   96.49 +    };
   96.50  
   96.51      /**
   96.52       * The entry point of the test.
   96.53 @@ -231,7 +218,7 @@
   96.54      public static void main(String[] args) {
   96.55          TestProfiles tester = new TestProfiles();
   96.56          run(tester, ARGS1, PROFILES_TEST, PROFILES_NEGATED_TEST);
   96.57 -        run(tester, ARGS2, PACKAGES_TEST, PACKAGES_NEGATED_TEST);
   96.58 +        run(tester, ARGS2, PACKAGES_TEST, PACKAGES_NEGATED_TEST, NO_FILE_TEST, PACKAGES_NEGATED_FILE_TEST);
   96.59          tester.printSummary();
   96.60      }
   96.61  
    97.1 --- a/test/com/sun/javadoc/testUseOption/TestUseOption.java	Thu Sep 26 10:43:55 2013 -0700
    97.2 +++ b/test/com/sun/javadoc/testUseOption/TestUseOption.java	Thu Sep 26 17:23:00 2013 -0700
    97.3 @@ -1,5 +1,5 @@
    97.4  /*
    97.5 - * Copyright (c) 2002, 2012, Oracle and/or its affiliates. All rights reserved.
    97.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    97.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    97.8   *
    97.9   * This code is free software; you can redistribute it and/or modify it
   97.10 @@ -23,7 +23,7 @@
   97.11  
   97.12  /*
   97.13   * @test
   97.14 - * @bug 4496290 4985072 7006178 7068595
   97.15 + * @bug 4496290 4985072 7006178 7068595 8016328
   97.16   * @summary A simple test to determine if -use works.
   97.17   * @author jamieh
   97.18   * @library ../lib/
   97.19 @@ -60,7 +60,7 @@
   97.20                   "UsedInC</a> in <a href=\"../package-summary.html\">&lt;Unnamed&gt;</a>"
   97.21          },
   97.22          {BUG_ID + "-3" + FS + "package-use.html", "<td class=\"colOne\">" +
   97.23 -                 "<a href=\"class-use/UsedInC.html#&lt;Unnamed&gt;\">UsedInC</a>&nbsp;</td>"
   97.24 +                 "<a href=\"class-use/UsedInC.html#%3CUnnamed%3E\">UsedInC</a>&nbsp;</td>"
   97.25          }
   97.26      };
   97.27  
    98.1 --- a/test/com/sun/javadoc/testValueTag/TestValueTag.java	Thu Sep 26 10:43:55 2013 -0700
    98.2 +++ b/test/com/sun/javadoc/testValueTag/TestValueTag.java	Thu Sep 26 17:23:00 2013 -0700
    98.3 @@ -23,13 +23,12 @@
    98.4  
    98.5  /*
    98.6   * @test
    98.7 - * @bug      4764045
    98.8 + * @bug      4764045 8004825
    98.9   * @summary  This test ensures that the value tag works in all
   98.10   * use cases. The explainations for each test case are written below.
   98.11   * @author   jamieh
   98.12   * @library  ../lib/
   98.13 - * @build    JavadocTester
   98.14 - * @build    TestValueTag
   98.15 + * @build    JavadocTester TestValueTag
   98.16   * @run main TestValueTag
   98.17   */
   98.18  
   98.19 @@ -41,8 +40,14 @@
   98.20      //Javadoc arguments.
   98.21      private static final String[] ARGS =
   98.22          new String[] {
   98.23 +            "-d", BUG_ID, "-sourcepath", SRC_DIR, "-tag",
   98.24 +            "todo", "pkg1", "pkg2"
   98.25 +        };
   98.26 +
   98.27 +    private static final String[] ARGS1 =
   98.28 +        new String[] {
   98.29              "-Xdoclint:none",
   98.30 -            "-d", BUG_ID, "-sourcepath", SRC_DIR, "-tag",
   98.31 +            "-d", BUG_ID + "-1", "-sourcepath", SRC_DIR, "-tag",
   98.32              "todo", "pkg1", "pkg2"
   98.33          };
   98.34  
   98.35 @@ -91,16 +96,58 @@
   98.36          {BUG_ID + FS + "pkg1" + FS + "CustomTagUsage.html",
   98.37              "<dt><span class=\"strong\">Todo:</span></dt>" + NL +
   98.38                  "<dd>the value of this constant is 55.</dd>"},
   98.39 +        //Test @value errors printed dues to invalid use or when used with
   98.40 +        //non-constant or with bad references.
   98.41 +        {ERROR_OUTPUT,"error: value does not refer to a constant" + NL +
   98.42 +            "     * Result:  {@value TEST_12_ERROR}"
   98.43 +        },
   98.44 +        {ERROR_OUTPUT,"error: {@value} not allowed here" + NL +
   98.45 +            "     * Result:  {@value}"
   98.46 +        },
   98.47 +        {ERROR_OUTPUT,"error: value does not refer to a constant" + NL +
   98.48 +            "     * Result:  {@value NULL}"
   98.49 +        },
   98.50 +        {ERROR_OUTPUT,"error: {@value} not allowed here" + NL +
   98.51 +            "     * Invalid (null): {@value}"
   98.52 +        },
   98.53 +        {ERROR_OUTPUT,"error: {@value} not allowed here" + NL +
   98.54 +            "     * Invalid (non-constant field): {@value}"
   98.55 +        },
   98.56 +        {ERROR_OUTPUT,"error: value does not refer to a constant" + NL +
   98.57 +            "     * Here is a bad value reference: {@value UnknownClass#unknownConstant}"
   98.58 +        },
   98.59 +        {ERROR_OUTPUT,"error: reference not found" + NL +
   98.60 +            "     * Here is a bad value reference: {@value UnknownClass#unknownConstant}"
   98.61 +        },
   98.62 +        {ERROR_OUTPUT,"error: {@value} not allowed here" + NL +
   98.63 +            "     * @todo the value of this constant is {@value}"
   98.64 +        }
   98.65 +    };
   98.66 +    private static final String[][] TEST1 = {
   98.67          //Test @value warning printed when used with non-constant.
   98.68          {WARNING_OUTPUT,"warning - @value tag (which references nonConstant) " +
   98.69              "can only be used in constants."
   98.70          },
   98.71 +        {WARNING_OUTPUT,"warning - @value tag (which references NULL) " +
   98.72 +            "can only be used in constants."
   98.73 +        },
   98.74 +        {WARNING_OUTPUT,"warning - @value tag (which references TEST_12_ERROR) " +
   98.75 +            "can only be used in constants."
   98.76 +        },
   98.77          //Test warning printed for bad reference.
   98.78          {WARNING_OUTPUT,"warning - UnknownClass#unknownConstant (referenced by " +
   98.79              "@value tag) is an unknown reference."
   98.80          },
   98.81 +        //Test warning printed for invalid use of @value.
   98.82 +        {WARNING_OUTPUT,"warning - @value tag cannot be used here."
   98.83 +        }
   98.84      };
   98.85 -    private static final String[][] NEGATED_TEST = NO_TEST;
   98.86 +    private static final String[][] NEGATED_TEST = {
   98.87 +        //Base case:  using @value on a constant.
   98.88 +        {BUG_ID + FS + "pkg1" + FS + "Class1.html",
   98.89 +            "Result:  <a href=\"../pkg1/Class1.html#TEST_12_ERROR\">\"Test 12 " +
   98.90 +            "generates an error message\"</a>"},
   98.91 +    };
   98.92  
   98.93      /**
   98.94       * The entry point of the test.
   98.95 @@ -109,9 +156,18 @@
   98.96      public static void main(String[] args) {
   98.97          TestValueTag tester = new TestValueTag();
   98.98          run(tester, ARGS, TEST, NEGATED_TEST);
   98.99 +        checkForException(tester);
  98.100 +        run(tester, ARGS1, TEST1, NO_TEST);
  98.101 +        checkForException(tester);
  98.102          tester.printSummary();
  98.103      }
  98.104  
  98.105 +    public static void checkForException(TestValueTag tester) {
  98.106 +        if (tester.getErrorOutput().contains("DocletAbortException")) {
  98.107 +            throw new AssertionError("javadoc threw DocletAbortException");
  98.108 +        }
  98.109 +    }
  98.110 +
  98.111      /**
  98.112       * {@inheritDoc}
  98.113       */
    99.1 --- a/test/com/sun/javadoc/testValueTag/pkg1/Class1.java	Thu Sep 26 10:43:55 2013 -0700
    99.2 +++ b/test/com/sun/javadoc/testValueTag/pkg1/Class1.java	Thu Sep 26 17:23:00 2013 -0700
    99.3 @@ -1,5 +1,5 @@
    99.4  /*
    99.5 - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
    99.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    99.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    99.8   *
    99.9   * This code is free software; you can redistribute it and/or modify it
   99.10 @@ -45,6 +45,16 @@
   99.11      public static final String TEST_11_PASSES = "Test 11 passes";
   99.12  
   99.13      /**
   99.14 +     * Invalid (non-constant field): {@value}
   99.15 +     */
   99.16 +    public static String TEST_12_ERROR = "Test 12 generates an error message";
   99.17 +
   99.18 +    /**
   99.19 +     * Invalid (null): {@value}
   99.20 +     */
   99.21 +    public static final String NULL = null;
   99.22 +
   99.23 +    /**
   99.24       * Result:  {@value TEST_3_PASSES}
   99.25       */
   99.26      public int field;
   99.27 @@ -60,6 +70,21 @@
   99.28      public void method() {}
   99.29  
   99.30      /**
   99.31 +     * Result:  {@value TEST_12_ERROR}
   99.32 +     */
   99.33 +    public void invalidValueTag1() {}
   99.34 +
   99.35 +    /**
   99.36 +     * Result:  {@value}
   99.37 +     */
   99.38 +    public void invalidValueTag2() {}
   99.39 +
   99.40 +    /**
   99.41 +     * Result:  {@value NULL}
   99.42 +     */
   99.43 +    public void testNullConstant() {}
   99.44 +
   99.45 +    /**
   99.46       * Result:  {@value pkg1.Class1#TEST_6_PASSES}
   99.47       */
   99.48      public class NestedClass{}
   100.1 --- a/test/tools/doclint/ReferenceTest.java	Thu Sep 26 10:43:55 2013 -0700
   100.2 +++ b/test/tools/doclint/ReferenceTest.java	Thu Sep 26 17:23:00 2013 -0700
   100.3 @@ -1,6 +1,6 @@
   100.4  /*
   100.5   * @test /nodynamiccopyright/
   100.6 - * @bug 8004832 8020556
   100.7 + * @bug 8004832 8020556 8002154
   100.8   * @summary Add new doclint package
   100.9   * @build DocLintTester
  100.10   * @run main DocLintTester -Xmsgs:-reference ReferenceTest.java
  100.11 @@ -54,5 +54,13 @@
  100.12       * @throws T description
  100.13       */
  100.14      public <T extends Throwable> void valid_throws_generic() throws T { }
  100.15 +
  100.16 +    /**
  100.17 +     * {@link java.util.List<String>}
  100.18 +     * {@link java.util.List<String>#equals}
  100.19 +     * @see java.util.List<String>
  100.20 +     * @see java.util.List<String>#equals
  100.21 +     */
  100.22 +    public void invalid_type_args() { }
  100.23  }
  100.24  
   101.1 --- a/test/tools/doclint/ReferenceTest.out	Thu Sep 26 10:43:55 2013 -0700
   101.2 +++ b/test/tools/doclint/ReferenceTest.out	Thu Sep 26 17:23:00 2013 -0700
   101.3 @@ -25,6 +25,18 @@
   101.4  ReferenceTest.java:48: error: exception not thrown: java.lang.Exception
   101.5       * @throws Exception description
   101.6                 ^
   101.7 -8 errors
   101.8 +ReferenceTest.java:59: error: type arguments not allowed here
   101.9 +     * {@link java.util.List<String>}
  101.10 +              ^
  101.11 +ReferenceTest.java:60: error: type arguments not allowed here
  101.12 +     * {@link java.util.List<String>#equals}
  101.13 +              ^
  101.14 +ReferenceTest.java:61: error: type arguments not allowed here
  101.15 +     * @see java.util.List<String>
  101.16 +            ^
  101.17 +ReferenceTest.java:62: error: type arguments not allowed here
  101.18 +     * @see java.util.List<String>#equals
  101.19 +            ^
  101.20 +12 errors
  101.21  1 warning
  101.22  
   102.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   102.2 +++ b/test/tools/doclint/ValueTest.java	Thu Sep 26 17:23:00 2013 -0700
   102.3 @@ -0,0 +1,67 @@
   102.4 +/*
   102.5 + * @test /nodynamiccopyright/
   102.6 + * @bug 8025272
   102.7 + * @summary doclint needs to check for valid usage of at-value tag
   102.8 + * @build DocLintTester
   102.9 + * @run main DocLintTester -ref ValueTest.out ValueTest.java
  102.10 + */
  102.11 +
  102.12 +/** */
  102.13 +public class ValueTest {
  102.14 +    /*
  102.15 +     * Tests for {@value} without a reference
  102.16 +     */
  102.17 +
  102.18 +    /** valid: {@value} */
  102.19 +    public static final boolean cBoolean = false;
  102.20 +
  102.21 +    /** valid: {@value} */
  102.22 +    public static final byte cByte = 0;
  102.23 +
  102.24 +    /** valid: {@value} */
  102.25 +    public static final short cShort = 0;
  102.26 +
  102.27 +    /** valid: {@value} */
  102.28 +    public static final int cInt = 0;
  102.29 +
  102.30 +    /** valid: {@value} */
  102.31 +    public static final long cLong = 0L;
  102.32 +
  102.33 +    /** valid: {@value} */
  102.34 +    public static final float cFloat = 0.0f;
  102.35 +
  102.36 +    /** valid: {@value} */
  102.37 +    public static final double cDouble = 0.0;
  102.38 +
  102.39 +    /** valid: {@value} */
  102.40 +    public static final String cString = "";
  102.41 +
  102.42 +    /** invalid class C: {@value} */
  102.43 +    public class C { }
  102.44 +
  102.45 +    /** invalid enum E: {@value} */
  102.46 +    public enum E {
  102.47 +        /** invalid enum constant E1: {@value} */
  102.48 +        E1
  102.49 +    }
  102.50 +
  102.51 +    /** invalid field 1: {@value} */
  102.52 +    public int f1;
  102.53 +
  102.54 +    /** invalid field 2: {@value} */
  102.55 +    public int f2 = 3;
  102.56 +
  102.57 +
  102.58 +    /*
  102.59 +     * Tests for {@value} with a reference
  102.60 +     */
  102.61 +
  102.62 +    /** valid: {@value Integer#SIZE} */
  102.63 +    public int intRef;
  102.64 +
  102.65 +    /** invalid method: {@value Object#toString} */
  102.66 +    public int badMethod;
  102.67 +
  102.68 +    /** invalid enum constant: {@value Thread.State#NEW} */
  102.69 +    public int badEnum;
  102.70 +}
   103.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   103.2 +++ b/test/tools/doclint/ValueTest.out	Thu Sep 26 17:23:00 2013 -0700
   103.3 @@ -0,0 +1,22 @@
   103.4 +ValueTest.java:39: error: {@value} not allowed here
   103.5 +    /** invalid class C: {@value} */
   103.6 +                         ^
   103.7 +ValueTest.java:42: error: {@value} not allowed here
   103.8 +    /** invalid enum E: {@value} */
   103.9 +                        ^
  103.10 +ValueTest.java:44: error: {@value} not allowed here
  103.11 +        /** invalid enum constant E1: {@value} */
  103.12 +                                      ^
  103.13 +ValueTest.java:48: error: {@value} not allowed here
  103.14 +    /** invalid field 1: {@value} */
  103.15 +                         ^
  103.16 +ValueTest.java:51: error: {@value} not allowed here
  103.17 +    /** invalid field 2: {@value} */
  103.18 +                         ^
  103.19 +ValueTest.java:62: error: value does not refer to a constant
  103.20 +    /** invalid method: {@value Object#toString} */
  103.21 +                        ^
  103.22 +ValueTest.java:65: error: value does not refer to a constant
  103.23 +    /** invalid enum constant: {@value Thread.State#NEW} */
  103.24 +                               ^
  103.25 +7 errors
   104.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   104.2 +++ b/test/tools/doclint/anchorTests/p/Test.java	Thu Sep 26 17:23:00 2013 -0700
   104.3 @@ -0,0 +1,53 @@
   104.4 +/* @test /nodynamiccopyright/
   104.5 + * @bug 8025246
   104.6 + * @summary doclint is showing error on anchor already defined when it's not
   104.7 + * @library ../..
   104.8 + * @build DocLintTester
   104.9 + * @run main DocLintTester -ref Test.out Test.java
  104.10 + * @compile/fail/ref=Test.javac.out -XDrawDiagnostics -Werror -Xdoclint:all Test.java
  104.11 + */
  104.12 +
  104.13 +package p;
  104.14 +
  104.15 +/**
  104.16 + * <a name="dupTest">dupTest</a>
  104.17 + * <a name="dupTest">dupTest again</a>
  104.18 + *
  104.19 + * <a name="dupTestField">dupTestField</a>
  104.20 + * <a name="dupTestMethod">dupTestMethod</a>
  104.21 +
  104.22 + * <a name="okClass">okClass</a>
  104.23 + * <a name="okField">okField</a>
  104.24 + * <a name="okMethod">okMethod</a>
  104.25 + */
  104.26 +public class Test {
  104.27 +    /** <a name="dupTestField">dupTestField again</a> */
  104.28 +    public int f;
  104.29 +
  104.30 +    /** <a name="dupTestMethod">dupTestMethod again</a> */
  104.31 +    public void m() { }
  104.32 +
  104.33 +    /**
  104.34 +     * <a name="dupNested">dupNested</a>
  104.35 +     * <a name="dupNested">dupNested again</a>
  104.36 +     * <a name="dupNestedField">dupNestedField</a>
  104.37 +     * <a name="dupNestedMethod">dupNestedMethod</a>
  104.38 +     *
  104.39 +     * <a name="okClass">okClass again</a>
  104.40 +     */
  104.41 +    public class Nested {
  104.42 +        /**
  104.43 +         * <a name="dupNestedField">dupNestedField</a>
  104.44 +         *
  104.45 +         * <a name="okField">okField again</a>
  104.46 +         */
  104.47 +        public int f;
  104.48 +
  104.49 +        /**
  104.50 +         * <a name="dupNestedMethod">dupNestedMethod</a>
  104.51 +         *
  104.52 +         * <a name="okMethod">okMethod again</a>
  104.53 +         */
  104.54 +        public void m() { }
  104.55 +    }
  104.56 +}
   105.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   105.2 +++ b/test/tools/doclint/anchorTests/p/Test.javac.out	Thu Sep 26 17:23:00 2013 -0700
   105.3 @@ -0,0 +1,7 @@
   105.4 +Test.java:14:7: compiler.err.proc.messager: anchor already defined: dupTest
   105.5 +Test.java:24:12: compiler.err.proc.messager: anchor already defined: dupTestField
   105.6 +Test.java:27:12: compiler.err.proc.messager: anchor already defined: dupTestMethod
   105.7 +Test.java:32:11: compiler.err.proc.messager: anchor already defined: dupNested
   105.8 +Test.java:40:15: compiler.err.proc.messager: anchor already defined: dupNestedField
   105.9 +Test.java:47:15: compiler.err.proc.messager: anchor already defined: dupNestedMethod
  105.10 +6 errors
   106.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   106.2 +++ b/test/tools/doclint/anchorTests/p/Test.out	Thu Sep 26 17:23:00 2013 -0700
   106.3 @@ -0,0 +1,19 @@
   106.4 +Test.java:14: error: anchor already defined: dupTest
   106.5 + * <a name="dupTest">dupTest again</a>
   106.6 +      ^
   106.7 +Test.java:24: error: anchor already defined: dupTestField
   106.8 +    /** <a name="dupTestField">dupTestField again</a> */
   106.9 +           ^
  106.10 +Test.java:27: error: anchor already defined: dupTestMethod
  106.11 +    /** <a name="dupTestMethod">dupTestMethod again</a> */
  106.12 +           ^
  106.13 +Test.java:32: error: anchor already defined: dupNested
  106.14 +     * <a name="dupNested">dupNested again</a>
  106.15 +          ^
  106.16 +Test.java:40: error: anchor already defined: dupNestedField
  106.17 +         * <a name="dupNestedField">dupNestedField</a>
  106.18 +              ^
  106.19 +Test.java:47: error: anchor already defined: dupNestedMethod
  106.20 +         * <a name="dupNestedMethod">dupNestedMethod</a>
  106.21 +              ^
  106.22 +6 errors
   107.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   107.2 +++ b/test/tools/doclint/anchorTests/p/package-info.java	Thu Sep 26 17:23:00 2013 -0700
   107.3 @@ -0,0 +1,15 @@
   107.4 +/* @test /nodynamiccopyright/
   107.5 + * @bug 8025246
   107.6 + * @summary doclint is showing error on anchor already defined when it's not
   107.7 + * @library ../..
   107.8 + * @build DocLintTester
   107.9 + * @run main DocLintTester -ref package-info.out package-info.java
  107.10 + * @compile/fail/ref=package-info.javac.out -XDrawDiagnostics -Werror -Xdoclint:all package-info.java
  107.11 + */
  107.12 +
  107.13 +/**
  107.14 + * <a name=here>here</a>
  107.15 + * <a name=here>here again</a>
  107.16 + */
  107.17 +package p;
  107.18 +
   108.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   108.2 +++ b/test/tools/doclint/anchorTests/p/package-info.javac.out	Thu Sep 26 17:23:00 2013 -0700
   108.3 @@ -0,0 +1,2 @@
   108.4 +package-info.java:12:7: compiler.err.proc.messager: anchor already defined: here
   108.5 +1 error
   109.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   109.2 +++ b/test/tools/doclint/anchorTests/p/package-info.out	Thu Sep 26 17:23:00 2013 -0700
   109.3 @@ -0,0 +1,4 @@
   109.4 +package-info.java:12: error: anchor already defined: here
   109.5 + * <a name=here>here again</a>
   109.6 +      ^
   109.7 +1 error
   110.1 --- a/test/tools/doclint/html/InlineTagsTest.java	Thu Sep 26 10:43:55 2013 -0700
   110.2 +++ b/test/tools/doclint/html/InlineTagsTest.java	Thu Sep 26 17:23:00 2013 -0700
   110.3 @@ -39,6 +39,7 @@
   110.4       *  <br>
   110.5       *  <cite> abc </cite>
   110.6       *  <code> abc </code>
   110.7 +     *  <dfn> abc </dfn>
   110.8       *  <em> abc </em>
   110.9       *  <font> abc </font>
  110.10       *  <i> abc </i>
   111.1 --- a/test/tools/doclint/tidy/util/Main.java	Thu Sep 26 10:43:55 2013 -0700
   111.2 +++ b/test/tools/doclint/tidy/util/Main.java	Thu Sep 26 17:23:00 2013 -0700
   111.3 @@ -1,3 +1,27 @@
   111.4 +/*
   111.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   111.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   111.7 + *
   111.8 + * This code is free software; you can redistribute it and/or modify it
   111.9 + * under the terms of the GNU General Public License version 2 only, as
  111.10 + * published by the Free Software Foundation.
  111.11 + *
  111.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  111.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  111.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  111.15 + * version 2 for more details (a copy is included in the LICENSE file that
  111.16 + * accompanied this code).
  111.17 + *
  111.18 + * You should have received a copy of the GNU General Public License version
  111.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  111.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  111.21 + *
  111.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  111.23 + * or visit www.oracle.com if you need additional information or have any
  111.24 + * questions.
  111.25 + */
  111.26 +
  111.27 +
  111.28  package tidystats;
  111.29  
  111.30  import java.io.IOException;
  111.31 @@ -17,6 +41,35 @@
  111.32  import java.util.regex.Matcher;
  111.33  import java.util.regex.Pattern;
  111.34  
  111.35 +/**
  111.36 + * Generate statistics from the files generated by tidy.sh.
  111.37 + *
  111.38 + * <p>The tidy.sh script is used to run tidy on all the HTML files
  111.39 + * in a directory, creating files in a new directory, and for each
  111.40 + * HTML file, it writes the console output from tidy into a file
  111.41 + * beside the fixed up file, with an additional .tidy extension.
  111.42 + *
  111.43 + * <p>This program will scan a directory for *.tidy files and
  111.44 + * analyze the messages reported by tidy, in order to generate a
  111.45 + * report with statistics on the various messages that were
  111.46 + * reported by tidy.
  111.47 + *
  111.48 + * <p>Typical usage:
  111.49 + * <pre>
  111.50 + * $ bash /path/to/tidy.sh /path/to/htmldir
  111.51 + * $ javac -d /path/to/classes /path/to/Main.java
  111.52 + * $ java -cp /path/to/classes tidystats.Main /path/to/htmldir.tidy
  111.53 + * </pre>
  111.54 + *
  111.55 + * <p>Internally, the program works by matching lines in the *.tidy
  111.56 + * files against a series of regular expressions that are used to
  111.57 + * categorize the messages.  The set of regular expressions was
  111.58 + * empirically determined by running the program on the output from
  111.59 + * running tidy.sh on all the generated JDK documentation. It is
  111.60 + * possible that tidy may generate more/different messages on other
  111.61 + * doc sets, in which case, the set of regexes in the program should
  111.62 + * be updated.
  111.63 + */
  111.64  public class Main {
  111.65      public static void main(String... args) throws IOException {
  111.66          new Main().run(args);
   112.1 --- a/test/tools/doclint/tidy/util/tidy.sh	Thu Sep 26 10:43:55 2013 -0700
   112.2 +++ b/test/tools/doclint/tidy/util/tidy.sh	Thu Sep 26 17:23:00 2013 -0700
   112.3 @@ -1,6 +1,6 @@
   112.4 -#!/bin/sh
   112.5 +#!/bin/bash
   112.6  #
   112.7 -# Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
   112.8 +# Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   112.9  # DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  112.10  #
  112.11  # This code is free software; you can redistribute it and/or modify it
  112.12 @@ -23,6 +23,7 @@
  112.13  #
  112.14  
  112.15  # Run the "tidy" program over the files in a directory.
  112.16 +# The "tidy" program must be on your PATH.
  112.17  #
  112.18  # Usage:
  112.19  #   sh tidy.sh <dir>
   113.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   113.2 +++ b/test/tools/javac/T4881267.java	Thu Sep 26 17:23:00 2013 -0700
   113.3 @@ -0,0 +1,12 @@
   113.4 +/*
   113.5 + * @test /nodynamiccopyright/
   113.6 + * @bug 4881267
   113.7 + * @summary improve diagnostic for "instanceof T" for type parameter T
   113.8 + * @compile/fail/ref=T4881267.out -XDrawDiagnostics T4881267.java
   113.9 + */
  113.10 +
  113.11 +class T4881267 {
  113.12 +    <T> void m(Object o) {
  113.13 +        boolean b = o instanceof T;
  113.14 +    }
  113.15 +}
   114.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   114.2 +++ b/test/tools/javac/T4881267.out	Thu Sep 26 17:23:00 2013 -0700
   114.3 @@ -0,0 +1,2 @@
   114.4 +T4881267.java:10:34: compiler.err.illegal.generic.type.for.instof
   114.5 +1 error
   115.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   115.2 +++ b/test/tools/javac/T7090499.java	Thu Sep 26 17:23:00 2013 -0700
   115.3 @@ -0,0 +1,14 @@
   115.4 +/*
   115.5 + * @test /nodynamiccopyright/
   115.6 + * @bug 7090499
   115.7 + * @summary missing rawtypes warnings in anonymous inner class
   115.8 + * @compile/ref=T7090499.out -Xlint:rawtypes -XDrawDiagnostics T7090499.java
   115.9 + */
  115.10 +
  115.11 +class T7090499<X> {
  115.12 +    {
  115.13 +        new Object() {
  115.14 +            T7090499 x;
  115.15 +        };
  115.16 +    }
  115.17 +}
   116.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   116.2 +++ b/test/tools/javac/T7090499.out	Thu Sep 26 17:23:00 2013 -0700
   116.3 @@ -0,0 +1,2 @@
   116.4 +T7090499.java:11:13: compiler.warn.raw.class.use: T7090499, T7090499<X>
   116.5 +1 warning
   117.1 --- a/test/tools/javac/T7093325.java	Thu Sep 26 10:43:55 2013 -0700
   117.2 +++ b/test/tools/javac/T7093325.java	Thu Sep 26 17:23:00 2013 -0700
   117.3 @@ -208,7 +208,7 @@
   117.4              }
   117.5  
   117.6              int actualGapsCount = 0;
   117.7 -            for (int i = 0; i < code.exception_table_langth ; i++) {
   117.8 +            for (int i = 0; i < code.exception_table_length ; i++) {
   117.9                  int catchType = code.exception_table[i].catch_type;
  117.10                  if (catchType == 0) { //any
  117.11                      actualGapsCount++;
   118.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   118.2 +++ b/test/tools/javac/T7120463.java	Thu Sep 26 17:23:00 2013 -0700
   118.3 @@ -0,0 +1,11 @@
   118.4 +/*
   118.5 + * @test /nodynamiccopyright/
   118.6 + * @bug 7120463
   118.7 + * @summary Fix method reference parser support in order to avoid ambiguities
   118.8 + * @compile/fail/ref=T7120463.out -XDrawDiagnostics T7120463.java
   118.9 + */
  118.10 +
  118.11 +class T7120463 {
  118.12 +    void test() { that(i < len, "oopmap"); }
  118.13 +    void that(int i, String s) { };
  118.14 +}
   119.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   119.2 +++ b/test/tools/javac/T7120463.out	Thu Sep 26 17:23:00 2013 -0700
   119.3 @@ -0,0 +1,3 @@
   119.4 +T7120463.java:9:24: compiler.err.cant.resolve.location: kindname.variable, i, , , (compiler.misc.location: kindname.class, T7120463, null)
   119.5 +T7120463.java:9:28: compiler.err.cant.resolve.location: kindname.variable, len, , , (compiler.misc.location: kindname.class, T7120463, null)
   119.6 +2 errors
   120.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   120.2 +++ b/test/tools/javac/T7126754.java	Thu Sep 26 17:23:00 2013 -0700
   120.3 @@ -0,0 +1,19 @@
   120.4 +/*
   120.5 + * @test /nodynamiccopyright/
   120.6 + * @bug 7126754
   120.7 + * @summary Generics compilation failure casting List<? extends Set...> to List<Set...>
   120.8 + * @compile T7126754.java
   120.9 + */
  120.10 +
  120.11 +import java.util.List;
  120.12 +import java.util.Set;
  120.13 +
  120.14 +public class T7126754 {
  120.15 +  public static void main(String[] args) {
  120.16 +    List<Set<? extends String>> a = null;
  120.17 +    List<? extends Set<? extends String>> b = a;
  120.18 +
  120.19 +    List<? extends Set<? extends String>> c = null;
  120.20 +    List<Set<? extends String>> d = (List<Set<? extends String>>)c;
  120.21 +  }
  120.22 +}
   121.1 --- a/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java	Thu Sep 26 10:43:55 2013 -0700
   121.2 +++ b/test/tools/javac/T8024039/NoDeadCodeGenerationOnTrySmtTest.java	Thu Sep 26 17:23:00 2013 -0700
   121.3 @@ -100,7 +100,7 @@
   121.4                  if (method.getName(classFile.constant_pool).equals(methodToFind)) {
   121.5                      numberOfmethodsFound++;
   121.6                      Code_attribute code = (Code_attribute) method.attributes.get("Code");
   121.7 -                    Assert.check(code.exception_table_langth == expectedExceptionTable.length,
   121.8 +                    Assert.check(code.exception_table_length == expectedExceptionTable.length,
   121.9                              "The ExceptionTable found has a length different to the expected one");
  121.10                      int i = 0;
  121.11                      for (Exception_data entry: code.exception_table) {
   122.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   122.2 +++ b/test/tools/javac/T8024437/ExceptionInferenceFromClassFileTest.java	Thu Sep 26 17:23:00 2013 -0700
   122.3 @@ -0,0 +1,74 @@
   122.4 +/*
   122.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   122.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   122.7 + *
   122.8 + * This code is free software; you can redistribute it and/or modify it
   122.9 + * under the terms of the GNU General Public License version 2 only, as
  122.10 + * published by the Free Software Foundation.  Oracle designates this
  122.11 + * particular file as subject to the "Classpath" exception as provided
  122.12 + * by Oracle in the LICENSE file that accompanied this code.
  122.13 + *
  122.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
  122.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  122.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  122.17 + * version 2 for more details (a copy is included in the LICENSE file that
  122.18 + * accompanied this code).
  122.19 + *
  122.20 + * You should have received a copy of the GNU General Public License version
  122.21 + * 2 along with this work; if not, write to the Free Software Foundation,
  122.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  122.23 + *
  122.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  122.25 + * or visit www.oracle.com if you need additional information or have any
  122.26 + * questions.
  122.27 + */
  122.28 +
  122.29 +/*
  122.30 + * @test
  122.31 + * @bug 8024437
  122.32 + * @summary Inferring the exception thrown by a lambda: sometimes fails to compile
  122.33 + * @library /tools/javac/lib
  122.34 + * @build ToolBox
  122.35 + * @run main ExceptionInferenceFromClassFileTest
  122.36 + */
  122.37 +
  122.38 +import java.nio.file.Files;
  122.39 +import java.nio.file.Paths;
  122.40 +
  122.41 +public class ExceptionInferenceFromClassFileTest {
  122.42 +
  122.43 +    static final String ABSrc =
  122.44 +            "class B {\n" +
  122.45 +            "    public static <E extends Throwable> void t(A<E> a) throws E {\n" +
  122.46 +            "        a.run();\n" +
  122.47 +            "    }\n" +
  122.48 +            "}\n" +
  122.49 +
  122.50 +            "interface A<E extends Throwable> {\n" +
  122.51 +            "    void run() throws E;\n" +
  122.52 +            "}";
  122.53 +
  122.54 +    static final String CSrc =
  122.55 +            "class C {\n" +
  122.56 +            "    public void d() {\n" +
  122.57 +            "        B.t(null);\n" +
  122.58 +            "    }\n" +
  122.59 +            "}";
  122.60 +
  122.61 +    public static void main(String[] args) throws Exception {
  122.62 +        Files.createDirectory(Paths.get("out"));
  122.63 +
  122.64 +        ToolBox.JavaToolArgs compileABParams =
  122.65 +                new ToolBox.JavaToolArgs()
  122.66 +                .setOptions("-d", "out")
  122.67 +                .setSources(ABSrc);
  122.68 +        ToolBox.javac(compileABParams);
  122.69 +
  122.70 +        ToolBox.JavaToolArgs compileCParams =
  122.71 +                new ToolBox.JavaToolArgs()
  122.72 +                .setOptions("-d", "out", "-cp", "out")
  122.73 +                .setSources(CSrc);
  122.74 +        ToolBox.javac(compileCParams);
  122.75 +    }
  122.76 +
  122.77 +}
   123.1 --- a/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Thu Sep 26 10:43:55 2013 -0700
   123.2 +++ b/test/tools/javac/cast/intersection/IntersectionTypeCastTest.java	Thu Sep 26 17:23:00 2013 -0700
   123.3 @@ -237,7 +237,7 @@
   123.4      }
   123.5  
   123.6      static List<CastInfo> allCastInfo() {
   123.7 -        ListBuffer<CastInfo> buf = ListBuffer.lb();
   123.8 +        ListBuffer<CastInfo> buf = new ListBuffer<>();
   123.9          for (CastKind kind : CastKind.values()) {
  123.10              for (ClassKind clazz : ClassKind.values()) {
  123.11                  if (kind == CastKind.INTERFACE && clazz != ClassKind.OBJECT) {
   124.1 --- a/test/tools/javac/cast/intersection/model/Model01.java	Thu Sep 26 10:43:55 2013 -0700
   124.2 +++ b/test/tools/javac/cast/intersection/model/Model01.java	Thu Sep 26 17:23:00 2013 -0700
   124.3 @@ -23,7 +23,7 @@
   124.4  
   124.5  /*
   124.6   * @test
   124.7 - * @bug 8002099
   124.8 + * @bug 8002099 6499673
   124.9   * @summary Add support for intersection types in cast expression
  124.10   * @library /tools/javac/lib
  124.11   * @build JavacTestingAbstractProcessor ModelChecker
  124.12 @@ -46,7 +46,7 @@
  124.13      }
  124.14  
  124.15      void test(){
  124.16 -        @IntersectionTypeInfo({"java.lang.Object", "Test.A", "Test.B"})
  124.17 +        @IntersectionTypeInfo({"Test.A", "Test.B"})
  124.18          Object o = (A & B)null;
  124.19      }
  124.20  }
   125.1 --- a/test/tools/javac/cast/intersection/model/ModelChecker.java	Thu Sep 26 10:43:55 2013 -0700
   125.2 +++ b/test/tools/javac/cast/intersection/model/ModelChecker.java	Thu Sep 26 17:23:00 2013 -0700
   125.3 @@ -97,7 +97,7 @@
   125.4                  }
   125.5              }
   125.6  
   125.7 -            assertTrue(assertionCount == 10, "Expected 10 assertions - found " + assertionCount);
   125.8 +            assertTrue(assertionCount == 9, "Expected 9 assertions - found " + assertionCount);
   125.9              return super.visitVariable(node, p);
  125.10          }
  125.11      }
   126.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   126.2 +++ b/test/tools/javac/doclint/implicitSource/ImplicitSourceTest.java	Thu Sep 26 17:23:00 2013 -0700
   126.3 @@ -0,0 +1,35 @@
   126.4 +/*
   126.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   126.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   126.7 + *
   126.8 + * This code is free software; you can redistribute it and/or modify it
   126.9 + * under the terms of the GNU General Public License version 2 only, as
  126.10 + * published by the Free Software Foundation.
  126.11 + *
  126.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  126.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  126.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  126.15 + * version 2 for more details (a copy is included in the LICENSE file that
  126.16 + * accompanied this code).
  126.17 + *
  126.18 + * You should have received a copy of the GNU General Public License version
  126.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  126.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  126.21 + *
  126.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  126.23 + * or visit www.oracle.com if you need additional information or have any
  126.24 + * questions.
  126.25 + */
  126.26 +
  126.27 +/*
  126.28 + * @test
  126.29 + * @bug 8024538
  126.30 + * @summary -Xdoclint + -Xprefer:source + incremental compilation == FAIL
  126.31 + * @compile -Xdoclint -Xprefer:source ImplicitSourceTest.java
  126.32 + */
  126.33 +
  126.34 +/** ImplicitSourceTest. */
  126.35 +class ImplicitSourceTest {
  126.36 +    /** <p> {@link Other} </p> */
  126.37 +    int i;
  126.38 +}
   127.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   127.2 +++ b/test/tools/javac/doclint/implicitSource/Other.java	Thu Sep 26 17:23:00 2013 -0700
   127.3 @@ -0,0 +1,25 @@
   127.4 +/*
   127.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   127.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   127.7 + *
   127.8 + * This code is free software; you can redistribute it and/or modify it
   127.9 + * under the terms of the GNU General Public License version 2 only, as
  127.10 + * published by the Free Software Foundation.
  127.11 + *
  127.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  127.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  127.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  127.15 + * version 2 for more details (a copy is included in the LICENSE file that
  127.16 + * accompanied this code).
  127.17 + *
  127.18 + * You should have received a copy of the GNU General Public License version
  127.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  127.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  127.21 + *
  127.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  127.23 + * or visit www.oracle.com if you need additional information or have any
  127.24 + * questions.
  127.25 + */
  127.26 +
  127.27 +/** Other. */
  127.28 +class Other { }
   128.1 --- a/test/tools/javac/flow/LVTHarness.java	Thu Sep 26 10:43:55 2013 -0700
   128.2 +++ b/test/tools/javac/flow/LVTHarness.java	Thu Sep 26 17:23:00 2013 -0700
   128.3 @@ -64,6 +64,7 @@
   128.4  
   128.5  import static javax.tools.StandardLocation.*;
   128.6  import static com.sun.tools.classfile.LocalVariableTable_attribute.Entry;
   128.7 +import static javax.tools.JavaFileObject.Kind.SOURCE;
   128.8  
   128.9  public class LVTHarness {
  128.10  
  128.11 @@ -73,10 +74,14 @@
  128.12      static final StandardJavaFileManager fm = comp.getStandardFileManager(null, null, null);
  128.13  
  128.14      public static void main(String[] args) throws Exception {
  128.15 -        fm.setLocation(SOURCE_PATH,
  128.16 -                Arrays.asList(new File(System.getProperty("test.src"), "tests")));
  128.17 -        for (JavaFileObject jfo : fm.list(SOURCE_PATH, "",
  128.18 -                Collections.singleton(JavaFileObject.Kind.SOURCE), true)) {
  128.19 +
  128.20 +        String testDir = System.getProperty("test.src");
  128.21 +        fm.setLocation(SOURCE_PATH, Arrays.asList(new File(testDir, "tests")));
  128.22 +
  128.23 +        // Make sure classes are written to scratch dir.
  128.24 +        fm.setLocation(CLASS_OUTPUT, Arrays.asList(new File(".")));
  128.25 +
  128.26 +        for (JavaFileObject jfo : fm.list(SOURCE_PATH, "", Collections.singleton(SOURCE), true)) {
  128.27              new LVTHarness(jfo).check();
  128.28          }
  128.29          if (nerrors > 0) {
  128.30 @@ -86,8 +91,7 @@
  128.31  
  128.32  
  128.33      JavaFileObject jfo;
  128.34 -    Map<ElementKey, AliveRanges> aliveRangeMap =
  128.35 -            new HashMap<ElementKey, AliveRanges>();
  128.36 +    Map<ElementKey, AliveRanges> aliveRangeMap = new HashMap<>();
  128.37      Set<String> declaredKeys = new HashSet<>();
  128.38      List<ElementKey> seenAliveRanges = new ArrayList<>();
  128.39  
  128.40 @@ -96,15 +100,19 @@
  128.41      }
  128.42  
  128.43      protected void check() throws Exception {
  128.44 -        JavacTask ct = (JavacTask)comp.getTask(null, fm, null, Arrays.asList("-g"),
  128.45 -                null, Arrays.asList(jfo));
  128.46 -        System.err.println("compiling code " + jfo.toString());
  128.47 +
  128.48 +        JavacTask ct = (JavacTask) comp.getTask(null, fm, null, Arrays.asList("-g"),
  128.49 +                                                null, Arrays.asList(jfo));
  128.50 +        System.err.println("compiling code " + jfo);
  128.51          ct.setProcessors(Collections.singleton(new AliveRangeFinder()));
  128.52          if (!ct.call()) {
  128.53              throw new AssertionError("Error during compilation");
  128.54          }
  128.55  
  128.56 -        checkClassFile(new File(jfo.getName().replace(".java", ".class")));
  128.57 +
  128.58 +        File javaFile = new File(jfo.getName());
  128.59 +        File classFile = new File(javaFile.getName().replace(".java", ".class"));
  128.60 +        checkClassFile(classFile);
  128.61  
  128.62          //check all candidates have been used up
  128.63          for (Map.Entry<ElementKey, AliveRanges> entry : aliveRangeMap.entrySet()) {
   129.1 --- a/test/tools/javac/lambda/8023558/T8023558a.java	Thu Sep 26 10:43:55 2013 -0700
   129.2 +++ b/test/tools/javac/lambda/8023558/T8023558a.java	Thu Sep 26 17:23:00 2013 -0700
   129.3 @@ -31,8 +31,14 @@
   129.4          T get();
   129.5      }
   129.6  
   129.7 +    static class K<T> implements SAM<T> {
   129.8 +        public T get() {
   129.9 +            return (T)this;
  129.10 +        }
  129.11 +    }
  129.12 +
  129.13      public static void main(String[] args) {
  129.14 -        SAM<SAM> sam = new SAM<SAM>() { public SAM get() { return null; } };
  129.15 +        SAM<SAM> sam = new SAM<SAM>() { public SAM get() { return new K<>(); } };
  129.16          SAM temp = sam.get()::get;
  129.17      }
  129.18  }
   130.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   130.2 +++ b/test/tools/javac/lambda/ByteCodeTest.java	Thu Sep 26 17:23:00 2013 -0700
   130.3 @@ -0,0 +1,647 @@
   130.4 +/*
   130.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   130.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   130.7 + *
   130.8 + * This code is free software; you can redistribute it and/or modify it
   130.9 + * under the terms of the GNU General Public License version 2 only, as
  130.10 + * published by the Free Software Foundation.
  130.11 + *
  130.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  130.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  130.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  130.15 + * version 2 for more details (a copy is included in the LICENSE file that
  130.16 + * accompanied this code).
  130.17 + *
  130.18 + * You should have received a copy of the GNU General Public License version
  130.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  130.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  130.21 + *
  130.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  130.23 + * or visit www.oracle.com if you need additional information or have any
  130.24 + * questions.
  130.25 + */
  130.26 +
  130.27 +/*
  130.28 + * @test
  130.29 + * @bug     8011738
  130.30 + * @author  sogoel
  130.31 + * @summary Code translation test for Lambda expressions, method references
  130.32 + * @run main ByteCodeTest
  130.33 + */
  130.34 +
  130.35 +import com.sun.tools.classfile.Attribute;
  130.36 +import com.sun.tools.classfile.BootstrapMethods_attribute;
  130.37 +import com.sun.tools.classfile.ClassFile;
  130.38 +import com.sun.tools.classfile.ConstantPool;
  130.39 +import com.sun.tools.classfile.ConstantPoolException;
  130.40 +import com.sun.tools.classfile.ConstantPool.*;
  130.41 +
  130.42 +import java.io.BufferedWriter;
  130.43 +import java.io.File;
  130.44 +import java.io.FileWriter;
  130.45 +import java.io.IOException;
  130.46 +import java.io.PrintWriter;
  130.47 +import java.util.ArrayList;
  130.48 +import java.util.Collections;
  130.49 +import java.util.HashMap;
  130.50 +import java.util.HashSet;
  130.51 +import java.util.List;
  130.52 +import java.util.Map;
  130.53 +
  130.54 +public class ByteCodeTest {
  130.55 +
  130.56 +    static boolean IS_DEBUG = false;
  130.57 +    public static void main(String[] args) {
  130.58 +        File classFile = null;
  130.59 +        int err = 0;
  130.60 +        boolean verifyResult = false;
  130.61 +        for(TestCases tc : TestCases.values()) {
  130.62 +            classFile = getCompiledFile(tc.name(), tc.srcCode);
  130.63 +            if(classFile == null) { // either testFile or classFile was not created
  130.64 +               err++;
  130.65 +            } else {
  130.66 +                verifyResult = verifyClassFileAttributes(classFile, tc);
  130.67 +                if(!verifyResult)
  130.68 +                    System.out.println("Bootstrap class file attributes did not match for " + tc.name());
  130.69 +            }
  130.70 +        }
  130.71 +        if(err > 0)
  130.72 +            throw new RuntimeException("Found " + err + " found");
  130.73 +        else
  130.74 +            System.out.println("Test passed");
  130.75 +    }
  130.76 +
  130.77 +    private static boolean verifyClassFileAttributes(File classFile, TestCases tc) {
  130.78 +        ClassFile c = null;
  130.79 +        try {
  130.80 +            c = ClassFile.read(classFile);
  130.81 +        } catch (IOException | ConstantPoolException e) {
  130.82 +            e.printStackTrace();
  130.83 +        }
  130.84 +        ConstantPoolVisitor cpv = new ConstantPoolVisitor(c, c.constant_pool.size());
  130.85 +        Map<Integer, String> hm = cpv.getBSMMap();
  130.86 +
  130.87 +        List<String> expectedValList = tc.getExpectedArgValues();
  130.88 +        expectedValList.add(tc.bsmSpecifier.specifier);
  130.89 +        if(!(hm.values().containsAll(new HashSet<String>(expectedValList)))) {
  130.90 +            System.out.println("Values do not match");
  130.91 +            return false;
  130.92 +        }
  130.93 +        return true;
  130.94 +    }
  130.95 +
  130.96 +    private static File getCompiledFile(String fname, String srcString) {
  130.97 +        File testFile = null, classFile = null;
  130.98 +        boolean isTestFileCreated = true;
  130.99 +
 130.100 +        try {
 130.101 +            testFile = writeTestFile(fname+".java", srcString);
 130.102 +        } catch(IOException ioe) {
 130.103 +            isTestFileCreated = false;
 130.104 +            System.err.println("fail to write" + ioe);
 130.105 +        }
 130.106 +
 130.107 +        if(isTestFileCreated) {
 130.108 +            try {
 130.109 +                classFile = compile(testFile);
 130.110 +            } catch (Error err) {
 130.111 +                System.err.println("fail compile. Source:\n" + srcString);
 130.112 +                throw err;
 130.113 +            }
 130.114 +        }
 130.115 +        return classFile;
 130.116 +    }
 130.117 +
 130.118 +    static File writeTestFile(String fname, String source) throws IOException {
 130.119 +        File f = new File(fname);
 130.120 +          PrintWriter out = new PrintWriter(new BufferedWriter(new FileWriter(f)));
 130.121 +          out.println(source);
 130.122 +          out.close();
 130.123 +          return f;
 130.124 +    }
 130.125 +
 130.126 +    static File compile(File f) {
 130.127 +        int rc = com.sun.tools.javac.Main.compile(new String[] {
 130.128 +                "-source", "1.8", "-g", f.getPath() });
 130.129 +        if (rc != 0)
 130.130 +                throw new Error("compilation failed. rc=" + rc);
 130.131 +            String path = f.getPath();
 130.132 +            return new File(path.substring(0, path.length() - 5) + ".class");
 130.133 +    }
 130.134 +
 130.135 +    static void debugln(String str) {
 130.136 +        if(IS_DEBUG)
 130.137 +            System.out.println(str);
 130.138 +    }
 130.139 +
 130.140 +    enum BSMSpecifier {
 130.141 +        SPECIFIER1("REF_invokeStatic java/lang/invoke/LambdaMetafactory metaFactory " +
 130.142 +                "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;" +
 130.143 +                "Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodHandle;Ljava/lang/invoke/MethodType;)" +
 130.144 +                "Ljava/lang/invoke/CallSite;"),
 130.145 +        SPECIFIER2("REF_invokeStatic java/lang/invoke/LambdaMetafactory altMetaFactory " +
 130.146 +                        "(Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;" +
 130.147 +                        "[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;");
 130.148 +
 130.149 +        String specifier;
 130.150 +        private BSMSpecifier(String specifier) {
 130.151 +            this.specifier = specifier;
 130.152 +        }
 130.153 +    }
 130.154 +
 130.155 +    enum TestCases {
 130.156 +        // Single line lambda expression
 130.157 +        TC1("class TC1 {\n" +
 130.158 +            "    public static void main(String[] args) {\n" +
 130.159 +            "        Object o = (Runnable) () -> { System.out.println(\"hi\");};\n" +
 130.160 +            "    }\n"+
 130.161 +            "}", BSMSpecifier.SPECIFIER1) {
 130.162 +
 130.163 +            @Override
 130.164 +            List<String> getExpectedArgValues() {
 130.165 +                List<String> valList = new ArrayList<>();
 130.166 +                valList.add("REF_invokeInterface java/lang/Runnable run ()V");
 130.167 +                valList.add("REF_invokeStatic TC1 lambda$0 ()V");
 130.168 +                valList.add("()V");
 130.169 +                return valList;
 130.170 +            }
 130.171 +        },
 130.172 +
 130.173 +        // Lambda expression in a for loop
 130.174 +        TC2("import java.util.*;\n" +
 130.175 +            "public class TC2 {\n" +
 130.176 +            "    void TC2_test() {\n" +
 130.177 +            "        List<String> list = new ArrayList<>();\n" +
 130.178 +            "        list.add(\"A\");\n" +
 130.179 +            "        list.add(\"B\");\n" +
 130.180 +            "        list.stream().forEach( s -> { System.out.println(s); } );\n" +
 130.181 +            "    }\n" +
 130.182 +            "    public static void main(String[] args) {\n" +
 130.183 +            "        new TC2().TC2_test();\n" +
 130.184 +            "    }\n" +
 130.185 +            "}", BSMSpecifier.SPECIFIER1) {
 130.186 +
 130.187 +            @Override
 130.188 +            List<String> getExpectedArgValues() {
 130.189 +                List<String> valList = new ArrayList<>();
 130.190 +                valList.add("REF_invokeInterface java/util/function/Consumer accept (Ljava/lang/Object;)V");
 130.191 +                valList.add("REF_invokeStatic TC2 lambda$0 (Ljava/lang/String;)V");
 130.192 +                valList.add("(Ljava/lang/String;)V");
 130.193 +                return valList;
 130.194 +            }
 130.195 +        },
 130.196 +
 130.197 +        // Lambda initializer
 130.198 +        TC3("class TC3 {\n" +
 130.199 +            "    interface SAM {\n" +
 130.200 +            "        void m(int i);\n" +
 130.201 +            "    }\n" +
 130.202 +            "    SAM lambda_03 = (int pos) -> { };\n" +
 130.203 +            "}", BSMSpecifier.SPECIFIER1) {
 130.204 +
 130.205 +            @Override
 130.206 +            List<String> getExpectedArgValues() {
 130.207 +                List<String> valList = new ArrayList<>();
 130.208 +                valList.add("REF_invokeInterface TC3$SAM m (I)V");
 130.209 +                valList.add("REF_invokeStatic TC3 lambda$0 (I)V");
 130.210 +                valList.add("(I)V");
 130.211 +                return valList;
 130.212 +            }
 130.213 +        },
 130.214 +
 130.215 +        // Array initializer
 130.216 +        TC4("class TC4 {\n" +
 130.217 +            "    interface Block<T> {\n" +
 130.218 +            "        void m(T t);\n" +
 130.219 +            "     }\n" +
 130.220 +            "     void test1() {\n" +
 130.221 +            "         Block<?>[] arr1 =  { t -> { }, t -> { } };\n" +
 130.222 +            "     }\n" +
 130.223 +            "}", BSMSpecifier.SPECIFIER1) {
 130.224 +
 130.225 +            @Override
 130.226 +            List<String> getExpectedArgValues() {
 130.227 +                List<String> valList = new ArrayList<>();
 130.228 +                valList.add("REF_invokeInterface TC4$Block m (Ljava/lang/Object;)V");
 130.229 +                valList.add("REF_invokeStatic TC4 lambda$0 (Ljava/lang/Object;)V");
 130.230 +                valList.add("(Ljava/lang/Object;)V");
 130.231 +                valList.add("REF_invokeStatic TC4 lambda$1 (Ljava/lang/Object;)V");
 130.232 +                return valList;
 130.233 +            }
 130.234 +        },
 130.235 +
 130.236 +        //Lambda expression as a method arg
 130.237 +        TC5("class TC5 {\n"+
 130.238 +            "    interface MapFun<T,R> {  R m( T n); }\n" +
 130.239 +            "    void meth( MapFun<String,Integer> mf ) {\n" +
 130.240 +            "        assert( mf.m(\"four\") == 4);\n" +
 130.241 +            "    }\n"+
 130.242 +            "    void test(Integer i) {\n" +
 130.243 +            "        meth(s -> { Integer len = s.length(); return len; } );\n" +
 130.244 +            "    }\n"+
 130.245 +            "}", BSMSpecifier.SPECIFIER1) {
 130.246 +
 130.247 +            @Override
 130.248 +            List<String> getExpectedArgValues() {
 130.249 +                List<String> valList = new ArrayList<>();
 130.250 +                valList.add("REF_invokeInterface TC5$MapFun m (Ljava/lang/Object;)Ljava/lang/Object;");
 130.251 +                valList.add("REF_invokeStatic TC5 lambda$0 (Ljava/lang/String;)Ljava/lang/Integer;");
 130.252 +                valList.add("(Ljava/lang/String;)Ljava/lang/Integer;");
 130.253 +                return valList;
 130.254 +            }
 130.255 +        },
 130.256 +
 130.257 +        //Inner class of Lambda expression
 130.258 +        TC6("class TC6 {\n" +
 130.259 +            "    interface MapFun<T, R> {  R m( T n); }\n" +
 130.260 +            "    MapFun<Class<?>,String> cs;\n" +
 130.261 +            "    void test() {\n" +
 130.262 +            "        cs = c -> {\n" +
 130.263 +            "                 class innerClass   {\n" +
 130.264 +            "                    Class<?> icc;\n" +
 130.265 +            "                    innerClass(Class<?> _c) { icc = _c; }\n" +
 130.266 +            "                    String getString() { return icc.toString(); }\n" +
 130.267 +            "                  }\n" +
 130.268 +            "             return new innerClass(c).getString();\n"+
 130.269 +            "             };\n" +
 130.270 +            "    }\n" +
 130.271 +            "}\n", BSMSpecifier.SPECIFIER1) {
 130.272 +
 130.273 +            @Override
 130.274 +            List<String> getExpectedArgValues() {
 130.275 +                List<String> valList = new ArrayList<>();
 130.276 +                valList.add("REF_invokeInterface TC6$MapFun m (Ljava/lang/Object;)Ljava/lang/Object;");
 130.277 +                valList.add("REF_invokeSpecial TC6 lambda$0 (Ljava/lang/Class;)Ljava/lang/String;");
 130.278 +                valList.add("(Ljava/lang/Class;)Ljava/lang/String;");
 130.279 +                return valList;
 130.280 +            }
 130.281 +        },
 130.282 +
 130.283 +        // Method reference
 130.284 +        TC7("class TC7 {\n" +
 130.285 +            "    static interface SAM {\n" +
 130.286 +            "       void m(Integer i);\n" +
 130.287 +            "    }\n" +
 130.288 +            "    void m(Integer i) {}\n" +
 130.289 +            "       SAM s = this::m;\n" +
 130.290 +            "}\n", BSMSpecifier.SPECIFIER1) {
 130.291 +
 130.292 +            @Override
 130.293 +            List<String> getExpectedArgValues() {
 130.294 +                List<String> valList = new ArrayList<>();
 130.295 +                valList.add("REF_invokeInterface TC7$SAM m (Ljava/lang/Integer;)V");
 130.296 +                valList.add("REF_invokeVirtual TC7 m (Ljava/lang/Integer;)V");
 130.297 +                valList.add("(Ljava/lang/Integer;)V");
 130.298 +                return valList;
 130.299 +            }
 130.300 +        },
 130.301 +
 130.302 +        // Constructor reference
 130.303 +        TC8("public class TC8 {\n" +
 130.304 +            "    static interface A {Fee<String> m();}\n" +
 130.305 +            "    static class Fee<T> {\n" +
 130.306 +            "        private T t;\n" +
 130.307 +            "        public Fee() {}\n" +
 130.308 +            "    }\n" +
 130.309 +            "    public static void main(String[] args) {\n" +
 130.310 +            "        A a = Fee<String>::new; \n" +
 130.311 +            "    }\n" +
 130.312 +            "}\n", BSMSpecifier.SPECIFIER1) {
 130.313 +
 130.314 +            @Override
 130.315 +            List<String> getExpectedArgValues() {
 130.316 +                List<String> valList = new ArrayList<>();
 130.317 +                valList.add("REF_invokeInterface TC8$A m ()LTC8$Fee;");
 130.318 +                valList.add("REF_newInvokeSpecial TC8$Fee <init> ()V");
 130.319 +                valList.add("()LTC8$Fee;");
 130.320 +                return valList;
 130.321 +            }
 130.322 +        },
 130.323 +
 130.324 +        // Recursive lambda expression
 130.325 +        TC9("class TC9 {\n" +
 130.326 +            "    interface Recursive<T, R> { T apply(R n); };\n" +
 130.327 +            "    Recursive<Integer,Integer> factorial;\n" +
 130.328 +            "    void test(Integer j) {\n" +
 130.329 +            "        factorial = i -> { return i == 0 ? 1 : i * factorial.apply( i - 1 ); };\n" +
 130.330 +            "    }\n" +
 130.331 +            "}\n", BSMSpecifier.SPECIFIER1) {
 130.332 +
 130.333 +            @Override
 130.334 +            List<String> getExpectedArgValues() {
 130.335 +                List<String> valList = new ArrayList<>();
 130.336 +                valList.add("REF_invokeInterface TC9$Recursive apply (Ljava/lang/Object;)Ljava/lang/Object;");
 130.337 +                valList.add("REF_invokeSpecial TC9 lambda$0 (Ljava/lang/Integer;)Ljava/lang/Integer;");
 130.338 +                valList.add("(Ljava/lang/Integer;)Ljava/lang/Integer;");
 130.339 +                return valList;
 130.340 +            }
 130.341 +        },
 130.342 +
 130.343 +        //Serializable Lambda
 130.344 +        TC10("import java.io.Serializable;\n" +
 130.345 +              "class TC10 {\n" +
 130.346 +              "    interface Foo { int m(); }\n" +
 130.347 +              "    public static void main(String[] args) {\n" +
 130.348 +              "        Foo f1 = (Foo & Serializable)() -> 3;\n" +
 130.349 +              "    }\n" +
 130.350 +              "}\n", BSMSpecifier.SPECIFIER2) {
 130.351 +
 130.352 +            @Override
 130.353 +            List<String> getExpectedArgValues() {
 130.354 +                List<String> valList = new ArrayList<>();
 130.355 +                valList.add("REF_invokeStatic java/lang/invoke/LambdaMetafactory altMetaFactory (Ljava/lang/invoke/MethodHandles$Lookup;Ljava/lang/String;Ljava/lang/invoke/MethodType;[Ljava/lang/Object;)Ljava/lang/invoke/CallSite;");
 130.356 +                valList.add("REF_invokeInterface TC10$Foo m ()I");
 130.357 +                valList.add("REF_invokeStatic TC10 lambda$main$3231c38a$0 ()I");
 130.358 +                valList.add("()I");
 130.359 +                valList.add("1");
 130.360 +                return valList;
 130.361 +            }
 130.362 +        };
 130.363 +
 130.364 +        String srcCode;
 130.365 +        BSMSpecifier bsmSpecifier;
 130.366 +
 130.367 +        TestCases(String src, BSMSpecifier bsmSpecifier) {
 130.368 +            this.srcCode = src;
 130.369 +            // By default, all test cases will have bootstrap method specifier as Lambda.MetaFactory
 130.370 +            // For serializable lambda test cases, bootstrap method specifier changed to altMetaFactory
 130.371 +            this.bsmSpecifier = bsmSpecifier;
 130.372 +        }
 130.373 +
 130.374 +        List<String> getExpectedArgValues() {
 130.375 +            return null;
 130.376 +        }
 130.377 +
 130.378 +        void setSrcCode(String src) {
 130.379 +            srcCode = src;
 130.380 +        }
 130.381 +    }
 130.382 +
 130.383 +    static class ConstantPoolVisitor implements ConstantPool.Visitor<String, Integer> {
 130.384 +        final List<String> slist;
 130.385 +        final ClassFile cf;
 130.386 +        final ConstantPool cfpool;
 130.387 +        final Map<Integer, String> bsmMap;
 130.388 +
 130.389 +
 130.390 +        public ConstantPoolVisitor(ClassFile cf, int size) {
 130.391 +            slist = new ArrayList<>(size);
 130.392 +            for (int i = 0 ; i < size; i++) {
 130.393 +                slist.add(null);
 130.394 +            }
 130.395 +            this.cf = cf;
 130.396 +            this.cfpool = cf.constant_pool;
 130.397 +            bsmMap = readBSM();
 130.398 +        }
 130.399 +
 130.400 +        public Map<Integer, String> getBSMMap() {
 130.401 +            return Collections.unmodifiableMap(bsmMap);
 130.402 +        }
 130.403 +
 130.404 +        public String visit(CPInfo c, int index) {
 130.405 +            return c.accept(this, index);
 130.406 +        }
 130.407 +
 130.408 +        private Map<Integer, String> readBSM() {
 130.409 +            BootstrapMethods_attribute bsmAttr =
 130.410 +                    (BootstrapMethods_attribute) cf.getAttribute(Attribute.BootstrapMethods);
 130.411 +            if (bsmAttr != null) {
 130.412 +                Map<Integer, String> out =
 130.413 +                        new HashMap<>(bsmAttr.bootstrap_method_specifiers.length);
 130.414 +                for (BootstrapMethods_attribute.BootstrapMethodSpecifier bsms :
 130.415 +                        bsmAttr.bootstrap_method_specifiers) {
 130.416 +                    int index = bsms.bootstrap_method_ref;
 130.417 +                    try {
 130.418 +                        String value = slist.get(index);
 130.419 +                        if (value == null) {
 130.420 +                            value = visit(cfpool.get(index), index);
 130.421 +                            debugln("[SG]: index " + index);
 130.422 +                            debugln("[SG]: value " + value);
 130.423 +                            slist.set(index, value);
 130.424 +                            out.put(index, value);
 130.425 +                        }
 130.426 +                        for (int idx : bsms.bootstrap_arguments) {
 130.427 +                            value = slist.get(idx);
 130.428 +                            if (value == null) {
 130.429 +                                value = visit(cfpool.get(idx), idx);
 130.430 +                                debugln("[SG]: idx " + idx);
 130.431 +                                debugln("[SG]: value " + value);
 130.432 +                                slist.set(idx, value);
 130.433 +                                out.put(idx, value);
 130.434 +                            }
 130.435 +                        }
 130.436 +                    } catch (InvalidIndex ex) {
 130.437 +                        ex.printStackTrace();
 130.438 +                    }
 130.439 +                }
 130.440 +                return out;
 130.441 +            }
 130.442 +            return new HashMap<>(0);
 130.443 +        }
 130.444 +
 130.445 +        @Override
 130.446 +        public String visitClass(CONSTANT_Class_info c, Integer p) {
 130.447 +
 130.448 +            String value = slist.get(p);
 130.449 +            if (value == null) {
 130.450 +                try {
 130.451 +                    value = visit(cfpool.get(c.name_index), c.name_index);
 130.452 +                    slist.set(p, value);
 130.453 +                } catch (ConstantPoolException ex) {
 130.454 +                    ex.printStackTrace();
 130.455 +                }
 130.456 +            }
 130.457 +            return value;
 130.458 +        }
 130.459 +
 130.460 +        @Override
 130.461 +        public String visitDouble(CONSTANT_Double_info c, Integer p) {
 130.462 +
 130.463 +            String value = slist.get(p);
 130.464 +            if (value == null) {
 130.465 +                value = Double.toString(c.value);
 130.466 +                slist.set(p, value);
 130.467 +            }
 130.468 +            return value;
 130.469 +        }
 130.470 +
 130.471 +        @Override
 130.472 +        public String visitFieldref(CONSTANT_Fieldref_info c, Integer p) {
 130.473 +
 130.474 +        String value = slist.get(p);
 130.475 +            if (value == null) {
 130.476 +                try {
 130.477 +                    value = visit(cfpool.get(c.class_index), c.class_index);
 130.478 +                    value = value.concat(" " + visit(cfpool.get(c.name_and_type_index),
 130.479 +                                         c.name_and_type_index));
 130.480 +                    slist.set(p, value);
 130.481 +                } catch (ConstantPoolException ex) {
 130.482 +                    ex.printStackTrace();
 130.483 +                }
 130.484 +            }
 130.485 +            return value;
 130.486 +        }
 130.487 +
 130.488 +        @Override
 130.489 +        public String visitFloat(CONSTANT_Float_info c, Integer p) {
 130.490 +
 130.491 +            String value = slist.get(p);
 130.492 +            if (value == null) {
 130.493 +                value = Float.toString(c.value);
 130.494 +                slist.set(p, value);
 130.495 +            }
 130.496 +            return value;
 130.497 +        }
 130.498 +
 130.499 +        @Override
 130.500 +        public String visitInteger(CONSTANT_Integer_info cnstnt, Integer p) {
 130.501 +
 130.502 +            String value = slist.get(p);
 130.503 +            if (value == null) {
 130.504 +                value = Integer.toString(cnstnt.value);
 130.505 +                slist.set(p, value);
 130.506 +            }
 130.507 +            return value;
 130.508 +        }
 130.509 +
 130.510 +        @Override
 130.511 +        public String visitInterfaceMethodref(CONSTANT_InterfaceMethodref_info c,
 130.512 +                                              Integer p) {
 130.513 +
 130.514 +            String value = slist.get(p);
 130.515 +            if (value == null) {
 130.516 +                try {
 130.517 +                    value = visit(cfpool.get(c.class_index), c.class_index);
 130.518 +                    value = value.concat(" " +
 130.519 +                                         visit(cfpool.get(c.name_and_type_index),
 130.520 +                                         c.name_and_type_index));
 130.521 +                    slist.set(p, value);
 130.522 +                } catch (ConstantPoolException ex) {
 130.523 +                    ex.printStackTrace();
 130.524 +                }
 130.525 +            }
 130.526 +            return value;
 130.527 +        }
 130.528 +
 130.529 +        @Override
 130.530 +        public String visitInvokeDynamic(CONSTANT_InvokeDynamic_info c, Integer p) {
 130.531 +
 130.532 +            String value = slist.get(p);
 130.533 +            if (value == null) {
 130.534 +                try {
 130.535 +                    value = bsmMap.get(c.bootstrap_method_attr_index) + " "
 130.536 +                            + visit(cfpool.get(c.name_and_type_index), c.name_and_type_index);
 130.537 +                    slist.set(p, value);
 130.538 +                } catch (ConstantPoolException ex) {
 130.539 +                    ex.printStackTrace();
 130.540 +                }
 130.541 +            }
 130.542 +            return value;
 130.543 +        }
 130.544 +
 130.545 +        @Override
 130.546 +        public String visitLong(CONSTANT_Long_info c, Integer p) {
 130.547 +
 130.548 +            String value = slist.get(p);
 130.549 +            if (value == null) {
 130.550 +                value = Long.toString(c.value);
 130.551 +                slist.set(p, value);
 130.552 +            }
 130.553 +            return value;
 130.554 +        }
 130.555 +
 130.556 +        @Override
 130.557 +        public String visitNameAndType(CONSTANT_NameAndType_info c, Integer p) {
 130.558 +
 130.559 +            String value = slist.get(p);
 130.560 +            if (value == null) {
 130.561 +                try {
 130.562 +                    value = visit(cfpool.get(c.name_index), c.name_index);
 130.563 +                    value = value.concat(" " +
 130.564 +                            visit(cfpool.get(c.type_index), c.type_index));
 130.565 +                    slist.set(p, value);
 130.566 +                } catch (InvalidIndex ex) {
 130.567 +                    ex.printStackTrace();
 130.568 +                }
 130.569 +            }
 130.570 +            return value;
 130.571 +        }
 130.572 +
 130.573 +        @Override
 130.574 +        public String visitMethodref(CONSTANT_Methodref_info c, Integer p) {
 130.575 +
 130.576 +            String value = slist.get(p);
 130.577 +            if (value == null) {
 130.578 +                try {
 130.579 +                    value = visit(cfpool.get(c.class_index), c.class_index);
 130.580 +                    value = value.concat(" " +
 130.581 +                                         visit(cfpool.get(c.name_and_type_index),
 130.582 +                                         c.name_and_type_index));
 130.583 +                    slist.set(p, value);
 130.584 +                } catch (ConstantPoolException ex) {
 130.585 +                    ex.printStackTrace();
 130.586 +                }
 130.587 +            }
 130.588 +            return value;
 130.589 +        }
 130.590 +
 130.591 +        @Override
 130.592 +        public String visitMethodHandle(CONSTANT_MethodHandle_info c, Integer p) {
 130.593 +
 130.594 +        String value = slist.get(p);
 130.595 +            if (value == null) {
 130.596 +                try {
 130.597 +                    value = c.reference_kind.name();
 130.598 +                    value = value.concat(" "
 130.599 +                            + visit(cfpool.get(c.reference_index), c.reference_index));
 130.600 +                    slist.set(p, value);
 130.601 +                } catch (ConstantPoolException ex) {
 130.602 +                    ex.printStackTrace();
 130.603 +                }
 130.604 +            }
 130.605 +            return value;
 130.606 +        }
 130.607 +
 130.608 +        @Override
 130.609 +        public String visitMethodType(CONSTANT_MethodType_info c, Integer p) {
 130.610 +
 130.611 +            String value = slist.get(p);
 130.612 +            if (value == null) {
 130.613 +                try {
 130.614 +                    value = visit(cfpool.get(c.descriptor_index), c.descriptor_index);
 130.615 +                    slist.set(p, value);
 130.616 +                } catch (ConstantPoolException ex) {
 130.617 +                    ex.printStackTrace();
 130.618 +                }
 130.619 +            }
 130.620 +            return value;
 130.621 +        }
 130.622 +
 130.623 +        @Override
 130.624 +        public String visitString(CONSTANT_String_info c, Integer p) {
 130.625 +
 130.626 +            try {
 130.627 +                String value = slist.get(p);
 130.628 +                if (value == null) {
 130.629 +                    value = c.getString();
 130.630 +                    slist.set(p, value);
 130.631 +                }
 130.632 +                return value;
 130.633 +            } catch (ConstantPoolException ex) {
 130.634 +                throw new RuntimeException("Fatal error", ex);
 130.635 +            }
 130.636 +        }
 130.637 +
 130.638 +        @Override
 130.639 +        public String  visitUtf8(CONSTANT_Utf8_info cnstnt, Integer p) {
 130.640 +
 130.641 +            String value = slist.get(p);
 130.642 +            if (value == null) {
 130.643 +                value = cnstnt.value;
 130.644 +                slist.set(p, value);
 130.645 +            }
 130.646 +            return value;
 130.647 +        }
 130.648 +    }
 130.649 +}
 130.650 +
   131.1 --- a/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java	Thu Sep 26 10:43:55 2013 -0700
   131.2 +++ b/test/tools/javac/lambda/intersection/IntersectionTargetTypeTest.java	Thu Sep 26 17:23:00 2013 -0700
   131.3 @@ -1,5 +1,5 @@
   131.4  /*
   131.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
   131.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   131.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   131.8   *
   131.9   * This code is free software; you can redistribute it and/or modify it
  131.10 @@ -196,7 +196,7 @@
  131.11      }
  131.12  
  131.13      static List<CastInfo> allCastInfo() {
  131.14 -        ListBuffer<CastInfo> buf = ListBuffer.lb();
  131.15 +        ListBuffer<CastInfo> buf = new ListBuffer<>();
  131.16          for (CastKind kind : CastKind.values()) {
  131.17              for (TypeKind b1 : TypeKind.values()) {
  131.18                  if (kind.nbounds == 1) {
   132.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   132.2 +++ b/test/tools/javac/lambda/methodReferenceExecution/MethodReferenceNullCheckTest.java	Thu Sep 26 17:23:00 2013 -0700
   132.3 @@ -0,0 +1,47 @@
   132.4 +/*
   132.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   132.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   132.7 + *
   132.8 + * This code is free software; you can redistribute it and/or modify it
   132.9 + * under the terms of the GNU General Public License version 2 only, as
  132.10 + * published by the Free Software Foundation.  Oracle designates this
  132.11 + * particular file as subject to the "Classpath" exception as provided
  132.12 + * by Oracle in the LICENSE file that accompanied this code.
  132.13 + *
  132.14 + * This code is distributed in the hope that it will be useful, but WITHOUT
  132.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  132.16 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  132.17 + * version 2 for more details (a copy is included in the LICENSE file that
  132.18 + * accompanied this code).
  132.19 + *
  132.20 + * You should have received a copy of the GNU General Public License version
  132.21 + * 2 along with this work; if not, write to the Free Software Foundation,
  132.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  132.23 + *
  132.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  132.25 + * or visit www.oracle.com if you need additional information or have any
  132.26 + * questions.
  132.27 + */
  132.28 +
  132.29 +/**
  132.30 + * @test
  132.31 + * @bug 8024696
  132.32 + * @summary Missing null check in bound method reference capture
  132.33 + */
  132.34 +
  132.35 +import com.sun.tools.javac.util.Assert;
  132.36 +import java.util.function.*;
  132.37 +
  132.38 +public class MethodReferenceNullCheckTest {
  132.39 +    public static void main(String[] args) {
  132.40 +        String s = null;
  132.41 +        boolean npeFired = false;
  132.42 +        try {
  132.43 +            Supplier<Boolean> ss = s::isEmpty;
  132.44 +        } catch (NullPointerException npe) {
  132.45 +            npeFired = true;
  132.46 +        } finally {
  132.47 +            Assert.check(npeFired, "NPE should have been thrown");
  132.48 +        }
  132.49 +    }
  132.50 +}
   133.1 --- a/test/tools/javac/multicatch/Pos05.java	Thu Sep 26 10:43:55 2013 -0700
   133.2 +++ b/test/tools/javac/multicatch/Pos05.java	Thu Sep 26 17:23:00 2013 -0700
   133.3 @@ -95,7 +95,7 @@
   133.4                  throw new Error("Code attribute for test() method not found");
   133.5              }
   133.6              Exception_data firstExceptionTable = null;
   133.7 -            for (int i = 0 ; i < ea.exception_table_langth; i++) {
   133.8 +            for (int i = 0 ; i < ea.exception_table_length; i++) {
   133.9                  if (firstExceptionTable == null) {
  133.10                      firstExceptionTable = ea.exception_table[i];
  133.11                  }
   134.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   134.2 +++ b/test/tools/javac/processing/model/type/BoundsTest.java	Thu Sep 26 17:23:00 2013 -0700
   134.3 @@ -0,0 +1,200 @@
   134.4 +/*
   134.5 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   134.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   134.7 + *
   134.8 + * This code is free software; you can redistribute it and/or modify it
   134.9 + * under the terms of the GNU General Public License version 2 only, as
  134.10 + * published by the Free Software Foundation.
  134.11 + *
  134.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  134.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  134.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  134.15 + * version 2 for more details (a copy is included in the LICENSE file that
  134.16 + * accompanied this code).
  134.17 + *
  134.18 + * You should have received a copy of the GNU General Public License version
  134.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  134.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  134.21 + *
  134.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  134.23 + * or visit www.oracle.com if you need additional information or have any
  134.24 + * questions.
  134.25 + */
  134.26 +
  134.27 +/*
  134.28 + * @test
  134.29 + * @bug 6499673
  134.30 + * @library /tools/javac/lib
  134.31 + * @build JavacTestingAbstractProcessor BoundsTest
  134.32 + * @run main BoundsTest
  134.33 + * @summary Assertion check for TypeVariable.getUpperBound() fails
  134.34 + */
  134.35 +
  134.36 +import com.sun.source.util.*;
  134.37 +import com.sun.tools.javac.api.*;
  134.38 +import com.sun.tools.javac.file.*;
  134.39 +import javax.annotation.processing.*;
  134.40 +import javax.lang.model.SourceVersion;
  134.41 +import javax.lang.model.type.*;
  134.42 +import javax.lang.model.util.ElementFilter;
  134.43 +import javax.lang.model.element.*;
  134.44 +import javax.tools.*;
  134.45 +import java.util.*;
  134.46 +import java.io.*;
  134.47 +
  134.48 +public class BoundsTest {
  134.49 +
  134.50 +    private int errors = 0;
  134.51 +    private static final String Intersection_name = "IntersectionTest.java";
  134.52 +    private static final String Intersection_contents =
  134.53 +        "import java.util.List;\n" +
  134.54 +        "import java.io.Serializable;\t" +
  134.55 +        "public class IntersectionTest<S extends List & Serializable> {\n" +
  134.56 +        "  void method(S s) { }\n" +
  134.57 +        "}";
  134.58 +    private static final String[] Intersection_bounds = {
  134.59 +        "java.util.List",
  134.60 +        "java.io.Serializable"
  134.61 +    };
  134.62 +    private static final String[] Intersection_supers = {
  134.63 +        "java.util.List",
  134.64 +        "java.io.Serializable"
  134.65 +    };
  134.66 +
  134.67 +    private static final String Single_name = "SingleTest.java";
  134.68 +    private static final String Single_contents =
  134.69 +        "import java.util.List;\n" +
  134.70 +        "public class SingleTest<S extends List> {\n" +
  134.71 +        "  void method(S s) { }\n" +
  134.72 +        "}";
  134.73 +    private static final String[] Single_bounds = {
  134.74 +        "java.util.List",
  134.75 +    };
  134.76 +    private static final String[] Single_supers = {
  134.77 +        "java.lang.Object",
  134.78 +        "java.util.Collection"
  134.79 +    };
  134.80 +
  134.81 +    private static final String NoBounds_name = "NoBoundsTest.java";
  134.82 +    private static final String NoBounds_contents =
  134.83 +        "public class NoBoundsTest<S> {\n" +
  134.84 +        "  void method(S s) { }\n" +
  134.85 +        "}";
  134.86 +    private static final String[] NoBounds_bounds = {
  134.87 +        "java.lang.Object",
  134.88 +    };
  134.89 +    private static final String[] NoBounds_supers = {};
  134.90 +
  134.91 +    private HashSet<CharSequence> expected_bounds;
  134.92 +    private HashSet<CharSequence> expected_supers;
  134.93 +
  134.94 +    private static final File classesdir = new File("intersectionproperties");
  134.95 +    private static final JavaCompiler comp =
  134.96 +        ToolProvider.getSystemJavaCompiler();
  134.97 +    private static final StandardJavaFileManager fm =
  134.98 +        comp.getStandardFileManager(null, null, null);
  134.99 +
 134.100 +    public void runOne(final String Test_name, final String Test_contents,
 134.101 +                       final String[] Test_bounds, final String[] Test_supers)
 134.102 +        throws IOException {
 134.103 +        System.err.println("Testing " + Test_name);
 134.104 +        expected_bounds = new HashSet<CharSequence>(Arrays.asList(Test_bounds));
 134.105 +        expected_supers = new HashSet<CharSequence>(Arrays.asList(Test_supers));
 134.106 +        final Iterable<? extends JavaFileObject> files =
 134.107 +            fm.getJavaFileObjectsFromFiles(Collections.singleton(writeFile(classesdir, Test_name, Test_contents)));
 134.108 +        final JavacTask ct =
 134.109 +            (JavacTask)comp.getTask(null, fm, null, null, null, files);
 134.110 +        ct.setProcessors(Collections.singleton(new TestProcessor()));
 134.111 +
 134.112 +        if (!ct.call()) {
 134.113 +            System.err.println("Compilation unexpectedly failed");
 134.114 +            errors++;
 134.115 +        }
 134.116 +    }
 134.117 +
 134.118 +    public void run() throws IOException {
 134.119 +        runOne(Intersection_name, Intersection_contents,
 134.120 +               Intersection_bounds, Intersection_supers);
 134.121 +        runOne(Single_name, Single_contents,
 134.122 +               Single_bounds, Single_supers);
 134.123 +        runOne(NoBounds_name, NoBounds_contents,
 134.124 +               NoBounds_bounds, NoBounds_supers);
 134.125 +
 134.126 +        if (0 != errors)
 134.127 +            throw new RuntimeException(errors + " errors occurred");
 134.128 +    }
 134.129 +
 134.130 +    public static void main(String... args) throws IOException {
 134.131 +        new IntersectionPropertiesTest().run();
 134.132 +    }
 134.133 +
 134.134 +    private static File writeFile(File dir, String path, String body)
 134.135 +        throws IOException {
 134.136 +        File f = new File(dir, path);
 134.137 +        f.getParentFile().mkdirs();
 134.138 +        try (FileWriter out = new FileWriter(f)) {
 134.139 +            out.write(body);
 134.140 +        }
 134.141 +        return f;
 134.142 +    }
 134.143 +
 134.144 +    private class TestProcessor extends JavacTestingAbstractProcessor {
 134.145 +
 134.146 +        private Set<? extends Element> rootElements;
 134.147 +
 134.148 +        public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
 134.149 +            rootElements = roundEnv.getRootElements();
 134.150 +            if (!rootElements.isEmpty()) {
 134.151 +                performCheck();
 134.152 +            }
 134.153 +            return true;
 134.154 +        }
 134.155 +
 134.156 +        private void performCheck() {
 134.157 +            TypeElement typeElement = (TypeElement) rootElements.iterator().next();
 134.158 +            ExecutableElement method = ElementFilter.methodsIn(typeElement.getEnclosedElements()).get(0);
 134.159 +            TypeVariable typeVariable = (TypeVariable) method.getParameters().get(0).asType();
 134.160 +
 134.161 +            final TypeMirror upperBound = typeVariable.getUpperBound();
 134.162 +
 134.163 +            TypeParameterElement typeParameterElement = ((TypeParameterElement) typeVariable.asElement());
 134.164 +            final List<? extends TypeMirror> bounds = typeParameterElement.getBounds();
 134.165 +            final List<? extends TypeMirror> supers = processingEnv.getTypeUtils().directSupertypes(upperBound);
 134.166 +
 134.167 +            final HashSet<CharSequence> actual_bounds = new HashSet<CharSequence>();
 134.168 +            final HashSet<CharSequence> actual_supers = new HashSet<CharSequence>();
 134.169 +
 134.170 +            for(TypeMirror ty : bounds) {
 134.171 +                actual_bounds.add(((TypeElement)((DeclaredType)ty).asElement()).getQualifiedName());
 134.172 +            }
 134.173 +
 134.174 +            for(TypeMirror ty : supers) {
 134.175 +                actual_supers.add(((TypeElement)((DeclaredType)ty).asElement()).getQualifiedName());
 134.176 +            }
 134.177 +
 134.178 +
 134.179 +            if (!expected_bounds.equals(actual_bounds)) {
 134.180 +                System.err.println("Mismatched expected and actual bounds.");
 134.181 +                System.err.println("Expected:");
 134.182 +                for(CharSequence tm : expected_bounds)
 134.183 +                    System.err.println("  " + tm);
 134.184 +                System.err.println("Actual:");
 134.185 +                for(CharSequence tm : actual_bounds)
 134.186 +                    System.err.println("  " + tm);
 134.187 +                errors++;
 134.188 +            }
 134.189 +
 134.190 +            if (!expected_supers.equals(actual_supers)) {
 134.191 +                System.err.println("Mismatched expected and actual bounds.");
 134.192 +                System.err.println("Expected:");
 134.193 +                for(CharSequence tm : expected_supers)
 134.194 +                    System.err.println("  " + tm);
 134.195 +                System.err.println("Actual:");
 134.196 +                for(CharSequence tm : actual_supers)
 134.197 +                    System.err.println("  " + tm);
 134.198 +                errors++;
 134.199 +            }
 134.200 +        }
 134.201 +    }
 134.202 +
 134.203 +}
   135.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   135.2 +++ b/test/tools/javac/processing/model/type/IntersectionPropertiesTest.java	Thu Sep 26 17:23:00 2013 -0700
   135.3 @@ -0,0 +1,135 @@
   135.4 +/*
   135.5 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
   135.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   135.7 + *
   135.8 + * This code is free software; you can redistribute it and/or modify it
   135.9 + * under the terms of the GNU General Public License version 2 only, as
  135.10 + * published by the Free Software Foundation.
  135.11 + *
  135.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  135.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  135.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  135.15 + * version 2 for more details (a copy is included in the LICENSE file that
  135.16 + * accompanied this code).
  135.17 + *
  135.18 + * You should have received a copy of the GNU General Public License version
  135.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  135.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  135.21 + *
  135.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  135.23 + * or visit www.oracle.com if you need additional information or have any
  135.24 + * questions.
  135.25 + */
  135.26 +
  135.27 +/*
  135.28 + * @test
  135.29 + * @bug 6499673
  135.30 + * @library /tools/javac/lib
  135.31 + * @build JavacTestingAbstractProcessor IntersectionPropertiesTest
  135.32 + * @run main IntersectionPropertiesTest
  135.33 + * @summary Assertion check for TypeVariable.getUpperBound() fails
  135.34 + */
  135.35 +
  135.36 +import com.sun.source.util.*;
  135.37 +import com.sun.tools.javac.api.*;
  135.38 +import com.sun.tools.javac.file.*;
  135.39 +import javax.annotation.processing.*;
  135.40 +import javax.lang.model.SourceVersion;
  135.41 +import javax.lang.model.type.*;
  135.42 +import javax.lang.model.util.ElementFilter;
  135.43 +import javax.lang.model.element.*;
  135.44 +import javax.tools.*;
  135.45 +import java.util.*;
  135.46 +import java.io.*;
  135.47 +
  135.48 +public class IntersectionPropertiesTest {
  135.49 +
  135.50 +    private int errors = 0;
  135.51 +    private static final String Intersection_name = "IntersectionTest.java";
  135.52 +    private static final String Intersection_contents =
  135.53 +        "import java.util.List;\n" +
  135.54 +        "import java.io.Serializable;\t" +
  135.55 +        "public class IntersectionTest<S extends List & Serializable> {\n" +
  135.56 +        "  void method(S s) { }\n" +
  135.57 +        "}";
  135.58 +
  135.59 +    private static final File classesdir = new File("intersectionproperties");
  135.60 +    private static final JavaCompiler comp =
  135.61 +        ToolProvider.getSystemJavaCompiler();
  135.62 +    private static final StandardJavaFileManager fm =
  135.63 +        comp.getStandardFileManager(null, null, null);
  135.64 +
  135.65 +    public void runOne(final String Test_name, final String Test_contents)
  135.66 +        throws IOException {
  135.67 +        System.err.println("Testing " + Test_name);
  135.68 +        final Iterable<? extends JavaFileObject> files =
  135.69 +            fm.getJavaFileObjectsFromFiles(Collections.singleton(writeFile(classesdir, Test_name, Test_contents)));
  135.70 +        final JavacTask ct =
  135.71 +            (JavacTask)comp.getTask(null, fm, null, null, null, files);
  135.72 +        ct.setProcessors(Collections.singleton(new TestProcessor()));
  135.73 +
  135.74 +        if (!ct.call()) {
  135.75 +            System.err.println("Compilation unexpectedly failed");
  135.76 +            errors++;
  135.77 +        }
  135.78 +    }
  135.79 +
  135.80 +    public void run() throws IOException {
  135.81 +        runOne(Intersection_name, Intersection_contents);
  135.82 +
  135.83 +        if (0 != errors)
  135.84 +            throw new RuntimeException(errors + " errors occurred");
  135.85 +    }
  135.86 +
  135.87 +    public static void main(String... args) throws IOException {
  135.88 +        new IntersectionPropertiesTest().run();
  135.89 +    }
  135.90 +
  135.91 +    private static File writeFile(File dir, String path, String body)
  135.92 +        throws IOException {
  135.93 +        File f = new File(dir, path);
  135.94 +        f.getParentFile().mkdirs();
  135.95 +        try (FileWriter out = new FileWriter(f)) {
  135.96 +            out.write(body);
  135.97 +        }
  135.98 +        return f;
  135.99 +    }
 135.100 +
 135.101 +    private class TestProcessor extends JavacTestingAbstractProcessor {
 135.102 +
 135.103 +        private Set<? extends Element> rootElements;
 135.104 +
 135.105 +        public boolean process(Set<? extends TypeElement> annotations, RoundEnvironment roundEnv) {
 135.106 +            rootElements = roundEnv.getRootElements();
 135.107 +            if (!rootElements.isEmpty()) {
 135.108 +                performCheck();
 135.109 +            }
 135.110 +            return true;
 135.111 +        }
 135.112 +
 135.113 +        private void performCheck() {
 135.114 +            TypeElement typeElement = (TypeElement) rootElements.iterator().next();
 135.115 +            ExecutableElement method = ElementFilter.methodsIn(typeElement.getEnclosedElements()).get(0);
 135.116 +            TypeVariable typeVariable = (TypeVariable) method.getParameters().get(0).asType();
 135.117 +
 135.118 +            final TypeMirror upperBound = typeVariable.getUpperBound();
 135.119 +
 135.120 +            TypeParameterElement typeParameterElement = ((TypeParameterElement) typeVariable.asElement());
 135.121 +            final List<? extends TypeMirror> bounds = typeParameterElement.getBounds();
 135.122 +            final HashSet<TypeMirror> actual = new HashSet<TypeMirror>(processingEnv.getTypeUtils().directSupertypes(upperBound));
 135.123 +            final HashSet<TypeMirror> expected = new HashSet<TypeMirror>(bounds);
 135.124 +            if (!expected.equals(actual)) {
 135.125 +                System.err.println("Mismatched expected and actual bounds.");
 135.126 +                System.err.println("Expected:");
 135.127 +                for(TypeMirror tm : expected)
 135.128 +                    System.err.println("  " + tm);
 135.129 +                System.err.println("Actual:");
 135.130 +                for(TypeMirror tm : actual)
 135.131 +                    System.err.println("  " + tm);
 135.132 +                errors++;
 135.133 +            }
 135.134 +        }
 135.135 +
 135.136 +    }
 135.137 +
 135.138 +}
   136.1 --- a/test/tools/javac/scope/7017664/CompoundScopeTest.java	Thu Sep 26 10:43:55 2013 -0700
   136.2 +++ b/test/tools/javac/scope/7017664/CompoundScopeTest.java	Thu Sep 26 17:23:00 2013 -0700
   136.3 @@ -176,7 +176,7 @@
   136.4           */
   136.5          void checkElems(CompoundScope cs, Filter<Symbol> sf) {
   136.6              int count = 0;
   136.7 -            ListBuffer<Symbol> found = ListBuffer.lb();
   136.8 +            ListBuffer<Symbol> found = new ListBuffer<>();
   136.9              List<Symbol> allSymbols = sf == null ?
  136.10                      elems :
  136.11                      filter(elems, sf);
  136.12 @@ -216,7 +216,7 @@
  136.13          }
  136.14  
  136.15          List<Symbol> filter(List<Symbol> elems, Filter<Symbol> sf) {
  136.16 -            ListBuffer<Symbol> res = ListBuffer.lb();
  136.17 +            ListBuffer<Symbol> res = new ListBuffer<>();
  136.18              for (Symbol s : elems) {
  136.19                  if (sf.accepts(s)) {
  136.20                      res.append(s);
   137.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   137.2 +++ b/test/tools/javac/tree/MakeQualIdent.java	Thu Sep 26 17:23:00 2013 -0700
   137.3 @@ -0,0 +1,77 @@
   137.4 +/*
   137.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   137.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   137.7 + *
   137.8 + * This code is free software; you can redistribute it and/or modify it
   137.9 + * under the terms of the GNU General Public License version 2 only, as
  137.10 + * published by the Free Software Foundation.
  137.11 + *
  137.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  137.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  137.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  137.15 + * version 2 for more details (a copy is included in the LICENSE file that
  137.16 + * accompanied this code).
  137.17 + *
  137.18 + * You should have received a copy of the GNU General Public License version
  137.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  137.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  137.21 + *
  137.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  137.23 + * or visit www.oracle.com if you need additional information or have any
  137.24 + * questions.
  137.25 + */
  137.26 +
  137.27 +/*
  137.28 + * @test
  137.29 + * @bug     8023835
  137.30 + * @summary Verify that TreeMaker.QualIdent(Symbol) field access cascade ends with
  137.31 + *          the top-level package (when no toplevel is set in TreeMaker)
  137.32 + * @run main MakeQualIdent
  137.33 + */
  137.34 +
  137.35 +import com.sun.source.tree.IdentifierTree;
  137.36 +import com.sun.source.tree.MemberSelectTree;
  137.37 +import com.sun.source.tree.Tree;
  137.38 +import com.sun.source.util.JavacTask;
  137.39 +import com.sun.source.util.TreeScanner;
  137.40 +import com.sun.tools.javac.api.JavacTaskImpl;
  137.41 +import com.sun.tools.javac.api.JavacTool;
  137.42 +import com.sun.tools.javac.code.Symtab;
  137.43 +import com.sun.tools.javac.tree.TreeMaker;
  137.44 +import com.sun.tools.javac.util.Context;
  137.45 +import java.util.ArrayList;
  137.46 +
  137.47 +public class MakeQualIdent {
  137.48 +    public static void main(String... args) throws Exception {
  137.49 +        JavacTool tool = JavacTool.create();
  137.50 +        JavacTask task = tool.getTask(null, null, null, new ArrayList<String>(), null, null);
  137.51 +        Context ctx = ((JavacTaskImpl)task).getContext();
  137.52 +        TreeMaker treeMaker = TreeMaker.instance(ctx);
  137.53 +        Symtab syms = Symtab.instance(ctx);
  137.54 +
  137.55 +        String stringTree = printTree(treeMaker.QualIdent(syms.stringType.tsym));
  137.56 +
  137.57 +        if (!"java.lang.String".equals(stringTree)) {
  137.58 +            throw new IllegalStateException(stringTree);
  137.59 +        }
  137.60 +    }
  137.61 +
  137.62 +    private static String printTree(Tree tree) {
  137.63 +        final StringBuilder result = new StringBuilder();
  137.64 +
  137.65 +        new TreeScanner<Void, Void>() {
  137.66 +            @Override public Void visitIdentifier(IdentifierTree node, Void p) {
  137.67 +                result.append(node.getName());
  137.68 +                return super.visitIdentifier(node, p);
  137.69 +            }
  137.70 +            @Override public Void visitMemberSelect(MemberSelectTree node, Void p) {
  137.71 +                scan(node.getExpression(), null);
  137.72 +                result.append(".");
  137.73 +                result.append(node.getIdentifier());
  137.74 +                return null;
  137.75 +            }
  137.76 +        }.scan(tree, null);
  137.77 +
  137.78 +        return result.toString();
  137.79 +    }
  137.80 +}
   138.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
   138.2 +++ b/test/tools/javac/tree/ScopeTest.java	Thu Sep 26 17:23:00 2013 -0700
   138.3 @@ -0,0 +1,114 @@
   138.4 +/*
   138.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
   138.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   138.7 + *
   138.8 + * This code is free software; you can redistribute it and/or modify it
   138.9 + * under the terms of the GNU General Public License version 2 only, as
  138.10 + * published by the Free Software Foundation.
  138.11 + *
  138.12 + * This code is distributed in the hope that it will be useful, but WITHOUT
  138.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  138.14 + * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  138.15 + * version 2 for more details (a copy is included in the LICENSE file that
  138.16 + * accompanied this code).
  138.17 + *
  138.18 + * You should have received a copy of the GNU General Public License version
  138.19 + * 2 along with this work; if not, write to the Free Software Foundation,
  138.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  138.21 + *
  138.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  138.23 + * or visit www.oracle.com if you need additional information or have any
  138.24 + * questions.
  138.25 + */
  138.26 +
  138.27 +/*
  138.28 + * @test
  138.29 + * @bug     8023835
  138.30 + * @summary Verify that implicit type of lambda parameter is correctly attributed
  138.31 + *          in Scope
  138.32 + * @run main ScopeTest
  138.33 + */
  138.34 +
  138.35 +import com.sun.source.tree.CompilationUnitTree;
  138.36 +import com.sun.source.tree.MemberSelectTree;
  138.37 +import com.sun.source.tree.Scope;
  138.38 +import com.sun.source.util.JavacTask;
  138.39 +import com.sun.source.util.TreePath;
  138.40 +import com.sun.source.util.TreePathScanner;
  138.41 +import com.sun.source.util.Trees;
  138.42 +import com.sun.tools.javac.api.JavacTaskImpl;
  138.43 +import com.sun.tools.javac.api.JavacTool;
  138.44 +import com.sun.tools.javac.model.JavacTypes;
  138.45 +import java.io.IOException;
  138.46 +import java.net.URI;
  138.47 +import java.util.ArrayList;
  138.48 +import java.util.Collections;
  138.49 +import javax.lang.model.element.Element;
  138.50 +import javax.lang.model.type.TypeMirror;
  138.51 +import javax.lang.model.util.Types;
  138.52 +import javax.tools.JavaFileObject;
  138.53 +import javax.tools.JavaFileObject.Kind;
  138.54 +import javax.tools.SimpleJavaFileObject;
  138.55 +
  138.56 +public class ScopeTest {
  138.57 +
  138.58 +    private static final String SOURCE_CODE =
  138.59 +            "public class Test {\n" +
  138.60 +            "    private static void test() {\n" +
  138.61 +            "        InvokeOn f = null;\n" +
  138.62 +            "        f.run(x -> { x.correct(); });\n" +
  138.63 +            "    }\n" +
  138.64 +            "    public static final class FooBar {\n" +
  138.65 +            "        public void dontRun() { }\n" +
  138.66 +            "    }\n" +
  138.67 +            "}\n" +
  138.68 +            "class InvokeOn {\n" +
  138.69 +            "    public void run(I i) { }\n" +
  138.70 +            "}\n" +
  138.71 +            "class FooBar {\n" +
  138.72 +            "    public void correct() { }\n" +
  138.73 +            "}\n" +
  138.74 +            "interface I {\n" +
  138.75 +            "    public void run(FooBar f);\n" +
  138.76 +            "}";
  138.77 +
  138.78 +    public static void main(String... args) throws Exception {
  138.79 +        verifyLambdaScopeCorrect("");
  138.80 +        verifyLambdaScopeCorrect("package test;");
  138.81 +    }
  138.82 +
  138.83 +    private static void verifyLambdaScopeCorrect(final String packageClause) throws Exception {
  138.84 +        JavacTool tool = JavacTool.create();
  138.85 +        JavaFileObject source = new SimpleJavaFileObject(URI.create("mem://Test.java"), Kind.SOURCE) {
  138.86 +            @Override public CharSequence getCharContent(boolean ignoreEncodingErrors) throws IOException {
  138.87 +                return packageClause + SOURCE_CODE;
  138.88 +            }
  138.89 +            @Override public boolean isNameCompatible(String simpleName, Kind kind) {
  138.90 +                return true;
  138.91 +            }
  138.92 +        };
  138.93 +        Iterable<? extends JavaFileObject> fos = Collections.singletonList(source);
  138.94 +        JavacTask task = tool.getTask(null, null, null, new ArrayList<String>(), null, fos);
  138.95 +        final Types types = JavacTypes.instance(((JavacTaskImpl) task).getContext());
  138.96 +        final Trees trees = Trees.instance(task);
  138.97 +        CompilationUnitTree cu = task.parse().iterator().next();
  138.98 +
  138.99 +        task.analyze();
 138.100 +
 138.101 +        new TreePathScanner<Void, Void>() {
 138.102 +            @Override public Void visitMemberSelect(MemberSelectTree node, Void p) {
 138.103 +                if (node.getIdentifier().contentEquals("correct")) {
 138.104 +                    TypeMirror xType = trees.getTypeMirror(new TreePath(getCurrentPath(), node.getExpression()));
 138.105 +                    Scope scope = trees.getScope(getCurrentPath());
 138.106 +                    for (Element l : scope.getLocalElements()) {
 138.107 +                        if (!l.getSimpleName().contentEquals("x")) continue;
 138.108 +                        if (!types.isSameType(xType, l.asType())) {
 138.109 +                            throw new IllegalStateException("Incorrect variable type in scope: " + l.asType() + "; should be: " + xType);
 138.110 +                        }
 138.111 +                    }
 138.112 +                }
 138.113 +                return super.visitMemberSelect(node, p);
 138.114 +            }
 138.115 +        }.scan(cu, null);
 138.116 +    }
 138.117 +}
   139.1 --- a/test/tools/javac/types/TypeHarness.java	Thu Sep 26 10:43:55 2013 -0700
   139.2 +++ b/test/tools/javac/types/TypeHarness.java	Thu Sep 26 17:23:00 2013 -0700
   139.3 @@ -213,8 +213,8 @@
   139.4  
   139.5      /** compute a type substitution on 't' given a list of type mappings */
   139.6      public Type subst(Type t, Mapping... maps) {
   139.7 -        ListBuffer<Type> from = ListBuffer.lb();
   139.8 -        ListBuffer<Type> to = ListBuffer.lb();
   139.9 +        ListBuffer<Type> from = new ListBuffer<>();
  139.10 +        ListBuffer<Type> to = new ListBuffer<>();
  139.11          for (Mapping tm : maps) {
  139.12              from.append(tm.from);
  139.13              to.append(tm.to);
   140.1 --- a/test/tools/javac/warnings/6747671/T6747671.java	Thu Sep 26 10:43:55 2013 -0700
   140.2 +++ b/test/tools/javac/warnings/6747671/T6747671.java	Thu Sep 26 17:23:00 2013 -0700
   140.3 @@ -1,6 +1,6 @@
   140.4  /**
   140.5   * @test /nodynamiccopyright/
   140.6 - * @bug 6747671
   140.7 + * @bug 6747671 8022567
   140.8   * @summary -Xlint:rawtypes
   140.9   * @compile/ref=T6747671.out -XDrawDiagnostics -Xlint:rawtypes T6747671.java
  140.10   */
  140.11 @@ -32,4 +32,11 @@
  140.12          A a2 = new A() {};//raw warning (2)
  140.13          a2.new Z() {};//raw warning
  140.14      }
  140.15 +
  140.16 +    @TA B @TA[] arr = new @TA B @TA [0];//JDK-8022567: raw warning (2)
  140.17 +    Class<B[]> classes1;//no warning
  140.18 +    Class<B>[] classes2;//no warning
  140.19 +
  140.20 +    @java.lang.annotation.Target(java.lang.annotation.ElementType.TYPE_USE)
  140.21 +    @interface TA { }
  140.22  }
   141.1 --- a/test/tools/javac/warnings/6747671/T6747671.out	Thu Sep 26 10:43:55 2013 -0700
   141.2 +++ b/test/tools/javac/warnings/6747671/T6747671.out	Thu Sep 26 17:23:00 2013 -0700
   141.3 @@ -7,4 +7,6 @@
   141.4  T6747671.java:32:9: compiler.warn.raw.class.use: T6747671.A, T6747671<E>.A<X>
   141.5  T6747671.java:32:20: compiler.warn.raw.class.use: T6747671.A, T6747671<E>.A<X>
   141.6  T6747671.java:33:16: compiler.warn.raw.class.use: T6747671.A.Z, T6747671<E>.A<X>.Z<Y>
   141.7 -9 warnings
   141.8 +T6747671.java:36:9: compiler.warn.raw.class.use: @T6747671.TA T6747671.B, T6747671.B<X>
   141.9 +T6747671.java:36:27: compiler.warn.raw.class.use: T6747671.B, T6747671.B<X>
  141.10 +11 warnings

mercurial