diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java index 9c20777e137..23f4f00cd7f 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java @@ -305,6 +305,6 @@ public abstract class AbstractExecutableMemberWriter extends AbstractMemberWrite buf.append(t.dimension()); } buf.append(")"); - return foundTypeVariable ? buf.toString() : null; + return foundTypeVariable ? writer.getName(buf.toString()) : null; } } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java index 87a5bce3367..4b7ca05e384 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java @@ -89,10 +89,11 @@ public class AbstractIndexWriter extends HtmlDocletWriter { * @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 @@ public class AbstractIndexWriter extends HtmlDocletWriter { 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); + } } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java index f4c7c68f565..bb936d37324 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java @@ -88,7 +88,7 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter 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 class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter */ public void addSummaryAnchor(ClassDoc cd, Content memberTree) { memberTree.addContent(writer.getMarkerAnchor( - "annotation_type_field_summary")); + SectionName.ANNOTATION_TYPE_FIELD_SUMMARY)); } /** @@ -272,7 +272,8 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter */ 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 @@ public class AnnotationTypeFieldWriterImpl extends AbstractMemberWriter */ 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")); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java index ff8fc100f0a..9a586a017f3 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java @@ -133,7 +133,7 @@ public class AnnotationTypeOptionalMemberWriterImpl extends */ 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 @@ public class AnnotationTypeOptionalMemberWriterImpl extends */ 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"); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java index 1833d262db3..bdbe8d547c2 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java @@ -89,7 +89,7 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter 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 class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter */ 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 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter */ 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 @@ public class AnnotationTypeRequiredMemberWriterImpl extends AbstractMemberWriter */ 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")); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java index cb9ab3e3078..21f0c215038 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java @@ -107,7 +107,8 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter //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 @@ public class ConstantsSummaryWriterImpl extends HtmlDocletWriter Content pkgNameContent; if (parsedPackageName.length() == 0) { summariesTree.addContent(getMarkerAnchor( - DocletConstants.UNNAMED_PACKAGE_ANCHOR)); + SectionName.UNNAMED_PACKAGE_ANCHOR)); pkgNameContent = defaultPackageLabel; } else { summariesTree.addContent(getMarkerAnchor( diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java index 496737078dd..856a4827e3c 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java @@ -97,7 +97,8 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter 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 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter * {@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 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter */ 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 @@ public class ConstructorWriterImpl extends AbstractExecutableMemberWriter */ 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")); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java index 00135fc6cec..63c81438956 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java @@ -48,8 +48,8 @@ public class DeprecatedListWriter extends SubWriterHolderWriter { 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[] { diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java index 382f16f1f00..b971d07668d 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java @@ -73,7 +73,8 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter 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 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter * {@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 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter */ 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 @@ public class EnumConstantWriterImpl extends AbstractMemberWriter */ 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")); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java index f599ac2ff6b..104967129f7 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java @@ -74,7 +74,8 @@ public class FieldWriterImpl extends AbstractMemberWriter 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 @@ public class FieldWriterImpl extends AbstractMemberWriter * {@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 class FieldWriterImpl extends AbstractMemberWriter */ 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 @@ public class FieldWriterImpl extends AbstractMemberWriter */ 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 @@ public class FieldWriterImpl extends AbstractMemberWriter */ 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")); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java index 3bdcf6a3b10..19a578c85cb 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java @@ -509,28 +509,28 @@ public class HtmlDocletWriter extends HtmlDocWriter { 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 @@ public class HtmlDocletWriter extends HtmlDocWriter { 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 @@ public class HtmlDocletWriter extends HtmlDocWriter { * @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 @@ public class HtmlDocletWriter extends HtmlDocWriter { } 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 @@ public class HtmlDocletWriter extends HtmlDocWriter { } 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; } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java index 8918889a4c1..8597adaeba2 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java @@ -49,8 +49,6 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl implements SerializedFormWriter.SerialFieldWriter { ProgramElementDoc[] members = null; - private boolean printedOverallAnchor = false; - public HtmlSerialFieldWriter(SubWriterHolderWriter writer, ClassDoc classdoc) { super(writer, classdoc); @@ -98,10 +96,6 @@ public class HtmlSerialFieldWriter extends FieldWriterImpl 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); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java index 4e5da21fc7f..082745db179 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java @@ -85,12 +85,10 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements * @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 @@ public class HtmlSerialMethodWriter extends MethodWriterImpl implements * @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)); } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java index bb67b99c200..8b3712d3594 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java @@ -85,7 +85,8 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter 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 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter * {@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 class MethodWriterImpl extends AbstractExecutableMemberWriter */ 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 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter 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 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter */ 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 @@ public class MethodWriterImpl extends AbstractExecutableMemberWriter */ 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")); } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java index d44dd25feb0..d0537af4a41 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java @@ -132,7 +132,8 @@ public class NestedClassWriterImpl extends AbstractMemberWriter * {@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 class NestedClassWriterImpl extends AbstractMemberWriter */ 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 @@ public class NestedClassWriterImpl extends AbstractMemberWriter */ 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"); } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java index caf0e0976a6..ffb93b73f21 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java @@ -203,8 +203,9 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { 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 @@ public class PackageIndexWriter extends AbstractPackageIndexWriter { */ protected void addOverviewComment(Content htmltree) { if (root.inlineTags().length > 0) { - htmltree.addContent(getMarkerAnchor("overview_description")); + htmltree.addContent( + getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION)); addInlineComment(root, htmltree); } } diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java index f0325b5b953..c19bf2d6549 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java @@ -112,7 +112,8 @@ public class PackageWriterImpl extends HtmlDocletWriter 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 class PackageWriterImpl extends HtmlDocletWriter */ 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())); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java index 1de03f40898..7f2c6e61111 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java @@ -129,7 +129,8 @@ public class ProfilePackageWriterImpl extends HtmlDocletWriter 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 class ProfilePackageWriterImpl extends HtmlDocletWriter */ 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())); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java index 838732b5212..9bf4bf0ca26 100644 --- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java @@ -70,7 +70,8 @@ public class PropertyWriterImpl extends AbstractMemberWriter 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 @@ public class PropertyWriterImpl extends AbstractMemberWriter * {@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 class PropertyWriterImpl extends AbstractMemberWriter */ 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 @@ public class PropertyWriterImpl extends AbstractMemberWriter */ 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 @@ public class PropertyWriterImpl extends AbstractMemberWriter */ 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")); diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java new file mode 100644 index 00000000000..b27949fe988 --- /dev/null +++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java @@ -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. + * + *
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.
+ *
+ * @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;
+ }
+}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java
index 43718e4699c..a561a0395d0 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java
@@ -115,7 +115,8 @@ public class SingleIndexWriter extends AbstractIndexWriter {
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());
}
}
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
index c780e962cac..ee8cc9cb12e 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java
@@ -30,6 +30,7 @@ import java.util.*;
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 @@ public abstract class HtmlDocWriter extends HtmlWriter {
}
/**
- * 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 abstract class HtmlDocWriter extends HtmlWriter {
*/
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();
}
/**
diff --git a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
index c76b2ed26c1..5742cd0bf6a 100644
--- a/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java
@@ -58,9 +58,4 @@ public class DocletConstants {
* 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";
}
diff --git a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java
index 6ad89feb8bf..0c05190333f 100644
--- a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java
+++ b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java
@@ -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 @@ public class AccessSkipNav {
// Testing only for the presence of the and
// Top navbar
- { "Skip navigation links",
+ { "Skip navigation links",
TMPDEST_DIR1 + "p1" + FS + "C1.html" },
// Top navbar
- { "" + LS +
+ { "" + LS +
"" + LS + "",
TMPDEST_DIR1 + "p1" + FS + "C1.html" },
// Bottom navbar
- { "Skip navigation links",
+ { "Skip navigation links",
TMPDEST_DIR1 + "p1" + FS + "C1.html" },
// Bottom navbar
- { "" + LS +
+ { "" + LS +
"" + LS + "",
TMPDEST_DIR1 + "p1" + FS + "C1.html" }
};
diff --git a/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java
new file mode 100644
index 00000000000..c5cb7519325
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java
@@ -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",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+
+ //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",
+ ""
+ },
+ //Test some fields
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+ ""
+ },
+ //Test constructor
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ //Test some methods
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html",
+ ""
+ },
+
+ //Test enum
+
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html",
+ ""
+ },
+
+ //Test nested class
+
+ {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html",
+ ""
+ },
+ {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html",
+ ""
+ },
+
+ //Test class use page
+
+ {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "DeprMemClass.html",
+ ""
+ },
+
+ //Test deprecated list page
+
+ {BUG_ID + FS + "deprecated-list.html",
+ ""
+ },
+ {BUG_ID + FS + "deprecated-list.html",
+ ""
+ },
+
+ //Test constant values page
+
+ {BUG_ID + FS + "constant-values.html",
+ ""
+ },
+
+ //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",
+ ""
+ },
+
+ //Test member name index page
+
+ {BUG_ID + FS + "index-all.html",
+ ""
+ },
+ {BUG_ID + FS + "index-all.html",
+ "$"
+ },
+ {BUG_ID + FS + "index-all.html",
+ "_"
+ }
+ };
+
+ 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();
+ }
+}
diff --git a/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/DeprMemClass.java b/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/DeprMemClass.java
new file mode 100644
index 00000000000..7d2407656e6
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/DeprMemClass.java
@@ -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() {
+ }
+}
diff --git a/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java b/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java
new file mode 100644
index 00000000000..60aae773eb6
--- /dev/null
+++ b/langtools/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java
@@ -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 void foo(Map> map) {}
+
+ /**
+ * A nested class.
+ */
+ public class _NestedClas$ {}
+
+ /**
+ * Nested class D.
+ */
+ class D {}
+
+ /**
+ * Nested class $A.
+ */
+ class $A {}
+}
diff --git a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java
index b85f300e81e..b0ff91f7a1f 100644
--- a/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java
+++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java
@@ -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 @@ public class TestAnnotationOptional extends JavadocTester {
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "pkg" + FS + "AnnotationOptional.html",
- ""
+ ""
}
};
diff --git a/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java b/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java
index 5ffdbab12b2..02286c30245 100644
--- a/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java
+++ b/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java
@@ -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 @@ public class TestAnnotationTypes extends JavadocTester {
//Input for string search tests.
private static final String[][] TEST = {
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
- "Link to external class BigDecimal"},
{BUG_ID + FS + "C.html",
- "Link to external member gcd"},
{BUG_ID + FS + "C.html",
"
read in class " +
"FilterReaderreadInt in interface " +
"DataInputsetUndecorated(boolean)title" +
" - the titletest - boolean value" +
@@ -79,11 +79,11 @@ public class TestHtmlDefinitionListTag extends JavadocTester {
"if decorations are to be enabled.readObject()" +
+ "readObject()" +
"java.io.IOExceptionsetUndecorated(boolean)set - boolean" +
"java.io.IOExceptionC1.setUndecorated(boolean)setUndecorated(boolean)." + NL +
"C1.setUndecorated(boolean)setUndecorated(boolean)." + NL +
"false if decorations are to be enabled." +
"readObject()java.io.IOExceptionsetUndecorated(boolean)" +
"java.io.IOExceptionC1.setUndecorated(boolean)setUndecorated(boolean)." + NL +
"C1.setUndecorated(boolean)setUndecorated(boolean)." + NL +
"boolean " +
"undecorated" + NL + "" +
+ " " +
"setUndecorated(boolean).setUndecorated(boolean)." + NL + ""}};
// Test for valid HTML generation which should not comprise of empty
diff --git a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java
index cfaff523fde..39f8e212629 100644
--- a/langtools/test/com/sun/javadoc/testInterface/TestInterface.java
+++ b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java
@@ -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 @@ public class TestInterface extends JavadocTester {
//Make sure "Specified By" has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
"method" +
+ "method" +
" in interface " +
"" +
"Interface<" +
@@ -93,7 +93,7 @@ public class TestInterface extends JavadocTester {
//Make sure "Overrides" has substituted type parameters.
{BUG_ID + FS + "pkg" + FS + "Child.html",
"- Overrides:
" + NL +
- "method" +
+ "method" +
" in class Parent<T> "
diff --git a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
index b9374353e26..e2c4a5b2ffc 100644
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java
@@ -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 @@ public class TestJavaFX extends JavadocTester {
private static final String[][] TEST =
new String[][] {
{"./" + BUG_ID + "/C.html",
- "- See Also:
" + NL + "getRate(), " + NL +
- "setRate(double) "},
+ "- See Also:
" + NL + "getRate(), " + NL +
+ "setRate(double) "},
{"./" + BUG_ID + "/C.html",
"public final void setRate(double value)
" + NL +
"Sets the value of the property rate." + NL +
@@ -63,7 +63,7 @@ public class TestJavaFX extends JavadocTester {
{"./" + BUG_ID + "/C.html",
"Property description:"},
{"./" + BUG_ID + "/C.html",
- "setTestMethodProperty() " },
+ "setTestMethodProperty() " },
{"./" + BUG_ID + "/C.html",
"isPaused
" + NL +
"public final double isPaused()
" + NL +
diff --git a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
index ef9dd2bbb9a..49ce35d0700 100644
--- a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
+++ b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java
@@ -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 @@ public class TestLinkTaglet extends JavadocTester {
"Qualified Link: C.InnerC.
" + NL +
" Unqualified Link1: C.InnerC.
" + NL +
" Unqualified Link2: C.InnerC.
" + NL +
- " Qualified Link: method(pkg.C.InnerC, pkg.C.InnerC2).
" + NL +
- " Unqualified Link: method(C.InnerC, C.InnerC2).
" + NL +
- " Unqualified Link: method(InnerC, InnerC2).
"
+ " Qualified Link: method(pkg.C.InnerC, pkg.C.InnerC2).
" + NL +
+ " Unqualified Link: method(C.InnerC, C.InnerC2).
" + NL +
+ " Unqualified Link: method(InnerC, InnerC2).
"
},
{BUG_ID + FS + "pkg" + FS + "C.InnerC.html",
"Link to member in outer class: C.MEMBER
" + NL +
diff --git a/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
index 4d90d8791fb..62b9235e952 100644
--- a/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
+++ b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java
@@ -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 class TestMemberInheritence extends JavadocTester {
//Public method should be inherited
{BUG_ID + FS + "pkg" + FS + "SubClass.html",
- ""},
+ ""},
//Public inner class should be inherited.
{BUG_ID + FS + "pkg" + FS + "SubClass.html",
@@ -56,7 +56,7 @@ public class TestMemberInheritence extends JavadocTester {
//Protected method should be inherited
{BUG_ID + FS + "pkg" + FS + "SubClass.html",
- ""},
+ ""},
//Protected inner class should be inherited.
{BUG_ID + FS + "pkg" + FS + "SubClass.html",
@@ -73,14 +73,14 @@ public class TestMemberInheritence extends JavadocTester {
// Test overriding/implementing methods with generic parameters.
{BUG_ID + FS + "pkg" + FS + "BaseClass.html",
"" + NL + "- Specified by:
" + NL +
- "" +
+ "" +
"getAnnotation in interface " +
"" +
"BaseInterface " + NL + "
"},
// Test diamond inheritence member summary (6256068)
{BUG_ID + FS + "diamond" + FS + "Z.html",
- "aMethod"},
+ "aMethod"},
// Test that doc is inherited from closed parent (6270645)
{BUG_ID + FS + "inheritDist" + FS + "C.html",
@@ -90,7 +90,7 @@ public class TestMemberInheritence extends JavadocTester {
private static final String[][] NEGATED_TEST = {
{BUG_ID + FS + "pkg" + FS + "SubClass.html",
- "staticMethod"},
+ "staticMethod"},
};
private static final String[] ARGS =
new String[] {
diff --git a/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java
index fdbb664deff..eff1de42046 100644
--- a/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java
+++ b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java
@@ -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 @@ public class TestMemberSummary extends JavadocTester {
// Check return type in member summary.
{BUG_ID + FS + "pkg" + FS + "PublicChild.html",
"PublicChild" + NL +
- "" +
+ "" +
"returnTypeTest()"
},
// Check return type in member detail.
@@ -60,9 +60,9 @@ public class TestMemberSummary extends JavadocTester {
// Legacy anchor dimensions (6290760)
{BUG_ID + FS + "pkg2" + FS + "A.html",
- "" + NL +
+ "" + NL +
"" + NL +
- "" + NL +
+ "" + NL +
"" + NL +
""
},
diff --git a/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java
index 4466eb87d0e..d8187147bd2 100644
--- a/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java
@@ -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 @@ public class TestNavigation extends JavadocTester {
{BUG_ID + FS + "pkg" + FS + "I.html", "- Next Class
"},
// Test for 4664607
{BUG_ID + FS + "pkg" + FS + "I.html",
- "" + NL + "" + NL +
+ "" + NL + "" + NL +
"" + NL + ""}
};
private static final String[][] NEGATED_TEST = NO_TEST;
diff --git a/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java b/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java
index 6d44bd64692..37c403eb251 100644
--- a/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java
+++ b/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java
@@ -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 @@ public class TestNestedGenerics extends JavadocTester {
private static final String[][] TEST = {
{BUG_ID + FS + "pkg" + FS + "NestedGenerics.html",
""
}
};
diff --git a/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java b/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
index ad0e024bfe6..65013120dc8 100644
--- a/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
+++ b/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java
@@ -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 @@ public class TestNewLanguageFeatures extends JavadocTester {
//=================================
{BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int... i)"},
{BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[][]... 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",
"" +
"TypeParameters... t"},
@@ -156,13 +156,13 @@ public class TestNewLanguageFeatures extends JavadocTester {
//Make sure the summary links are correct.
{BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
"- Summary:
" + NL + "- Field |
" + NL +
- "- " +
+ "
- " +
"Required |
" + NL + "- " +
- "Optional
"},
+ "Optional "},
//Make sure the detail links are correct.
{BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
"- Detail:
" + NL + "- Field |
" + NL +
- "- Element
"},
+ "- Element
"},
//Make sure the heading is correct.
{BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
"Annotation Type AnnotationType"},
@@ -188,16 +188,16 @@ public class TestNewLanguageFeatures extends JavadocTester {
//PACKAGE
{BUG_ID + FS + "pkg" + FS + "package-summary.html",
- "@AnnotationType(optional=\"Package Annotation\"," + NL +
- " required=1994)"},
+ "@AnnotationType(optional=\"Package Annotation\"," + NL +
+ " required=1994)"},
//CLASS
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"@AnnotationType(" +
- "optional" +
+ "optional" +
"=\"Class Annotation\"," + NL +
- " " +
+ " " +
"required=1994)" + NL + "public class " +
"AnnotationTypeUsage" + NL + "extends java.lang.Object"},
@@ -205,36 +205,36 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"@AnnotationType(" +
- "optional" +
+ "optional" +
"=\"Field Annotation\"," + NL +
- " " +
+ " " +
"required=1994)" + NL + "public int field"},
//CONSTRUCTOR
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"@AnnotationType(" +
- "optional" +
+ "optional" +
"=\"Constructor Annotation\"," + NL +
- " " +
+ " " +
"required=1994)" + NL + "public AnnotationTypeUsage()"},
//METHOD
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"@AnnotationType(" +
- "optional" +
+ "optional" +
"=\"Method Annotation\"," + NL +
- " " +
+ " " +
"required=1994)" + NL + "public void method()"},
//METHOD PARAMS
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"public void methodWithParams(" +
"" +
- "@AnnotationType(" +
+ "@AnnotationType(" +
"optional=\"Parameter Annotation\",required=1994)" + NL +
+ "href=\"../pkg/AnnotationType.html#required--\">required=1994)" + NL +
" int documented," + NL +
" int undocmented)"},
@@ -242,9 +242,9 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"public AnnotationTypeUsage(" +
- "@AnnotationType(" +
+ "@AnnotationType(" +
"optional=\"Constructor Param Annotation\",required=1994)" + NL +
+ "href=\"../pkg/AnnotationType.html#required--\">required=1994)" + NL +
" int documented," + NL +
" int undocmented)"},
@@ -254,43 +254,43 @@ public class TestNewLanguageFeatures extends JavadocTester {
//Integer
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "d=3.14,"},
+ "d=3.14,"},
//Double
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "d=3.14,"},
+ "d=3.14,"},
//Boolean
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "b=true,"},
+ "b=true,"},
//String
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "s=\"sigh\","},
+ "s=\"sigh\","},
//Class
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "c=Foo.class,"},
+ "c=Foo.class,"},
//Bounded Class
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "w=TypeParameterSubClass.class,"},
+ "w=TypeParameterSubClass.class,"},
//Enum
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "e=Penny,"},
+ "e=Penny,"},
//Annotation Type
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "a=@AnnotationType(optional=\"foo\",required=1994),"},
+ "a=@AnnotationType(optional=\"foo\",required=1994),"},
//String Array
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "sa={\"up\",\"down\"},"},
+ "sa={\"up\",\"down\"},"},
//Primitive
{BUG_ID + FS + "pkg1" + FS + "B.html",
- "primitiveClassTest=boolean.class,"},
+ "primitiveClassTest=boolean.class,"},
//XXX: Add array test case after this if fixed:
//5020899: Incorrect internal representation of class-valued annotation elements
@@ -335,7 +335,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
"ClassUseTest1." +
"method" +
+ "ClassUseTest1.html#method-T-\">method" +
"(T t) "
},
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html",
@@ -388,7 +388,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html",
"" +
"ClassUseTest1.method" +
+ "pkg2/ClassUseTest1.html#method-T-\">method" +
"(T t) "
},
@@ -417,7 +417,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
"ClassUseTest2." +
"method" +
+ "ClassUseTest2.html#method-T-\">method" +
"(T t) "
},
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html",
@@ -472,7 +472,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
"ClassUseTest2." +
"method" +
+ "ClassUseTest2.html#method-T-\">method" +
"(T t) "
},
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html",
@@ -517,7 +517,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
"ClassUseTest3" +
".method(T t) "
+ "html#method-T-\">method(T t) "
},
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
"<T extends ClassUseTest3." +
"method(T t)" +
+ "html#method-T-\">method(T t)" +
" "
},
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html",
@@ -588,7 +588,7 @@ public class TestNewLanguageFeatures extends JavadocTester {
"void " + NL +
"ClassUseTest3." +
"method(java." +
+ "html#method-java.util.Set-\">method(java." +
"util.Set<Foo4> p) " + NL +
"" + NL + ""
@@ -663,14 +663,14 @@ public class TestNewLanguageFeatures extends JavadocTester {
// TYPE PARAMETER IN INDEX
//=================================
{BUG_ID + FS + "index-all.html",
- "" +
+ "" +
"method(Vector<Object>)"
},
//=================================
// TYPE PARAMETER IN INDEX
//=================================
{BUG_ID + FS + "index-all.html",
- "" +
+ "" +
"method(Vector<Object>)"
},
};
diff --git a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java
index 68999480d44..506fde14a71 100644
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java
@@ -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 @@ public class TestOverridenMethodDocCopy extends JavadocTester {
private static final String[][] TEST = {
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"Description copied from class: " +
- "" +
+ "" +
"BaseClass"
}
};
diff --git a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java
index 702c54c8309..018f04a2817 100644
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java
@@ -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 @@ public class TestOverridenPrivateMethodsWithPackageFlag extends JavadocTester {
//The public method should be overriden
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"- Overrides:
" + NL +
- "" +
+ "" +
"publicMethod in class " +
"BaseClass "},
//The public method in different package should be overriden
{BUG_ID + FS + "pkg2" + FS + "SubClass.html",
"- Overrides:
" + NL +
- "" +
+ "" +
"publicMethod in class " +
"BaseClass "},
@@ -56,7 +56,7 @@ public class TestOverridenPrivateMethodsWithPackageFlag extends JavadocTester {
//package.
{BUG_ID + FS + "pkg1" + FS + "SubClass.html",
"- Overrides:
" + NL +
- "" +
+ "" +
"packagePrivateMethod in class " +
"BaseClass "}
};
diff --git a/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
index b7a9bc73a10..6da9e9c1df7 100644
--- a/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
+++ b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java
@@ -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 @@ public class TestPrivateClasses extends JavadocTester {
// Method inheritence from non-public superclass.
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html",
- "" +
+ "" +
"methodInheritedFromParent"
},
@@ -78,7 +78,7 @@ public class TestPrivateClasses extends JavadocTester {
// Method inheritence from non-public superinterface.
{BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html",
- "" +
+ "" +
"methodInterface"
},
@@ -139,7 +139,7 @@ public class TestPrivateClasses extends JavadocTester {
//Do not inherit private interface method with generic parameters.
//This method has been implemented.
{BUG_ID + "-1" + FS + "pkg2" + FS + "C.html",
- "hello"},
+ "hello"},
};
// Test output when -private flag is used.
@@ -171,20 +171,20 @@ public class TestPrivateClasses extends JavadocTester {
"PrivateParent "
},
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
- "" +
+ "" +
"methodInheritedFromParent"
},
// Should document that a method overrides method from private class.
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
"- Overrides:
" + NL +
- "" +
+ "" +
"methodOverridenFromParent in class " +
"" +
"PrivateParent "},
// Should document that a method is specified by private interface.
{BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
"- Specified by:
" + NL +
- "" +
+ "" +
"methodInterface in interface " +
"" +
"PrivateInterface "},
@@ -195,7 +195,7 @@ public class TestPrivateClasses extends JavadocTester {
"PrivateInterface"
},
{BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html",
- "" +
+ "" +
"methodInterface"
},
// Should mention that any documentation was copied.
@@ -228,11 +228,11 @@ public class TestPrivateClasses extends JavadocTester {
//with generic parameters has been implemented.
{BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
"Description copied from interface: " +
- "I"},
+ "I "},
{BUG_ID + "-2" + FS + "pkg2" + FS + "C.html",
"- Specified by:
" + NL +
- "hello" +
+ "hello" +
" in interface " +
"I" +
"<java.lang.String> "},
diff --git a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
index 760d24af458..06217b94a56 100644
--- a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
+++ b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java
@@ -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 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
{BUG_ID + FS + "serialized-form.html", "" + NL +
"- Throws:
" + NL + "" +
"java.io.IOException "+ NL + "- See Also:" +
- "
" + NL + "- " +
+ "
C1.setUndecorated(boolean)setUndecorated(boolean)." + NL +
"C1.setUndecorated(boolean)setUndecorated(boolean)." + NL +
"" +
@@ -75,12 +75,12 @@ public class TestSerializedFormDeprecationInfo extends JavadocTester {
{BUG_ID + FS + "serialized-form.html", "boolean undecorated
" + NL +
"Deprecated. " +
"As of JDK version 1.5, replaced by" + NL +
- " " +
+ " " +
"setUndecorated(boolean)." + NL + ""},
{BUG_ID + FS + "serialized-form.html", "" +
"Deprecated. As of JDK version" +
" 1.5, replaced by" + NL +
- " " +
+ " " +
"setUndecorated(boolean)." + NL + ""}};
// Test with -nodeprecated option. The serialized-form.html should
diff --git a/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java b/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java
index 53461390e52..e49e857e6fe 100644
--- a/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java
+++ b/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java
@@ -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 @@ public class TestTaglets extends JavadocTester {
//Input for string search tests.
private static final String[][] TEST_4654308 = new String[][] {
{"4654308" + FS + "C.html", "Foo:" +
- "- my only method is
here" +
+ "- my only method is
here" +
" void oneException()" + NL +
" throws @ThrB(value=\"m\") java.lang.Exception"
+ "ThrB.html#value--\">value=\"m\") java.lang.Exception"
},
{BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html",
"void twoExceptions()" + NL +
" throws @ThrB(value=\"m\") java.lang.RuntimeException," + NL +
+ "ThrB.html#value--\">value=\"m\") java.lang.RuntimeException," + NL +
" @ThrA java.lang.Exception"
},
@@ -307,14 +307,14 @@ public class TestTypeAnnotations extends JavadocTester {
"void wcSuper(MyList<? super @WldB(value=\"m\") java.lang." +
+ "../typeannos/WldB.html#value--\">value=\"m\") java.lang." +
"String> l)"
},
{BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html",
"MyList<? extends @WldB(value=\"m\") java.lang.String" +
+ "typeannos/WldB.html#value--\">value=\"m\") java.lang.String" +
"> returnWcExtends()"
},
@@ -329,7 +329,7 @@ public class TestTypeAnnotations extends JavadocTester {
"java.lang.String nonVoid(@RcvrA @RcvrB" +
- "(value=\"m\")" +
+ "(value=\"m\")" +
" DefaultUnmodified this)"
},
{BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
@@ -354,7 +354,7 @@ public class TestTypeAnnotations extends JavadocTester {
{BUG_ID + FS + "typeannos" + FS + "WithValue.html",
"<T extends java.lang.Runnable> void accept(" +
"@RcvrB(" +
+ "typeannos\">@RcvrB(" +
"value=\"m\") WithValue this," + NL +
" T r)" + NL +
" throws java.lang.Exception"
@@ -362,7 +362,7 @@ public class TestTypeAnnotations extends JavadocTester {
{BUG_ID + FS + "typeannos" + FS + "WithFinal.html",
"java.lang.String nonVoid(@RcvrB(value=\"m\") WithFinal" +
+ "typeannos/RcvrB.html#value--\">value=\"m\") WithFinal" +
" this)"
},
{BUG_ID + FS + "typeannos" + FS + "WithBody.html",
diff --git a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java
index ee352a1b385..14e7ba47a6a 100644
--- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java
+++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java
@@ -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 @@ public class TestTypeParameters extends JavadocTester {
},
//Nested type parameters
{BUG_ID + FS + "pkg" + FS + "C.html",
- "" + NL +
+ "" + NL +
"" + NL +
""
},
diff --git a/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java
index d5f697a213e..7152cced990 100644
--- a/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java
+++ b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java
@@ -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 @@ public class TestWarnings extends JavadocTester {
};
private static final String[][] TEST2 = {
- {BUG_ID + FS + "pkg" + FS + "X.html", "m()X()m()X()f