8025633: Fix javadoc to generate valid anchor names
authorbpatel
Thu, 10 Oct 2013 10:51:15 -0700
changeset 21008 af0b915df7cc
parent 21007 484c9d902861
child 21009 b35973e2d42e
8025633: Fix javadoc to generate valid anchor names Reviewed-by: jjg
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java
langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java
langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java
langtools/test/com/sun/javadoc/testAnchorNames/pkg1/DeprMemClass.java
langtools/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java
langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java
langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java
langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java
langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java
langtools/test/com/sun/javadoc/testHref/TestHref.java
langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java
langtools/test/com/sun/javadoc/testInterface/TestInterface.java
langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java
langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java
langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java
langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java
langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java
langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java
langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java
langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java
langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -305,6 +305,6 @@
             buf.append(t.dimension());
         }
         buf.append(")");
-        return foundTypeVariable ? buf.toString() : null;
+        return foundTypeVariable ? writer.getName(buf.toString()) : null;
     }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -89,10 +89,11 @@
      * @param memberlist List of members for the unicode character
      * @param contentTree the content tree to which the information will be added
      */
-    protected void addContents(Character unicode, List<? extends Doc> memberlist,
+    protected void addContents(Character uc, List<? extends Doc> memberlist,
             Content contentTree) {
-        contentTree.addContent(getMarkerAnchor("_" + unicode + "_"));
-        Content headContent = new StringContent(unicode.toString());
+        String unicode = uc.toString();
+        contentTree.addContent(getMarkerAnchorForIndex(unicode));
+        Content headContent = new StringContent(unicode);
         Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false,
                 HtmlStyle.title, headContent);
         contentTree.addContent(heading);
@@ -253,4 +254,24 @@
         addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing,
                 false, contentTree);
     }
+
+    /**
+     * Get the marker anchor which will be added to the index documentation tree.
+     *
+     * @param anchorNameForIndex the anchor name attribute for index page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchorForIndex(String anchorNameForIndex) {
+        return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null);
+    }
+
+    /**
+     * Generate a valid HTML name for member index page.
+     *
+     * @param unicode the string that needs to be converted to valid HTML name.
+     * @return a valid HTML name string.
+     */
+    public String getNameForIndex(String unicode) {
+        return "I:" + getName(unicode);
+    }
 }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -88,7 +88,7 @@
             Content memberDetailsTree) {
         if (!writer.printedAnnotationFieldHeading) {
             memberDetailsTree.addContent(writer.getMarkerAnchor(
-                    "annotation_type_field_detail"));
+                    SectionName.ANNOTATION_TYPE_FIELD_DETAIL));
             Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                     writer.fieldDetailsLabel);
             memberDetailsTree.addContent(heading);
@@ -217,7 +217,7 @@
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
         memberTree.addContent(writer.getMarkerAnchor(
-                "annotation_type_field_summary"));
+                SectionName.ANNOTATION_TYPE_FIELD_SUMMARY));
     }
 
     /**
@@ -272,7 +272,8 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("annotation_type_field_summary",
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_FIELD_SUMMARY,
                     writer.getResource("doclet.navField"));
         } else {
             return writer.getResource("doclet.navField");
@@ -284,7 +285,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("annotation_type_field_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_FIELD_DETAIL,
                     writer.getResource("doclet.navField")));
         } else {
             liNav.addContent(writer.getResource("doclet.navField"));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -133,7 +133,7 @@
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
         memberTree.addContent(writer.getMarkerAnchor(
-                "annotation_type_optional_element_summary"));
+                SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY));
     }
 
     /**
@@ -141,7 +141,8 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("annotation_type_optional_element_summary",
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY,
                     writer.getResource("doclet.navAnnotationTypeOptionalMember"));
         } else {
             return writer.getResource("doclet.navAnnotationTypeOptionalMember");
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -89,7 +89,7 @@
             Content memberDetailsTree) {
         if (!writer.printedAnnotationHeading) {
             memberDetailsTree.addContent(writer.getMarkerAnchor(
-                    "annotation_type_element_detail"));
+                    SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL));
             Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                     writer.annotationTypeDetailsLabel);
             memberDetailsTree.addContent(heading);
@@ -219,7 +219,7 @@
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
         memberTree.addContent(writer.getMarkerAnchor(
-                "annotation_type_required_element_summary"));
+                SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY));
     }
 
     /**
@@ -274,7 +274,8 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("annotation_type_required_element_summary",
+            return writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY,
                     writer.getResource("doclet.navAnnotationTypeRequiredMember"));
         } else {
             return writer.getResource("doclet.navAnnotationTypeRequiredMember");
@@ -286,7 +287,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("annotation_type_element_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL,
                     writer.getResource("doclet.navAnnotationTypeMember")));
         } else {
             liNav.addContent(writer.getResource("doclet.navAnnotationTypeMember"));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -107,7 +107,8 @@
         //add link to summary
         Content link;
         if (packageName.length() == 0) {
-            link = getHyperLink(DocLink.fragment(DocletConstants.UNNAMED_PACKAGE_ANCHOR),
+            link = getHyperLink(getDocLink(
+                    SectionName.UNNAMED_PACKAGE_ANCHOR),
                     defaultPackageLabel, "", "");
         } else {
             Content packageNameContent = getPackageLabel(parsedPackageName);
@@ -153,7 +154,7 @@
         Content pkgNameContent;
         if (parsedPackageName.length() == 0) {
             summariesTree.addContent(getMarkerAnchor(
-                    DocletConstants.UNNAMED_PACKAGE_ANCHOR));
+                    SectionName.UNNAMED_PACKAGE_ANCHOR));
             pkgNameContent = defaultPackageLabel;
         } else {
             summariesTree.addContent(getMarkerAnchor(
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -97,7 +97,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS);
         Content constructorDetailsTree = writer.getMemberTreeHeader();
-        constructorDetailsTree.addContent(writer.getMarkerAnchor("constructor_detail"));
+        constructorDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.CONSTRUCTOR_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.constructorDetailsLabel);
         constructorDetailsTree.addContent(heading);
@@ -256,7 +257,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("constructor_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.CONSTRUCTOR_SUMMARY));
     }
 
     /**
@@ -280,7 +282,7 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink("constructor_summary",
+            return writer.getHyperLink(SectionName.CONSTRUCTOR_SUMMARY,
                     writer.getResource("doclet.navConstructor"));
         } else {
             return writer.getResource("doclet.navConstructor");
@@ -292,7 +294,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("constructor_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.CONSTRUCTOR_DETAIL,
                     writer.getResource("doclet.navConstructor")));
         } else {
             liNav.addContent(writer.getResource("doclet.navConstructor"));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -48,8 +48,8 @@
 
     private static final String[] ANCHORS = new String[] {
         "package", "interface", "class", "enum", "exception", "error",
-        "annotation_type", "field", "method", "constructor", "enum_constant",
-        "annotation_type_member"
+        "annotation.type", "field", "method", "constructor", "enum.constant",
+        "annotation.type.member"
     };
 
     private static final String[] HEADING_KEYS = new String[] {
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -73,7 +73,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS);
         Content enumConstantsDetailsTree = writer.getMemberTreeHeader();
-        enumConstantsDetailsTree.addContent(writer.getMarkerAnchor("enum_constant_detail"));
+        enumConstantsDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.ENUM_CONSTANT_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.enumConstantsDetailsLabel);
         enumConstantsDetailsTree.addContent(heading);
@@ -202,7 +203,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("enum_constant_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.ENUM_CONSTANT_SUMMARY));
     }
 
     /**
@@ -263,11 +265,14 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "enum_constant_summary":
-                "enum_constants_inherited_from_class_" +
-                configuration.getClassName(cd),
-                writer.getResource("doclet.navEnum"));
+            if (cd == null) {
+                return writer.getHyperLink(SectionName.ENUM_CONSTANT_SUMMARY,
+                        writer.getResource("doclet.navEnum"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.ENUM_CONSTANTS_INHERITANCE,
+                        configuration.getClassName(cd), writer.getResource("doclet.navEnum"));
+            }
         } else {
             return writer.getResource("doclet.navEnum");
         }
@@ -278,7 +283,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("enum_constant_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.ENUM_CONSTANT_DETAIL,
                     writer.getResource("doclet.navEnum")));
         } else {
             liNav.addContent(writer.getResource("doclet.navEnum"));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -74,7 +74,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS);
         Content fieldDetailsTree = writer.getMemberTreeHeader();
-        fieldDetailsTree.addContent(writer.getMarkerAnchor("field_detail"));
+        fieldDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.FIELD_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.fieldDetailsLabel);
         fieldDetailsTree.addContent(heading);
@@ -224,7 +225,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("field_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.FIELD_SUMMARY));
     }
 
     /**
@@ -232,7 +234,7 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "fields_inherited_from_class_" + configuration.getClassName(cd)));
+                SectionName.FIELDS_INHERITANCE, configuration.getClassName(cd)));
     }
 
     /**
@@ -293,11 +295,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "field_summary":
-                "fields_inherited_from_class_" +
-                configuration.getClassName(cd),
-                writer.getResource("doclet.navField"));
+            if (cd == null) {
+                return writer.getHyperLink(
+                        SectionName.FIELD_SUMMARY,
+                        writer.getResource("doclet.navField"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.FIELDS_INHERITANCE,
+                        configuration.getClassName(cd), writer.getResource("doclet.navField"));
+            }
         } else {
             return writer.getResource("doclet.navField");
         }
@@ -308,7 +314,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("field_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.FIELD_DETAIL,
                     writer.getResource("doclet.navField")));
         } else {
             liNav.addContent(writer.getResource("doclet.navField"));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -509,28 +509,28 @@
                 body.addContent(HtmlConstants.START_OF_TOP_NAVBAR);
                 navDiv.addStyle(HtmlStyle.topNav);
                 allClassesId += "navbar_top";
-                Content a = getMarkerAnchor("navbar_top");
+                Content a = getMarkerAnchor(SectionName.NAVBAR_TOP);
                 //WCAG - Hyperlinks should contain text or an image with alt text - for AT tools
                 navDiv.addContent(a);
                 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink(
-                    DocLink.fragment("skip-navbar_top"), skipNavLinks,
+                    getDocLink(SectionName.SKIP_NAVBAR_TOP), skipNavLinks,
                     skipNavLinks.toString(), ""));
                 navDiv.addContent(skipLinkContent);
             } else {
                 body.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR);
                 navDiv.addStyle(HtmlStyle.bottomNav);
                 allClassesId += "navbar_bottom";
-                Content a = getMarkerAnchor("navbar_bottom");
+                Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM);
                 navDiv.addContent(a);
                 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink(
-                    DocLink.fragment("skip-navbar_bottom"), skipNavLinks,
+                    getDocLink(SectionName.SKIP_NAVBAR_BOTTOM), skipNavLinks,
                     skipNavLinks.toString(), ""));
                 navDiv.addContent(skipLinkContent);
             }
             if (header) {
-                navDiv.addContent(getMarkerAnchor("navbar_top_firstrow"));
+                navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_TOP_FIRSTROW));
             } else {
-                navDiv.addContent(getMarkerAnchor("navbar_bottom_firstrow"));
+                navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_BOTTOM_FIRSTROW));
             }
             HtmlTree navList = new HtmlTree(HtmlTag.UL);
             navList.addStyle(HtmlStyle.navList);
@@ -577,11 +577,11 @@
             subDiv.addContent(getAllClassesLinkScript(allClassesId.toString()));
             addSummaryDetailLinks(subDiv);
             if (header) {
-                subDiv.addContent(getMarkerAnchor("skip-navbar_top"));
+                subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP));
                 body.addContent(subDiv);
                 body.addContent(HtmlConstants.END_OF_TOP_NAVBAR);
             } else {
-                subDiv.addContent(getMarkerAnchor("skip-navbar_bottom"));
+                subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM));
                 body.addContent(subDiv);
                 body.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR);
             }
@@ -886,7 +886,28 @@
      * @return a content tree for the marker anchor
      */
     public Content getMarkerAnchor(String anchorName) {
-        return getMarkerAnchor(anchorName, null);
+        return getMarkerAnchor(getName(anchorName), null);
+    }
+
+    /**
+     * Get the marker anchor which will be added to the documentation tree.
+     *
+     * @param sectionName the section name anchor attribute for page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchor(SectionName sectionName) {
+        return getMarkerAnchor(sectionName.getName(), null);
+    }
+
+    /**
+     * Get the marker anchor which will be added to the documentation tree.
+     *
+     * @param sectionName the section name anchor attribute for page
+     * @param anchorName the anchor name combined with section name attribute for the page
+     * @return a content tree for the marker anchor
+     */
+    public Content getMarkerAnchor(SectionName sectionName, String anchorName) {
+        return getMarkerAnchor(sectionName.getName() + getName(anchorName), null);
     }
 
     /**
@@ -1291,10 +1312,10 @@
         } else if (doc instanceof ExecutableMemberDoc) {
             ExecutableMemberDoc emd = (ExecutableMemberDoc)doc;
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(getAnchor(emd, isProperty)).strong(strong));
+                .label(label).where(getName(getAnchor(emd, isProperty))).strong(strong));
         } else if (doc instanceof MemberDoc) {
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(doc.name()).strong(strong));
+                .label(label).where(getName(doc.name())).strong(strong));
         } else {
             return label;
         }
@@ -1319,10 +1340,10 @@
         } else if (doc instanceof ExecutableMemberDoc) {
             ExecutableMemberDoc emd = (ExecutableMemberDoc) doc;
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(getAnchor(emd)));
+                .label(label).where(getName(getAnchor(emd))));
         } else if (doc instanceof MemberDoc) {
             return getLink(new LinkInfoImpl(configuration, context, classDoc)
-                .label(label).where(doc.name()));
+                .label(label).where(getName(doc.name())));
         } else {
             return label;
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -49,8 +49,6 @@
         implements SerializedFormWriter.SerialFieldWriter {
     ProgramElementDoc[] members = null;
 
-    private boolean printedOverallAnchor = false;
-
     public HtmlSerialFieldWriter(SubWriterHolderWriter writer,
                                     ClassDoc classdoc) {
         super(writer, classdoc);
@@ -98,10 +96,6 @@
         HtmlTree li = new HtmlTree(HtmlTag.LI);
         li.addStyle(HtmlStyle.blockList);
         if (serializableFieldsTree.isValid()) {
-            if (!printedOverallAnchor) {
-                li.addContent(writer.getMarkerAnchor("serializedForm"));
-                printedOverallAnchor = true;
-            }
             Content headingContent = new StringContent(heading);
             Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
                     headingContent);
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -85,12 +85,10 @@
      * @return a content tree for the serializable methods content
      */
     public Content getSerializableMethods(String heading, Content serializableMethodContent) {
-        Content li = HtmlTree.LI(HtmlStyle.blockList, writer.getMarkerAnchor(
-                "serialized_methods"));
         Content headingContent = new StringContent(heading);
         Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING,
                 headingContent);
-        li.addContent(serialHeading);
+        Content li = HtmlTree.LI(HtmlStyle.blockList, serialHeading);
         li.addContent(serializableMethodContent);
         return li;
     }
@@ -113,8 +111,6 @@
      * @param methodsContentTree the content tree to which the member header will be added
      */
     public void addMemberHeader(MethodDoc member, Content methodsContentTree) {
-        methodsContentTree.addContent(writer.getMarkerAnchor(
-                writer.getAnchor(member)));
         methodsContentTree.addContent(getHead(member));
         methodsContentTree.addContent(getSignature(member));
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -85,7 +85,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS);
         Content methodDetailsTree = writer.getMemberTreeHeader();
-        methodDetailsTree.addContent(writer.getMarkerAnchor("method_detail"));
+        methodDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.METHOD_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.methodDetailsLabel);
         methodDetailsTree.addContent(heading);
@@ -244,7 +245,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("method_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.METHOD_SUMMARY));
     }
 
     /**
@@ -252,8 +254,7 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "methods_inherited_from_class_" +
-                configuration.getClassName(cd)));
+                SectionName.METHODS_INHERITANCE, configuration.getClassName(cd)));
     }
 
     /**
@@ -318,7 +319,7 @@
             Content methlink = writer.getLink(
                     new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER,
                     overriddenType.asClassDoc())
-                    .where(writer.getAnchor(method)).label(name));
+                    .where(writer.getName(writer.getAnchor(method))).label(name));
             Content codeMethLink = HtmlTree.CODE(methlink);
             Content dd = HtmlTree.DD(codeMethLink);
             dd.addContent(writer.getSpace());
@@ -400,11 +401,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "method_summary":
-                "methods_inherited_from_class_" +
-                configuration.getClassName(cd),
-                writer.getResource("doclet.navMethod"));
+            if (cd == null) {
+                return writer.getHyperLink(
+                        SectionName.METHOD_SUMMARY,
+                        writer.getResource("doclet.navMethod"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.METHODS_INHERITANCE,
+                        configuration.getClassName(cd), writer.getResource("doclet.navMethod"));
+            }
         } else {
             return writer.getResource("doclet.navMethod");
         }
@@ -415,8 +420,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("method_detail",
-                    writer.getResource("doclet.navMethod")));
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.METHOD_DETAIL, writer.getResource("doclet.navMethod")));
         } else {
             liNav.addContent(writer.getResource("doclet.navMethod"));
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -132,7 +132,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("nested_class_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.NESTED_CLASS_SUMMARY));
     }
 
     /**
@@ -140,7 +141,8 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "nested_classes_inherited_from_class_" + cd.qualifiedName()));
+                SectionName.NESTED_CLASSES_INHERITANCE,
+                cd.qualifiedName()));
     }
 
     /**
@@ -202,9 +204,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null) ? "nested_class_summary":
-                "nested_classes_inherited_from_class_" + cd.qualifiedName(),
-                writer.getResource("doclet.navNested"));
+            if (cd == null) {
+                return writer.getHyperLink(
+                        SectionName.NESTED_CLASS_SUMMARY,
+                        writer.getResource("doclet.navNested"));
+            } else {
+                return writer.getHyperLink(
+                        SectionName.NESTED_CLASSES_INHERITANCE,
+                        cd.qualifiedName(), writer.getResource("doclet.navNested"));
+            }
         } else {
             return writer.getResource("doclet.navNested");
         }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -203,8 +203,9 @@
             Content see = seeLabel;
             see.addContent(" ");
             Content descPara = HtmlTree.P(see);
-            Content descLink = getHyperLink(DocLink.fragment("overview_description"),
-                descriptionLabel, "", "");
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.OVERVIEW_DESCRIPTION),
+                    descriptionLabel, "", "");
             descPara.addContent(descLink);
             div.addContent(descPara);
             body.addContent(div);
@@ -220,7 +221,8 @@
      */
     protected void addOverviewComment(Content htmltree) {
         if (root.inlineTags().length > 0) {
-            htmltree.addContent(getMarkerAnchor("overview_description"));
+            htmltree.addContent(
+                    getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION));
             addInlineComment(root, htmltree);
         }
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -112,7 +112,8 @@
             addSummaryComment(packageDoc, docSummaryDiv);
             div.addContent(docSummaryDiv);
             Content space = getSpace();
-            Content descLink = getHyperLink(DocLink.fragment("package_description"),
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.PACKAGE_DESCRIPTION),
                     descriptionLabel, "", "");
             Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
             div.addContent(descPara);
@@ -211,7 +212,8 @@
      */
     public void addPackageDescription(Content packageContentTree) {
         if (packageDoc.inlineTags().length > 0) {
-            packageContentTree.addContent(getMarkerAnchor("package_description"));
+            packageContentTree.addContent(
+                    getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION));
             Content h2Content = new StringContent(
                     configuration.getText("doclet.Package_Description",
                     packageDoc.name()));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -129,7 +129,8 @@
             addSummaryComment(packageDoc, docSummaryDiv);
             div.addContent(docSummaryDiv);
             Content space = getSpace();
-            Content descLink = getHyperLink(DocLink.fragment("package_description"),
+            Content descLink = getHyperLink(getDocLink(
+                    SectionName.PACKAGE_DESCRIPTION),
                     descriptionLabel, "", "");
             Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink);
             div.addContent(descPara);
@@ -192,7 +193,8 @@
      */
     public void addPackageDescription(Content packageContentTree) {
         if (packageDoc.inlineTags().length > 0) {
-            packageContentTree.addContent(getMarkerAnchor("package_description"));
+            packageContentTree.addContent(
+                    getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION));
             Content h2Content = new StringContent(
                     configuration.getText("doclet.Package_Description",
                     packageDoc.name()));
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java	Thu Oct 10 10:51:15 2013 -0700
@@ -70,7 +70,8 @@
             Content memberDetailsTree) {
         memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS);
         Content propertyDetailsTree = writer.getMemberTreeHeader();
-        propertyDetailsTree.addContent(writer.getMarkerAnchor("property_detail"));
+        propertyDetailsTree.addContent(writer.getMarkerAnchor(
+                SectionName.PROPERTY_DETAIL));
         Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING,
                 writer.propertyDetailsLabel);
         propertyDetailsTree.addContent(heading);
@@ -220,7 +221,8 @@
      * {@inheritDoc}
      */
     public void addSummaryAnchor(ClassDoc cd, Content memberTree) {
-        memberTree.addContent(writer.getMarkerAnchor("property_summary"));
+        memberTree.addContent(writer.getMarkerAnchor(
+                SectionName.PROPERTY_SUMMARY));
     }
 
     /**
@@ -228,7 +230,8 @@
      */
     public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) {
         inheritedTree.addContent(writer.getMarkerAnchor(
-                "properties_inherited_from_class_" + configuration.getClassName(cd)));
+                SectionName.PROPERTIES_INHERITANCE,
+                configuration.getClassName(cd)));
     }
 
     /**
@@ -297,11 +300,15 @@
      */
     protected Content getNavSummaryLink(ClassDoc cd, boolean link) {
         if (link) {
-            return writer.getHyperLink((cd == null)?
-                "property_summary":
-                "properties_inherited_from_class_" +
-                configuration.getClassName(cd),
+            if (cd == null) {
+                return writer.getHyperLink(
+                SectionName.PROPERTY_SUMMARY,
                 writer.getResource("doclet.navProperty"));
+            } else {
+                return writer.getHyperLink(
+                SectionName.PROPERTIES_INHERITANCE,
+                configuration.getClassName(cd), writer.getResource("doclet.navProperty"));
+            }
         } else {
             return writer.getResource("doclet.navProperty");
         }
@@ -312,7 +319,8 @@
      */
     protected void addNavDetailLink(boolean link, Content liNav) {
         if (link) {
-            liNav.addContent(writer.getHyperLink("property_detail",
+            liNav.addContent(writer.getHyperLink(
+                    SectionName.PROPERTY_DETAIL,
                     writer.getResource("doclet.navProperty")));
         } else {
             liNav.addContent(writer.getResource("doclet.navProperty"));
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java	Thu Oct 10 10:51:15 2013 -0700
@@ -0,0 +1,80 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.  Oracle designates this
+ * particular file as subject to the "Classpath" exception as provided
+ * by Oracle in the LICENSE file that accompanied this code.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package com.sun.tools.doclets.formats.html;
+
+/**
+ * Enum representing various section names of generated API documentation.
+ *
+ *  <p><b>This is NOT part of any supported API.
+ *  If you write code that depends on this, you do so at your own risk.
+ *  This code and its internal interfaces are subject to change or
+ *  deletion without notice.</b>
+ *
+ * @author Bhavesh Patel
+ */
+public enum SectionName {
+
+    ANNOTATION_TYPE_ELEMENT_DETAIL("annotation.type.element.detail"),
+    ANNOTATION_TYPE_FIELD_DETAIL("annotation.type.field.detail"),
+    ANNOTATION_TYPE_FIELD_SUMMARY("annotation.type.field.summary"),
+    ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY("annotation.type.optional.element.summary"),
+    ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY("annotation.type.required.element.summary"),
+    CONSTRUCTOR_DETAIL("constructor.detail"),
+    CONSTRUCTOR_SUMMARY("constructor.summary"),
+    ENUM_CONSTANT_DETAIL("enum.constant.detail"),
+    ENUM_CONSTANTS_INHERITANCE("enum.constants.inherited.from.class."),
+    ENUM_CONSTANT_SUMMARY("enum.constant.summary"),
+    FIELD_DETAIL("field.detail"),
+    FIELDS_INHERITANCE("fields.inherited.from.class."),
+    FIELD_SUMMARY("field.summary"),
+    METHOD_DETAIL("method.detail"),
+    METHODS_INHERITANCE("methods.inherited.from.class."),
+    METHOD_SUMMARY("method.summary"),
+    NAVBAR_BOTTOM("navbar.bottom"),
+    NAVBAR_BOTTOM_FIRSTROW("navbar.bottom.firstrow"),
+    NAVBAR_TOP("navbar.top"),
+    NAVBAR_TOP_FIRSTROW("navbar.top.firstrow"),
+    NESTED_CLASSES_INHERITANCE("nested.classes.inherited.from.class."),
+    NESTED_CLASS_SUMMARY("nested.class.summary"),
+    OVERVIEW_DESCRIPTION("overview.description"),
+    PACKAGE_DESCRIPTION("package.description"),
+    PROPERTY_DETAIL("property.detail"),
+    PROPERTIES_INHERITANCE("properties.inherited.from.class."),
+    PROPERTY_SUMMARY("property.summary"),
+    SKIP_NAVBAR_BOTTOM("skip.navbar.bottom"),
+    SKIP_NAVBAR_TOP("skip.navbar.top"),
+    UNNAMED_PACKAGE_ANCHOR("unnamed.package");
+
+    private final String value;
+
+    SectionName(String sName) {
+        this.value = sName;
+    }
+
+    public String getName() {
+        return this.value;
+    }
+}
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -115,7 +115,8 @@
         for (int i = 0; i < indexbuilder.elements().length; i++) {
             String unicode = (indexbuilder.elements())[i].toString();
             contentTree.addContent(
-                    getHyperLink("_" + unicode + "_", new StringContent(unicode)));
+                    getHyperLink(getNameForIndex(unicode),
+                    new StringContent(unicode)));
             contentTree.addContent(getSpace());
         }
     }
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Thu Oct 10 10:51:15 2013 -0700
@@ -30,6 +30,7 @@
 
 import com.sun.javadoc.*;
 import com.sun.tools.doclets.formats.html.ConfigurationImpl;
+import com.sun.tools.doclets.formats.html.SectionName;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.util.DocFile;
 import com.sun.tools.doclets.internal.toolkit.util.DocLink;
@@ -78,7 +79,7 @@
     }
 
     /**
-     * Get Html Hyper Link string.
+     * Get Html Hyper Link Content.
      *
      * @param where      Position of the link in the file. Character '#' is not
      *                   needed.
@@ -87,7 +88,125 @@
      */
     public Content getHyperLink(String where,
                                Content label) {
-        return getHyperLink(DocLink.fragment(where), label, "", "");
+        return getHyperLink(getDocLink(where), label, "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param sectionName      The section name to which the link will be created.
+     * @param label            Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(SectionName sectionName,
+                               Content label) {
+        return getHyperLink(getDocLink(sectionName), label, "", "");
+    }
+
+    /**
+     * Get Html Hyper Link Content.
+     *
+     * @param sectionName      The section name combined with where to which the link
+     *                         will be created.
+     * @param where            The fragment combined with sectionName to which the link
+     *                         will be created.
+     * @param label            Tag for the link.
+     * @return a content tree for the hyper link
+     */
+    public Content getHyperLink(SectionName sectionName, String where,
+                               Content label) {
+        return getHyperLink(getDocLink(sectionName, where), label, "", "");
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param where      Position of the link in the file.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(String where) {
+        return DocLink.fragment(getName(where));
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param sectionName      The section name to which the link will be created.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(SectionName sectionName) {
+        return DocLink.fragment(sectionName.getName());
+    }
+
+    /**
+     * Get the link.
+     *
+     * @param sectionName      The section name combined with where to which the link
+     *                         will be created.
+     * @param where            The fragment combined with sectionName to which the link
+     *                         will be created.
+     * @return a DocLink object for the hyper link
+     */
+    public DocLink getDocLink(SectionName sectionName, String where) {
+        return DocLink.fragment(sectionName.getName() + getName(where));
+    }
+
+    /**
+     * Convert the name to a valid HTML name.
+     *
+     * @param name the name that needs to be converted to valid HTML name.
+     * @return a valid HTML name string.
+     */
+    public String getName(String name) {
+        StringBuilder sb = new StringBuilder();
+        char ch;
+        /* The HTML 4 spec at http://www.w3.org/TR/html4/types.html#h-6.2 mentions
+         * that the name/id should begin with a letter followed by other valid characters.
+         * The HTML 5 spec (draft) is more permissive on names/ids where the only restriction
+         * is that it should be at least one character long and should not contain spaces.
+         * The spec draft is @ http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute.
+         *
+         * For HTML 4, we need to check for non-characters at the beginning of the name and
+         * substitute it accordingly, "_" and "$" can appear at the beginning of a member name.
+         * The method substitutes "$" with "Z:Z:D" and will prefix "_" with "Z:Z".
+         */
+        for (int i = 0; i < name.length(); i++) {
+            ch = name.charAt(i);
+            switch (ch) {
+                case '(':
+                case ')':
+                case '<':
+                case '>':
+                case ',':
+                    sb.append('-');
+                    break;
+                case ' ':
+                case '[':
+                    break;
+                case ']':
+                    sb.append(":A");
+                    break;
+                // Any appearance of $ needs to be substituted with ":D" and not with hyphen
+                // since a field name "P$$ and a method P(), both valid member names, can end
+                // up as "P--". A member name beginning with $ needs to be substituted with
+                // "Z:Z:D".
+                case '$':
+                    if (i == 0)
+                        sb.append("Z:Z");
+                    sb.append(":D");
+                    break;
+                // A member name beginning with _ needs to be prefixed with "Z:Z" since valid anchor
+                // names can only begin with a letter.
+                case '_':
+                    if (i == 0)
+                        sb.append("Z:Z");
+                    sb.append(ch);
+                    break;
+                default:
+                    sb.append(ch);
+            }
+        }
+        return sb.toString();
     }
 
     /**
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java	Thu Oct 10 10:51:15 2013 -0700
@@ -58,9 +58,4 @@
      * The default package file name.
      */
     public static final String DEFAULT_PACKAGE_FILE_NAME = "default";
-
-    /**
-     * The anchor for the default package.
-     */
-    public static final String UNNAMED_PACKAGE_ANCHOR = "unnamed_package";
 }
--- a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4638136 7198273
+ * @bug 4638136 7198273 8025633
  * @summary  Add ability to skip over nav bar for accessibility
  * @author dkramer
  * @run main AccessSkipNav
@@ -86,20 +86,20 @@
             // Testing only for the presence of the <a href> and <a name>
 
             // Top navbar <a href>
-            { "<a href=\"#skip-navbar_top\" title=\"Skip navigation links\">Skip navigation links</a>",
+            { "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" },
 
             // Top navbar <a name>
-            { "<a name=\"skip-navbar_top\">" + LS +
+            { "<a name=\"skip.navbar.top\">" + LS +
                       "<!--   -->" + LS + "</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" },
 
             // Bottom navbar <a href>
-            { "<a href=\"#skip-navbar_bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
+            { "<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" },
 
             // Bottom navbar <a name>
-            { "<a name=\"skip-navbar_bottom\">" + LS +
+            { "<a name=\"skip.navbar.bottom\">" + LS +
                       "<!--   -->" + LS + "</a>",
                      TMPDEST_DIR1 + "p1" + FS + "C1.html" }
         };
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java	Thu Oct 10 10:51:15 2013 -0700
@@ -0,0 +1,290 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8025633
+ * @summary Test for valid name attribute in HTML anchors.
+ * @author Bhavesh Patel
+ * @library ../lib/
+ * @build JavadocTester TestAnchorNames
+ * @run main TestAnchorNames
+ */
+
+public class TestAnchorNames extends JavadocTester {
+
+    private static final String BUG_ID = "8025633";
+
+    //Input for string search tests.
+    private static final String[][] TEST = {
+
+        //Test some section markers and links to these markers
+
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"skip.navbar.top\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"nested.class.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#nested.class.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"method.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#method.summary\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"field.detail\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#field.detail\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"constructor.detail\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"#constructor.detail\">"
+        },
+
+        //Test some members and link to these members
+
+        //The marker for this appears in the serialized-form.html which we will
+        //test below
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../serialized-form.html#pkg1.RegClass\">"
+        },
+        //Test some fields
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z:D_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z:D_\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z:Dfield\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"fieldInCla:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"S_:D:D:D:D:DINT\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"method:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#method:D:D\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a name=\"Z:Z_field_In_Class\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">"
+        },
+        //Test constructor
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"RegClass-java.lang.String-int-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">"
+        },
+        //Test some methods
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_methodInClass-java.lang.String-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"method--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#method--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"foo-java.util.Map-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"methodInCla:Ds-java.lang.String:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"methodD-pkg1.RegClass.:DA-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a name=\"methodD-pkg1.RegClass.D:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a name=\"Z:Z:Dmethod_In_Class--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+            "<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">"
+        },
+
+        //Test enum
+
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html",
+            "<a name=\"Z:Z:DFLD2\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html",
+            "<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">"
+        },
+
+        //Test nested class
+
+        {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html",
+            "<a name=\"RegClass._NestedClas:D--\">"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html",
+            "<a href=\"../pkg1/RegClass._NestedClas$.html#RegClass._NestedClas:D--\">"
+        },
+
+        //Test class use page
+
+        {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "DeprMemClass.html",
+            "<a href=\"../../pkg1/RegClass.html#d____mc\">"
+        },
+
+        //Test deprecated list page
+
+        {BUG_ID + FS + "deprecated-list.html",
+            "<a href=\"pkg1/DeprMemClass.html#Z:Z_field_In_Class\">"
+        },
+        {BUG_ID + FS + "deprecated-list.html",
+            "<a href=\"pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">"
+        },
+
+        //Test constant values page
+
+        {BUG_ID + FS + "constant-values.html",
+            "<a href=\"pkg1/RegClass.html#S_:D:D:D:D:DINT\">"
+        },
+
+        //Test serialized form page
+
+        //This is the marker for the link that appears in the pkg1.RegClass.html page
+        {BUG_ID + FS + "serialized-form.html",
+            "<a name=\"pkg1.RegClass\">"
+        },
+
+        //Test member name index page
+
+        {BUG_ID + FS + "index-all.html",
+            "<a name=\"I:Z:Z:D\">"
+        },
+        {BUG_ID + FS + "index-all.html",
+            "<a href=\"#I:Z:Z:D\">$"
+        },
+        {BUG_ID + FS + "index-all.html",
+            "<a href=\"#I:Z:Z_\">_"
+        }
+    };
+
+    private static final String[][] NEGATED_TEST = {
+        //The marker name conversion should only affect HTML anchors. It should not
+        //affect the lables.
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " Z:Z_"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " Z:Z:Dfield"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " Z:Z_field_In_Class"
+        },
+        {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+            " S_:D:D:D:D:DINT"
+        },
+    };
+
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1"
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) throws Exception {
+        TestAnchorNames tester = new TestAnchorNames();
+        run(tester, ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/DeprMemClass.java	Thu Oct 10 10:51:15 2013 -0700
@@ -0,0 +1,45 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+public class DeprMemClass
+{
+    /**
+     * Field in the class.
+     * @deprecated Do not use this field.
+     */
+    public int _field_In_Class;
+
+    public int _fld;
+
+    /**
+     * Method in the class.
+     * @deprecated Do not use this method.
+     */
+    public void $method_In_Class() {
+    }
+
+    public void regularMethod() {
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java	Thu Oct 10 10:51:15 2013 -0700
@@ -0,0 +1,186 @@
+/*
+ * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
+ *
+ * This code is free software; you can redistribute it and/or modify it
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg1;
+
+import java.io.Serializable;
+import java.util.Map;
+
+/**
+ * @serial This is the serial tag's comment.
+ */
+public class RegClass implements Serializable {
+
+    /**
+     * Normal field in class.
+     */
+    public String field;
+
+    /**
+     * Normal field in class.
+     */
+    public String method$$;
+
+    /**
+     * Filed staring with $.
+     */
+    public String $field;
+
+    /**
+     * Filed staring with underscore.
+     */
+    public String _field;
+
+    /**
+     * Serial field
+     * @serial
+     */
+    public boolean t_e$t;
+
+    /**
+     * Field in class with a $ in the name.
+     */
+    public String fieldInCla$$;
+
+    /**
+     * Field name as just an underscore.
+     */
+    public int _;
+
+    /**
+     * Field name as just a $.
+     */
+    public int $;
+
+    /**
+     * Field name with underscore and $.
+     */
+    public int _$;
+
+    /**
+     * Field name with $ and underscore.
+     */
+    public int $_;
+
+    /**
+     * An array.
+     */
+    public int arr[];
+
+    /**
+     * Another array.
+     */
+    public int[] arr1;
+
+    /**
+     * A constant field.
+     */
+    public static final int S_$$$$$INT = 0;
+
+    /**
+     * Another field.
+     */
+    public DeprMemClass d____mc;
+
+    /**
+     * An enum.
+     */
+    public static enum Te$t_Enum {
+        FLD_1,
+        $FLD2
+    };
+
+    /**
+     * A constructor.
+     */
+    public RegClass(String p, int i) {
+    }
+
+    /**
+     * Method in Class.
+     * @param p a string
+     */
+    public void _methodInClass(String p) {
+    }
+
+    /**
+     * Method in Class.
+     * @param p a string
+     * @param i an int
+     */
+    public void _methodInClas$(String p, int i) {
+    }
+
+    /**
+     * Method with $ in the name.
+     * @param p a string array
+     */
+    public void methodInCla$s(String[] p) {
+    }
+
+    /**
+     * Method with D[] as a parameter.
+     * @param p an array of D
+     */
+    public void methodD(D[] p) {
+    }
+
+    /**
+     * Method with $A as a parameter.
+     * @param p an object of $A
+     */
+    public void methodD($A p) {
+    }
+
+    /**
+     * Serial test.
+     * @serialData This is a serial data comment.
+     * @return null
+     */
+    protected Object $readResolve(){return null;}
+
+    /**
+     * Simple method.
+     */
+    public void method() {}
+
+    /**
+     * Generics.
+     */
+    public static <A> void foo(Map<A, Map<A, A>> map) {}
+
+    /**
+     * A nested class.
+     */
+    public class _NestedClas$ {}
+
+    /**
+     * Nested class D.
+     */
+    class D {}
+
+    /**
+     * Nested class $A.
+     */
+    class $A {}
+}
--- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java	Thu Oct 10 10:51:15 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,8 @@
 
 /*
  * @test
- * @summary  Make sure that annotations types with optional elements has
+ * @bug 8025633
+ * @summary  Make sure that annotations types with optional elements have
  *           element headers
  * @author   Mahmood Ali
  * @library  ../lib/
@@ -45,7 +46,7 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "AnnotationOptional.html",
-            "<a name=\"annotation_type_element_detail\">"
+            "<a name=\"annotation.type.element.detail\">"
         }
     };
 
--- a/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4973609 8015249
+ * @bug      4973609 8015249 8025633
  * @summary  Make sure that annotation types with 0 members does not have
  *           extra HR tags.
  * @author   jamieh
@@ -45,11 +45,11 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
-            "<li>Summary:&nbsp;</li>" + NL + "<li><a href=\"#annotation_type_" +
-            "field_summary\">Field</a>&nbsp;|&nbsp;</li>"},
+            "<li>Summary:&nbsp;</li>" + NL + "<li><a href=\"#annotation.type." +
+            "field.summary\">Field</a>&nbsp;|&nbsp;</li>"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
-            "<li>Detail:&nbsp;</li>" + NL + "<li><a href=\"#annotation_type_" +
-            "field_detail\">Field</a>&nbsp;|&nbsp;</li>"},
+            "<li>Detail:&nbsp;</li>" + NL + "<li><a href=\"#annotation.type." +
+            "field.detail\">Field</a>&nbsp;|&nbsp;</li>"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
             "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"},
         {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
--- a/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4652655 4857717
+ * @bug 4652655 4857717 8025633
  * @summary This test verifies that class cross references work properly.
  * @author jamieh
  * @library ../lib/
@@ -45,7 +45,7 @@
             "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigDecimal.html?is-external=true\" " +
                 "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>"},
         {BUG_ID + FS + "C.html",
-            "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" " +
+            "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" " +
                 "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>"},
         {BUG_ID + FS + "C.html",
             "<dl>" + NL + "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
--- a/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,14 +23,13 @@
 
 /*
  * @test
- * @bug 4857717
+ * @bug 4857717 8025633
  * @summary Test to make sure that externally overriden and implemented methods
  * are documented properly.  The method should still include "implements" or
  * "overrides" documentation even though the method is external.
  * @author jamieh
  * @library ../lib/
- * @build JavadocTester
- * @build TestExternalOverridenMethod
+ * @build JavadocTester TestExternalOverridenMethod
  * @run main TestExternalOverridenMethod
  */
 
@@ -40,13 +39,13 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "XReader.html",
             "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read()\" " +
+            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read--\" " +
             "title=\"class or interface in java.io\">read</a></code>&nbsp;in class&nbsp;<code>" +
             "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true\" " +
             "title=\"class or interface in java.io\">FilterReader</a></code></dd>"},
         {BUG_ID + FS + "pkg" + FS + "XReader.html",
             "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt()\" " +
+            "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt--\" " +
             "title=\"class or interface in java.io\">readInt</a></code>&nbsp;in interface&nbsp;<code>" +
             "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true\" " +
             "title=\"class or interface in java.io\">DataInput</a></code></dd>"}};
--- a/langtools/test/com/sun/javadoc/testHref/TestHref.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testHref/TestHref.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4663254 8016328
+ * @bug      4663254 8016328 8025633
  * @summary  Verify that spaces do not appear in hrefs and anchors.
  * @author   jamieh
  * @library  ../lib/
@@ -46,31 +46,31 @@
     private static final String[][] TEST = {
         //External link.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\""
+            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\""
         },
         //Member summary table link.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\""
+            "href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\""
         },
         //Anchor test.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
+            "<a name=\"method-int-int-java.util.ArrayList-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
         //Backward compatibility anchor test.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "<a name=\"method(int, int, java.util.ArrayList)\">" + NL +
+            "<a name=\"method-int-int-java.util.ArrayList-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
         //{@link} test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "Link: <a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
+            "Link: <a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">"
         },
         //@see test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
+            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">"
         },
 
         //Header does not link to the page itself.
--- a/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Thu Oct 10 10:51:15 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  * @test
- * @bug 6786690 6820360
+ * @bug 6786690 6820360 8025633
  * @summary This test verifies the nesting of definition list tags.
  * @author Bhavesh Patel
  * @library ../lib/
@@ -64,7 +64,7 @@
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL +
                  "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
-                 "<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>"+ NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" +
                  "</code> - the title</dd>" + NL + "<dd><code>test</code> - boolean value" +
@@ -79,11 +79,11 @@
                  "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"strong\">Since:" +
                  "</span></dt>" + NL + "<dd>1.4</dd>" + NL +
                  "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
-                 "<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" +
+                 "<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()" +
                  "</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
                  "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:" +
-                 "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
                  "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"strong\">" +
@@ -91,20 +91,20 @@
         {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>" +
                  "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 is " +
                  "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
                  "<dl>" + NL + "<dt><span class=\"strong\">Throws:" +
@@ -141,29 +141,29 @@
                  " if no decorations are" + NL + "         to be enabled;" + NL +
                  "         <code>false</code> if decorations are to be enabled." +
                  "</dd>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject()\">" +
+                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject--\">" +
                  "<code>readObject()</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt>" +
-                 "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>" +
                  "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 is " +
                  "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
                  "<dl>" + NL + "<dt><span class=\"strong\">Throws:" +
@@ -188,12 +188,12 @@
         {BUG_ID + FS + "serialized-form.html", "<pre>boolean " +
                  "undecorated</pre>" + NL + "<div class=\"block\"><span class=\"strong\">" +
                  "Deprecated.</span>&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
                  "setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" +
                  "Deprecated.</span>&nbsp;<span class=\"italic\">As of JDK version" +
                  " 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}};
 
     // Test for valid HTML generation which should not comprise of empty
--- a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4682448 4947464 5029946
+ * @bug      4682448 4947464 5029946 8025633
  * @summary  Verify that the public modifier does not show up in the
  *           documentation for public methods, as recommended by the JLS.
  *           If A implements I and B extends A, B should be in the list of
@@ -84,7 +84,7 @@
         //Make sure "Specified By" has substituted type parameters.
         {BUG_ID + FS + "pkg" + FS + "Child.html",
             "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/Interface.html#method()\">method</a>" +
+            "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>" +
             "</code>&nbsp;in interface&nbsp;<code>" +
             "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" +
             "Interface</a>&lt;<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">" +
@@ -93,7 +93,7 @@
         //Make sure "Overrides" has substituted type parameters.
         {BUG_ID + FS + "pkg" + FS + "Child.html",
             "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/Parent.html#method()\">method</a>" +
+            "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>" +
             "</code>&nbsp;in class&nbsp;<code><a href=\"../pkg/Parent.html\" " +
             "title=\"class in pkg\">Parent</a>&lt;<a href=\"../pkg/Child.html\" " +
             "title=\"type parameter in Child\">T</a>&gt;</code></dd>"
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 7112427 8012295
+ * @bug 7112427 8012295 8025633
  * @summary Test of the JavaFX doclet features.
  * @author jvalenta
  * @library ../lib/
@@ -38,8 +38,8 @@
     private static final String[][] TEST =
         new String[][] {
             {"./" + BUG_ID + "/C.html",
-                "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
-                "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
+                "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate--\"><code>getRate()</code></a>, " + NL +
+                "<a href=\"C.html#setRate-double-\"><code>setRate(double)</code></a></dd>"},
             {"./" + BUG_ID + "/C.html",
                 "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
                 "<div class=\"block\">Sets the value of the property rate.</div>" + NL +
@@ -63,7 +63,7 @@
             {"./" + BUG_ID + "/C.html",
                 "<span class=\"strong\">Property description:</span>"},
             {"./" + BUG_ID + "/C.html",
-                "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#setTestMethodProperty()\">setTestMethodProperty</a></span>()</code>&nbsp;</td>" },
+                "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#setTestMethodProperty--\">setTestMethodProperty</a></span>()</code>&nbsp;</td>" },
             {"./" + BUG_ID + "/C.html",
                 "<h4>isPaused</h4>" + NL +
                 "<pre>public final&nbsp;double&nbsp;isPaused()</pre>" + NL +
--- a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4732864 6280605 7064544 8014636 8016328
+ * @bug      4732864 6280605 7064544 8014636 8016328 8025633
  * @summary  Make sure that you can link from one member to another using
  *           non-qualified name, furthermore, ensure the right one is linked.
  * @author   jamieh
@@ -49,9 +49,9 @@
             "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
             " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
             " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL +
-            " 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 +
-            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
-            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
+            " 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 +
+            " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL +
+            " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
         },
         {BUG_ID + FS + "pkg" + FS + "C.InnerC.html",
             "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>" + NL +
--- a/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4638588 4635809 6256068 6270645
+ * @bug 4638588 4635809 6256068 6270645 8025633
  * @summary Test to make sure that members are inherited properly in the Javadoc.
  *          Verify that inheritence labels are correct.
  * @author jamieh
@@ -44,7 +44,7 @@
 
         //Public method should be inherited
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
-         "<a href=\"../pkg/BaseClass.html#pubMethod()\">"},
+         "<a href=\"../pkg/BaseClass.html#pubMethod--\">"},
 
         //Public inner class should be inherited.
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
@@ -56,7 +56,7 @@
 
         //Protected method should be inherited
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
-         "<a href=\"../pkg/BaseClass.html#proMethod()\">"},
+         "<a href=\"../pkg/BaseClass.html#proMethod--\">"},
 
         //Protected inner class should be inherited.
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
@@ -73,14 +73,14 @@
          // Test overriding/implementing methods with generic parameters.
                  {BUG_ID + FS + "pkg" + FS + "BaseClass.html",
          "<dl>" + NL + "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-                          "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation(java.lang.Class)\">" +
+                          "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation-java.lang.Class-\">" +
                           "getAnnotation</a></code>&nbsp;in interface&nbsp;<code>" +
                           "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">" +
                           "BaseInterface</a></code></dd>" + NL + "</dl>"},
 
          // Test diamond inheritence member summary (6256068)
                  {BUG_ID + FS + "diamond" + FS + "Z.html",
-                 "<code><a href=\"../diamond/A.html#aMethod()\">aMethod</a></code>"},
+                 "<code><a href=\"../diamond/A.html#aMethod--\">aMethod</a></code>"},
 
          // Test that doc is inherited from closed parent (6270645)
                  {BUG_ID + FS + "inheritDist" + FS + "C.html",
@@ -90,7 +90,7 @@
 
     private static final String[][] NEGATED_TEST = {
         {BUG_ID + FS + "pkg" + FS + "SubClass.html",
-        "<a href=\"../pkg/BaseClass.html#staticMethod()\">staticMethod</a></code>"},
+        "<a href=\"../pkg/BaseClass.html#staticMethod--\">staticMethod</a></code>"},
     };
     private static final String[] ARGS =
         new String[] {
--- a/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4951228 6290760
+ * @bug      4951228 6290760 8025633
  * @summary  Test the case where the overriden method returns a different
  *           type than the method in the child class.  Make sure the
  *           documentation is inherited but the return type isn't.
@@ -49,7 +49,7 @@
         // Check return type in member summary.
         {BUG_ID + FS + "pkg" + FS + "PublicChild.html",
             "<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>" + NL +
-            "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../pkg/PublicChild.html#returnTypeTest()\">" +
+            "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../pkg/PublicChild.html#returnTypeTest--\">" +
             "returnTypeTest</a></span>()</code>"
         },
         // Check return type in member detail.
@@ -60,9 +60,9 @@
 
          // Legacy anchor dimensions (6290760)
         {BUG_ID + FS + "pkg2" + FS + "A.html",
-            "<a name=\"f(java.lang.Object[])\">" + NL +
+            "<a name=\"f-java.lang.Object:A-\">" + NL +
             "<!--   -->" + NL +
-            "</a><a name=\"f(T[])\">" + NL +
+            "</a><a name=\"f-T:A-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
--- a/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4131628 4664607 7025314 8023700 7198273
+ * @bug      4131628 4664607 7025314 8023700 7198273 8025633
  * @summary  Make sure the Next/Prev Class links iterate through all types.
  *           Make sure the navagation is 2 columns, not 3.
  * @author   jamieh
@@ -60,7 +60,7 @@
         {BUG_ID + FS + "pkg" + FS + "I.html", "<li>Next&nbsp;Class</li>"},
         // Test for 4664607
         {BUG_ID + FS + "pkg" + FS + "I.html",
-            "<div class=\"skipNav\"><a href=\"#skip-navbar_top\" title=\"Skip navigation links\">Skip navigation links</a></div>" + NL + "<a name=\"navbar_top_firstrow\">" + NL +
+            "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>" + NL + "<a name=\"navbar.top.firstrow\">" + NL +
             "<!--   -->" + NL + "</a>"}
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java	Thu Oct 10 10:51:15 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      6758050
+ * @bug      6758050 8025633
  * @summary  Test HTML output for nested generic types.
  * @author   bpatel
  * @library  ../lib/
@@ -46,7 +46,7 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg" + FS + "NestedGenerics.html",
             "<div class=\"block\">Contains <a " +
-            "href=\"../pkg/NestedGenerics.html#foo(java.util.Map)\"><code>foo" +
+            "href=\"../pkg/NestedGenerics.html#foo-java.util.Map-\"><code>foo" +
             "(java.util.Map&lt;A, java.util.Map&lt;A, A&gt;&gt;)</code></a></div>"
         }
     };
--- a/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344
+ * @bug      4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633
  * @summary  Run Javadoc on a set of source files that demonstrate new
  *           language features.  Check the output to ensure that the new
  *           language features are properly documented.
@@ -145,7 +145,7 @@
             //=================================
             {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int...&nbsp;i)"},
             {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[][]...&nbsp;i)"},
-            {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[]...)"},
+            {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "-int:A...-"},
             {BUG_ID + FS + "pkg" + FS + "VarArgs.html",
                 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
                 "TypeParameters</a>...&nbsp;t"},
@@ -156,13 +156,13 @@
             //Make sure the summary links are correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "<li>Summary:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>" + NL +
-                "<li><a href=\"#annotation_type_required_element_summary\">" +
+                "<li><a href=\"#annotation.type.required.element.summary\">" +
                 "Required</a>&nbsp;|&nbsp;</li>" + NL + "<li>" +
-                "<a href=\"#annotation_type_optional_element_summary\">Optional</a></li>"},
+                "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>"},
             //Make sure the detail links are correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "<li>Detail:&nbsp;</li>" + NL + "<li>Field&nbsp;|&nbsp;</li>" + NL +
-                "<li><a href=\"#annotation_type_element_detail\">Element</a></li>"},
+                "<li><a href=\"#annotation.type.element.detail\">Element</a></li>"},
             //Make sure the heading is correct.
             {BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
                 "Annotation Type AnnotationType</h2>"},
@@ -188,16 +188,16 @@
 
             //PACKAGE
             {BUG_ID + FS + "pkg" + FS + "package-summary.html",
-                "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"Package Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)"},
+                "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\"," + NL +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)"},
 
             //CLASS
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Class Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public class <span class=\"strong\">" +
                 "AnnotationTypeUsage</span>" + NL + "extends java.lang.Object</pre>"},
 
@@ -205,36 +205,36 @@
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Field Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public&nbsp;int field</pre>"},
 
             //CONSTRUCTOR
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Constructor Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public&nbsp;AnnotationTypeUsage()</pre>"},
 
             //METHOD
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre><a href=\"../pkg/AnnotationType.html\" " +
                 "title=\"annotation in pkg\">@AnnotationType</a>(" +
-                "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" +
+                "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" +
                 "=\"Method Annotation\"," + NL +
-                "                <a href=\"../pkg/AnnotationType.html#required()\">" +
+                "                <a href=\"../pkg/AnnotationType.html#required--\">" +
                 "required</a>=1994)" + NL + "public&nbsp;void&nbsp;method()</pre>"},
 
             //METHOD PARAMS
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre>public&nbsp;void&nbsp;methodWithParams(" +
                 "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" +
-                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">" +
+                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" +
                 "optional</a>=\"Parameter Annotation\",<a " +
-                "href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)" + NL +
+                "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)" + NL +
                 "                             int&nbsp;documented," + NL +
                 "                             int&nbsp;undocmented)</pre>"},
 
@@ -242,9 +242,9 @@
             {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
                 "<pre>public&nbsp;AnnotationTypeUsage(<a " +
                 "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" +
-                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">" +
+                "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" +
                 "optional</a>=\"Constructor Param Annotation\",<a " +
-                "href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)" + NL +
+                "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)" + NL +
                 "                           int&nbsp;documented," + NL +
                 "                           int&nbsp;undocmented)</pre>"},
 
@@ -254,43 +254,43 @@
 
             //Integer
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#d()\">d</a>=3.14,"},
+                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"},
 
             //Double
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#d()\">d</a>=3.14,"},
+                "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"},
 
             //Boolean
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#b()\">b</a>=true,"},
+                "<a href=\"../pkg1/A.html#b--\">b</a>=true,"},
 
             //String
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#s()\">s</a>=\"sigh\","},
+                "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\","},
 
             //Class
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"},
+                "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"},
 
             //Bounded Class
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"},
+                "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"},
 
             //Enum
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"},
+                "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"},
 
             //Annotation Type
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#a()\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994),"},
+                "<a href=\"../pkg1/A.html#a--\">a</a>=<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"foo\",<a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994),"},
 
             //String Array
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#sa()\">sa</a>={\"up\",\"down\"},"},
+                "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},"},
 
             //Primitive
             {BUG_ID + FS + "pkg1" + FS + "B.html",
-                "<a href=\"../pkg1/A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,"},
+                "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,"},
 
             //XXX:  Add array test case after this if fixed:
             //5020899: Incorrect internal representation of class-valued annotation elements
@@ -335,7 +335,7 @@
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
                      "<td class=\"colLast\"><span class=\"strong\">ClassUseTest1." +
                      "</span><code><span class=\"strong\"><a href=\"../../pkg2/" +
-                     "ClassUseTest1.html#method(T)\">method</a></span>" +
+                     "ClassUseTest1.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
@@ -388,7 +388,7 @@
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html",
                      "<td class=\"colLast\"><span class=\"strong\">" +
                      "ClassUseTest1.</span><code><span class=\"strong\"><a href=\"../../" +
-                     "pkg2/ClassUseTest1.html#method(T)\">method</a></span>" +
+                     "pkg2/ClassUseTest1.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
 
@@ -417,7 +417,7 @@
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
                      "<td class=\"colLast\"><span class=\"strong\">ClassUseTest2." +
                      "</span><code><span class=\"strong\"><a href=\"../../pkg2/" +
-                     "ClassUseTest2.html#method(T)\">method</a></span>" +
+                     "ClassUseTest2.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
@@ -472,7 +472,7 @@
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
                      "<td class=\"colLast\"><span class=\"strong\">ClassUseTest2." +
                      "</span><code><span class=\"strong\"><a href=\"../../pkg2/" +
-                     "ClassUseTest2.html#method(T)\">method</a></span>" +
+                     "ClassUseTest2.html#method-T-\">method</a></span>" +
                      "(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
@@ -517,7 +517,7 @@
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
                      "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3" +
                      ".</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." +
-                     "html#method(T)\">method</a></span>(T&nbsp;t)</code>&nbsp;</td>"
+                     "html#method-T-\">method</a></span>(T&nbsp;t)</code>&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
                      "<td class=\"colFirst\"><code>&lt;T extends <a href=\"../" +
@@ -554,7 +554,7 @@
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
                      "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3." +
                      "</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." +
-                     "html#method(T)\">method</a></span>(T&nbsp;t)</code>" +
+                     "html#method-T-\">method</a></span>(T&nbsp;t)</code>" +
                      "&nbsp;</td>"
             },
             {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
@@ -588,7 +588,7 @@
                      "<td class=\"colFirst\"><code>void</code></td>" + NL +
                      "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3." +
                      "</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." +
-                     "html#method(java.util.Set)\">method</a></span>(java." +
+                     "html#method-java.util.Set-\">method</a></span>(java." +
                      "util.Set&lt;<a href=\"../../pkg2/Foo4.html\" title=\"" +
                      "class in pkg2\">Foo4</a>&gt;&nbsp;p)</code>&nbsp;</td>" + NL +
                      "</tr>" + NL + "</tbody>"
@@ -663,14 +663,14 @@
             // TYPE PARAMETER IN INDEX
             //=================================
             {BUG_ID + FS + "index-all.html",
-                "<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">" +
+                "<span class=\"strong\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" +
                 "method(Vector&lt;Object&gt;)</a></span>"
             },
             //=================================
             // TYPE PARAMETER IN INDEX
             //=================================
             {BUG_ID + FS + "index-all.html",
-                "<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">" +
+                "<span class=\"strong\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" +
                 "method(Vector&lt;Object&gt;)</a></span>"
             },
         };
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4368820
+ * @bug      4368820 8025633
  * @summary  Inherited comment should link directly to member, not just
  *           class
  * @author   jamieh
@@ -47,7 +47,7 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
             "<span class=\"strong\">Description copied from class:&nbsp;<code>" +
-            "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy()\">" +
+            "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy--\">" +
             "BaseClass</a></code></span>"
         }
     };
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 4634891
+ * @bug 4634891 8025633
  * @summary Determine if overriden methods are properly documented when
  * -protected (default) visibility flag is used.
  * @author jamieh
@@ -41,14 +41,14 @@
         //The public method should be overriden
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" +
                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
 
         //The public method in different package should be overriden
         {BUG_ID + FS + "pkg2" + FS + "SubClass.html",
          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" +
                  "publicMethod</a></code>&nbsp;in class&nbsp;<code>" +
                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"},
 
@@ -56,7 +56,7 @@
         //package.
         {BUG_ID + FS + "pkg1" + FS + "SubClass.html",
          "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">" +
+                 "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">" +
                  "packagePrivateMethod</a></code>&nbsp;in class&nbsp;<code>" +
                  "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}
     };
--- a/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4780441 4874845 4978816 8014017 8016328
+ * @bug      4780441 4874845 4978816 8014017 8016328 8025633
  * @summary  Make sure that when the -private flag is not used, members
  *           inherited from package private class are documented in the child.
  *
@@ -66,7 +66,7 @@
 
         // Method inheritence from non-public superclass.
         {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
-            "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent(int)\">" +
+            "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">" +
                 "methodInheritedFromParent</a>"
         },
 
@@ -78,7 +78,7 @@
 
         // Method inheritence from non-public superinterface.
         {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
-            "<a href=\"../pkg/PublicInterface.html#methodInterface(int)\">" +
+            "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">" +
                 "methodInterface</a>"
         },
 
@@ -139,7 +139,7 @@
         //Do not inherit private interface method with generic parameters.
         //This method has been implemented.
         {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
-            "<span class=\"strong\"><a href=\"../pkg2/I.html#hello(T)\">hello</a></span>"},
+            "<span class=\"strong\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>"},
     };
 
     // Test output when -private flag is used.
@@ -171,20 +171,20 @@
             "PrivateParent</a>"
         },
         {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
-            "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" +
+            "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">" +
                 "methodInheritedFromParent</a>"
         },
         // Should document that a method overrides method from private class.
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
             "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[],%20int,%20T,%20V,%20java.util.List)\">" +
+            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">" +
             "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" +
             "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
             "PrivateParent</a></code></dd>"},
        // Should document that a method is specified by private interface.
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
             "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
+            "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
             "methodInterface</a></code>&nbsp;in interface&nbsp;<code>" +
             "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" +
             "PrivateInterface</a></code></dd>"},
@@ -195,7 +195,7 @@
             "PrivateInterface</a>"
         },
         {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html",
-            "<a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" +
+            "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" +
                 "methodInterface</a>"
         },
       // Should mention that any documentation was copied.
@@ -228,11 +228,11 @@
       //with generic parameters has been implemented.
       {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
             "<span class=\"strong\">Description copied from interface:&nbsp;<code>" +
-            "<a href=\"../pkg2/I.html#hello(T)\">I</a></code></span>"},
+            "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>"},
 
       {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
             "<dt><span class=\"strong\">Specified by:</span></dt>" + NL +
-            "<dd><code><a href=\"../pkg2/I.html#hello(T)\">hello</a></code>" +
+            "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>" +
             "&nbsp;in interface&nbsp;<code>" +
             "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" +
             "&lt;java.lang.String&gt;</code></dd>"},
--- a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Thu Oct 10 10:51:15 2013 -0700
@@ -25,7 +25,7 @@
 
 /*
  * @test
- * @bug 6802694
+ * @bug 6802694 8025633
  * @summary This test verifies deprecation info in serialized-form.html.
  * @author Bhavesh Patel
  * @library ../lib/
@@ -44,21 +44,21 @@
         {BUG_ID + FS + "serialized-form.html", "<dl>" + NL +
                  "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" +
                  "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 " +
                  "is undecorated.</div>" + NL + "&nbsp;" + NL +
                  "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<span class=\"italic\">As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
                  "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code><code>" +
@@ -75,12 +75,12 @@
         {BUG_ID + FS + "serialized-form.html", "<pre>boolean undecorated</pre>" + NL +
                  "<div class=\"block\"><span class=\"strong\">Deprecated.</span>&nbsp;<span class=\"italic\">" +
                  "As of JDK version 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" +
                  "setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" +
                  "Deprecated.</span>&nbsp;<span class=\"italic\">As of JDK version" +
                  " 1.5, replaced by" + NL +
-                 " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" +
                  "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}};
 
     // Test with -nodeprecated option. The serialized-form.html should
--- a/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java	Thu Oct 10 10:51:15 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4654308 4767038
+ * @bug      4654308 4767038 8025633
  * @summary  Use a Taglet and include some inline tags such as {@link}.  The
  *           inline tags should be interpreted properly.
  *           Run Javadoc on some sample source that uses {@inheritDoc}.  Make
@@ -56,7 +56,7 @@
     //Input for string search tests.
     private static final String[][] TEST_4654308 = new String[][] {
         {"4654308" + FS + "C.html", "<span class=\"strong\">Foo:</span></dt>" +
-                 "<dd>my only method is <a href=\"C.html#method()\"><code>here" +
+                 "<dd>my only method is <a href=\"C.html#method--\"><code>here" +
                  "</code></a></dd></dl>"}
     };
     private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
--- a/langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      8005091 8009686
+ * @bug      8005091 8009686 8025633
  * @summary  Make sure that type annotations are displayed correctly
  * @author   Bhavesh Patel
  * @library  ../lib/
@@ -272,13 +272,13 @@
             "<pre>void&nbsp;oneException()" + NL +
             "           throws <a href=\"../typeannos/ThrB.html\" title=\"" +
             "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
-            "ThrB.html#value()\">value</a>=\"m\") java.lang.Exception</pre>"
+            "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html",
             "<pre>void&nbsp;twoExceptions()" + NL +
             "            throws <a href=\"../typeannos/ThrB.html\" title=\"" +
             "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" +
-            "ThrB.html#value()\">value</a>=\"m\") java.lang.RuntimeException," + NL +
+            "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException," + NL +
             "                   <a href=\"../typeannos/ThrA.html\" title=\"" +
             "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>"
         },
@@ -307,14 +307,14 @@
             "<pre>void&nbsp;wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" +
             "class in typeannos\">MyList</a>&lt;? super <a href=\"../typeannos/" +
             "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" +
-            "../typeannos/WldB.html#value()\">value</a>=\"m\") java.lang." +
+            "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." +
             "String&gt;&nbsp;l)</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html",
             "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
             "typeannos\">MyList</a>&lt;? extends <a href=\"../typeannos/WldB." +
             "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" +
-            "typeannos/WldB.html#value()\">value</a>=\"m\") java.lang.String" +
+            "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" +
             "&gt;&nbsp;returnWcExtends()</pre>"
         },
 
@@ -329,7 +329,7 @@
             "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrA." +
             "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" +
             "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" +
-            "</a>(<a href=\"../typeannos/RcvrB.html#value()\">value</a>=\"m\")" +
+            "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" +
             "&nbsp;DefaultUnmodified&nbsp;this)</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
@@ -354,7 +354,7 @@
         {BUG_ID + FS + "typeannos" + FS + "WithValue.html",
             "<pre>&lt;T extends java.lang.Runnable&gt;&nbsp;void&nbsp;accept(" +
             "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " +
-            "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value()\">" +
+            "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" +
             "value</a>=\"m\")&nbsp;WithValue&nbsp;this," + NL +
             "                                           T&nbsp;r)" + NL +
             "                                    throws java.lang.Exception</pre>"
@@ -362,7 +362,7 @@
         {BUG_ID + FS + "typeannos" + FS + "WithFinal.html",
             "<pre>java.lang.String&nbsp;nonVoid(<a href=\"../typeannos/RcvrB." +
             "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" +
-            "typeannos/RcvrB.html#value()\">value</a>=\"m\")&nbsp;WithFinal" +
+            "typeannos/RcvrB.html#value--\">value</a>=\"m\")&nbsp;WithFinal" +
             "&nbsp;this)</pre>"
         },
         {BUG_ID + FS + "typeannos" + FS + "WithBody.html",
--- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4927167 4974929 7010344
+ * @bug      4927167 4974929 7010344 8025633
  * @summary  When the type parameters are more than 10 characters in length,
  *           make sure there is a line break between type params and return type
  *           in member summary. Also, test for type parameter links in package-summary and
@@ -71,7 +71,7 @@
         },
         //Nested type parameters
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<a name=\"formatDetails(java.util.Collection, java.util.Collection)\">" + NL +
+            "<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">" + NL +
             "<!--   -->" + NL +
             "</a>"
         },
--- a/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java	Thu Oct 10 08:51:55 2013 +0200
+++ b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java	Thu Oct 10 10:51:15 2013 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4515705 4804296 4702454 4697036
+ * @bug      4515705 4804296 4702454 4697036 8025633
  * @summary  Make sure that first sentence warning only appears once.
  *           Make sure that only warnings/errors are printed when quiet is used.
  *           Make sure that links to private/unincluded methods do not cause
@@ -65,8 +65,8 @@
     };
 
     private static final String[][] TEST2 = {
-        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#m()\"><code>m()</code></a><br/>"},
-        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#X()\"><code>X()</code></a><br/>"},
+        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#m--\"><code>m()</code></a><br/>"},
+        {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#X--\"><code>X()</code></a><br/>"},
         {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#f\"><code>f</code></a><br/>"},
     };