--- a/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Thu Oct 10 20:57:27 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 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java Thu Oct 10 20:57:27 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/src/share/classes/com/sun/tools/javac/code/Attribute.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/Attribute.java Thu Oct 10 20:57:27 2013 -0700
@@ -64,6 +64,8 @@
return false;
}
+ public TypeAnnotationPosition getPosition() { return null; };
+
/** The value for an annotation element of primitive type or String. */
public static class Constant extends Attribute {
public final Object value;
@@ -191,8 +193,13 @@
}
public Attribute member(Name member) {
+ Pair<MethodSymbol,Attribute> res = getElemPair(member);
+ return res == null ? null : res.snd;
+ }
+
+ private Pair<MethodSymbol, Attribute> getElemPair(Name member) {
for (Pair<MethodSymbol,Attribute> pair : values)
- if (pair.fst.name == member) return pair.snd;
+ if (pair.fst.name == member) return pair;
return null;
}
@@ -208,6 +215,16 @@
return (DeclaredType) type;
}
+ @Override
+ public TypeAnnotationPosition getPosition() {
+ if (values.size() != 0) {
+ Name valueName = values.head.fst.name.table.names.value;
+ Pair<MethodSymbol, Attribute> res = getElemPair(valueName);
+ return res == null ? null : res.snd.getPosition();
+ }
+ return null;
+ }
+
public Map<MethodSymbol, Attribute> getElementValues() {
Map<MethodSymbol, Attribute> valmap =
new LinkedHashMap<MethodSymbol, Attribute>();
@@ -230,6 +247,14 @@
this.position = position;
}
+ @Override
+ public TypeAnnotationPosition getPosition() {
+ if (hasUnknownPosition()) {
+ position = super.getPosition();
+ }
+ return position;
+ }
+
public boolean hasUnknownPosition() {
return position == null || position.type == TargetType.UNKNOWN;
}
@@ -302,6 +327,14 @@
public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) {
return v.visitArray(getValue(), p);
}
+
+ @Override
+ public TypeAnnotationPosition getPosition() {
+ if (values.length != 0)
+ return values[0].getPosition();
+ else
+ return null;
+ }
}
/** The value for an annotation element of an enum type.
--- a/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Thu Oct 10 20:57:27 2013 -0700
@@ -71,6 +71,7 @@
import com.sun.tools.javac.util.ListBuffer;
import com.sun.tools.javac.util.Log;
import com.sun.tools.javac.util.Names;
+import com.sun.tools.javac.util.Options;
/**
* Contains operations specific to processing type annotations.
@@ -94,6 +95,7 @@
final Names names;
final Symtab syms;
final Annotate annotate;
+ private final boolean typeAnnoAsserts;
protected TypeAnnotations(Context context) {
context.put(typeAnnosKey, this);
@@ -101,6 +103,8 @@
log = Log.instance(context);
syms = Symtab.instance(context);
annotate = Annotate.instance(context);
+ Options options = Options.instance(context);
+ typeAnnoAsserts = options.isSet("TypeAnnotationAsserts");
}
/**
@@ -265,10 +269,6 @@
*/
private void separateAnnotationsKinds(JCTree typetree, Type type, Symbol sym,
TypeAnnotationPosition pos) {
- /*
- System.out.printf("separateAnnotationsKinds(typetree: %s, type: %s, symbol: %s, pos: %s%n",
- typetree, type, sym, pos);
- */
List<Attribute.Compound> annotations = sym.getRawAttributes();
ListBuffer<Attribute.Compound> declAnnos = new ListBuffer<Attribute.Compound>();
ListBuffer<Attribute.TypeCompound> typeAnnos = new ListBuffer<Attribute.TypeCompound>();
@@ -1023,10 +1023,12 @@
@Override
public void visitMethodDef(final JCMethodDecl tree) {
if (tree.sym == null) {
- // Something most be wrong, e.g. a class not found.
- // Quietly ignore. (See test FailOver15.java)
+ if (typeAnnoAsserts) {
+ Assert.error("Visiting tree node before memberEnter");
+ } else {
return;
}
+ }
if (sigOnly) {
if (!tree.mods.annotations.isEmpty()) {
// Nothing to do for separateAnnotationsKinds if
@@ -1129,6 +1131,9 @@
// Nothing to do for separateAnnotationsKinds if
// there are no annotations of either kind.
} else if (tree.sym == null) {
+ if (typeAnnoAsserts) {
+ Assert.error("Visiting tree node before memberEnter");
+ }
// Something is wrong already. Quietly ignore.
} else if (tree.sym.getKind() == ElementKind.PARAMETER) {
// Parameters are handled in visitMethodDef or visitLambda.
@@ -1282,9 +1287,9 @@
private void findPosition(JCTree tree, JCTree frame, List<JCAnnotation> annotations) {
if (!annotations.isEmpty()) {
/*
- System.out.println("Finding pos for: " + annotations);
- System.out.println(" tree: " + tree + " kind: " + tree.getKind());
- System.out.println(" frame: " + frame + " kind: " + frame.getKind());
+ System.err.println("Finding pos for: " + annotations);
+ System.err.println(" tree: " + tree + " kind: " + tree.getKind());
+ System.err.println(" frame: " + frame + " kind: " + frame.getKind());
*/
TypeAnnotationPosition p = new TypeAnnotationPosition();
p.onLambda = currentLambda;
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Oct 10 20:57:27 2013 -0700
@@ -792,17 +792,19 @@
Type t = tree.type != null ?
tree.type :
attribType(tree, env);
- return checkBase(t, tree, env, classExpected, interfaceExpected, checkExtensible);
+ return checkBase(t, tree, env, classExpected, interfaceExpected, false, checkExtensible);
}
Type checkBase(Type t,
JCTree tree,
Env<AttrContext> env,
boolean classExpected,
- boolean interfaceOrArrayExpected,
+ boolean interfacesOnlyExpected,
+ boolean interfacesOrArraysExpected,
boolean checkExtensible) {
if (t.isErroneous())
return t;
- if (t.hasTag(TYPEVAR) && !classExpected && !interfaceOrArrayExpected) {
+ if (t.hasTag(TYPEVAR) && !classExpected &&
+ !interfacesOrArraysExpected && !interfacesOnlyExpected) {
// check that type variable is already visible
if (t.getUpperBound() == null) {
log.error(tree.pos(), "illegal.forward.ref");
@@ -814,9 +816,14 @@
t = chk.checkClassOrArrayType(tree.pos(), t,
checkExtensible|!allowGenerics);
}
- if (interfaceOrArrayExpected &&
+ if (interfacesOnlyExpected && !t.tsym.isInterface()) {
+ log.error(tree.pos(), "intf.expected.here");
+ // return errType is necessary since otherwise there might
+ // be undetected cycles which cause attribution to loop
+ return types.createErrorType(t);
+ } else if (interfacesOrArraysExpected &&
!(t.tsym.isInterface() || t.getTag() == ARRAY)) {
- log.error(tree.pos(), "intf.expected.here");
+ log.error(tree.pos(), "intf.or.array.expected.here");
// return errType is necessary since otherwise there might
// be undetected cycles which cause attribution to loop
return types.createErrorType(t);
@@ -3988,7 +3995,7 @@
Set<Type> boundSet = new HashSet<Type>();
if (bounds.nonEmpty()) {
// accept class or interface or typevar as first bound.
- bounds.head.type = checkBase(bounds.head.type, bounds.head, env, false, false, false);
+ bounds.head.type = checkBase(bounds.head.type, bounds.head, env, false, false, false, false);
boundSet.add(types.erasure(bounds.head.type));
if (bounds.head.type.isErroneous()) {
return bounds.head.type;
@@ -4004,7 +4011,7 @@
// if first bound was a class or interface, accept only interfaces
// as further bounds.
for (JCExpression bound : bounds.tail) {
- bound.type = checkBase(bound.type, bound, env, false, true, false);
+ bound.type = checkBase(bound.type, bound, env, false, false, true, false);
if (bound.type.isErroneous()) {
bounds = List.of(bound);
}
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Check.java Thu Oct 10 20:57:27 2013 -0700
@@ -3420,15 +3420,14 @@
sym.name != names.error &&
(!staticImport || !e.isStaticallyImported())) {
if (!e.sym.type.isErroneous()) {
- String what = e.sym.toString();
if (!isClassDecl) {
if (staticImport)
- log.error(pos, "already.defined.static.single.import", what);
+ log.error(pos, "already.defined.static.single.import", e.sym);
else
- log.error(pos, "already.defined.single.import", what);
+ log.error(pos, "already.defined.single.import", e.sym);
}
else if (sym != e.sym)
- log.error(pos, "already.defined.this.unit", what);
+ log.error(pos, "already.defined.this.unit", e.sym);
}
return false;
}
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Thu Oct 10 20:57:27 2013 -0700
@@ -114,12 +114,15 @@
deferredLintHandler = DeferredLintHandler.instance(context);
lint = Lint.instance(context);
allowTypeAnnos = source.allowTypeAnnotations();
+ allowRepeatedAnnos = source.allowRepeatedAnnotations();
}
/** Switch: support type annotations.
*/
boolean allowTypeAnnos;
+ boolean allowRepeatedAnnos;
+
/** A queue for classes whose members still need to be entered into the
* symbol table.
*/
@@ -640,9 +643,6 @@
if (TreeInfo.isEnumInit(tree)) {
attr.attribIdentAsEnumType(localEnv, (JCIdent)tree.vartype);
} else {
- // Make sure type annotations are processed.
- // But we don't have a symbol to attach them to yet - use null.
- typeAnnotate(tree.vartype, env, null, tree.pos());
attr.attribType(tree.vartype, localEnv);
if (tree.nameexpr != null) {
attr.attribExpr(tree.nameexpr, localEnv);
@@ -693,7 +693,6 @@
}
annotateLater(tree.mods.annotations, localEnv, v, tree.pos());
typeAnnotate(tree.vartype, env, v, tree.pos());
- annotate.flush();
v.pos = tree.pos;
}
// where
@@ -906,14 +905,14 @@
}
if (annotated.containsKey(a.type.tsym)) {
- if (source.allowRepeatedAnnotations()) {
- ListBuffer<Attribute.Compound> l = annotated.get(a.type.tsym);
- l = l.append(c);
- annotated.put(a.type.tsym, l);
- pos.put(c, a.pos());
- } else {
- log.error(a.pos(), "duplicate.annotation");
+ if (!allowRepeatedAnnos) {
+ log.error(a.pos(), "repeatable.annotations.not.supported.in.source");
+ allowRepeatedAnnos = true;
}
+ ListBuffer<Attribute.Compound> l = annotated.get(a.type.tsym);
+ l = l.append(c);
+ annotated.put(a.type.tsym, l);
+ pos.put(c, a.pos());
} else {
annotated.put(a.type.tsym, ListBuffer.of(c));
pos.put(c, a.pos());
@@ -1081,7 +1080,6 @@
// Do this here, where we have the symbol.
for (JCTypeParameter tp : tree.typarams)
typeAnnotate(tp, baseEnv, sym, tree.pos());
- annotate.flush();
// Add default constructor if needed.
if ((c.flags() & INTERFACE) == 0 &&
@@ -1197,7 +1195,7 @@
annotated.put(a.type.tsym, l);
pos.put(tc, a.pos());
} else {
- log.error(a.pos(), "duplicate.annotation");
+ log.error(a.pos(), "repeatable.annotations.not.supported.in.source");
}
} else {
annotated.put(a.type.tsym, ListBuffer.of(tc));
--- a/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Oct 10 20:57:27 2013 -0700
@@ -104,6 +104,8 @@
*/
private LVTRanges lvtRanges;
+ private final boolean typeAnnoAsserts;
+
protected Gen(Context context) {
context.put(genKey, this);
@@ -140,6 +142,7 @@
debugCode = options.isSet("debugcode");
allowInvokedynamic = target.hasInvokedynamic() || options.isSet("invokedynamic");
pool = new Pool(types);
+ typeAnnoAsserts = options.isSet("TypeAnnotationAsserts");
generateIproxies =
target.requiresIproxy() ||
@@ -562,9 +565,13 @@
ListBuffer<Attribute.TypeCompound> fieldTAs = new ListBuffer<Attribute.TypeCompound>();
ListBuffer<Attribute.TypeCompound> nonfieldTAs = new ListBuffer<Attribute.TypeCompound>();
for (TypeCompound ta : tas) {
- if (ta.position.type == TargetType.FIELD) {
+ if (ta.getPosition().type == TargetType.FIELD) {
fieldTAs.add(ta);
} else {
+ if (typeAnnoAsserts) {
+ Assert.error("Type annotation does not have a valid positior");
+ }
+
nonfieldTAs.add(ta);
}
}
--- a/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/resources/compiler.properties Thu Oct 10 20:57:27 2013 -0700
@@ -78,26 +78,26 @@
# 0: string
compiler.err.already.defined.single.import=\
- {0} is already defined in a single-type import
+ a type with the same simple name is already defined by the single-type-import of {0}
# 0: string
compiler.err.already.defined.static.single.import=\
- {0} is already defined in a static single-type import
+ a type with the same simple name is already defined by the static single-type-import of {0}
compiler.err.already.defined.this.unit=\
{0} is already defined in this compilation unit
# 0: type, 1: list of name
compiler.err.annotation.missing.default.value=\
- annotation {0} is missing value for the attribute {1}
+ annotation @{0} is missing a default value for the element ''{1}''
# 0: type, 1: list of name
compiler.err.annotation.missing.default.value.1=\
- annotation {0} is missing values for attributes {1}
+ annotation @{0} is missing default values for elements {1}
# 0: type
compiler.err.annotation.not.valid.for.type=\
- annotation not valid for a value of type {0}
+ annotation not valid for an element of type {0}
compiler.err.annotation.type.not.applicable=\
annotation type not applicable to this kind of declaration
@@ -135,7 +135,7 @@
array required, but {0} found
compiler.err.attribute.value.must.be.constant=\
- attribute value must be constant
+ element value must be a constant expression
# 0: statement type
compiler.err.bad.initializer=\
@@ -298,8 +298,9 @@
compiler.err.cyclic.inheritance=\
cyclic inheritance involving {0}
+# 0: symbol
compiler.err.cyclic.annotation.element=\
- cyclic annotation element type
+ type of element {0} is cyclic
# 0: unused
compiler.err.call.to.super.not.allowed.in.enum.ctor=\
@@ -307,73 +308,70 @@
# 0: type
compiler.err.no.superclass=\
- {0} has no superclass
+ {0} has no superclass.
# 0: symbol, 1: type, 2: symbol, 3: type, 4: unused
compiler.err.concrete.inheritance.conflict=\
methods {0} from {1} and {2} from {3} are inherited with the same signature
compiler.err.default.allowed.in.intf.annotation.member=\
- default value only allowed in an @interface member
+ default value only allowed in an annotation type declaration
# 0: symbol
compiler.err.doesnt.exist=\
package {0} does not exist
-compiler.err.duplicate.annotation=\
- duplicate annotation
-
# 0: type
compiler.err.duplicate.annotation.invalid.repeated=\
- annotation {0} cannot be repeated\nIt does not define a valid containing annotation.
+ annotation {0} is not a valid repeatable annotation
# 0: name, 1: type
compiler.err.duplicate.annotation.member.value=\
- duplicate annotation member value {0} in {1}
-
-# 0: type, 1: type
+ duplicate element ''{0}'' in annotation @{1}.
+
+# 0: name, 1: unused
compiler.err.duplicate.annotation.missing.container=\
- duplicate annotation: the declaration of {0} does not have a valid {1} annotation
-
-# 0: type
+ {0} is not a repeatable annotation type
+
+# 0: type, 1: unused
compiler.err.invalid.repeatable.annotation=\
- duplicate annotation: {0} is annotated with an invalid Repeatable annotation
+ duplicate annotation: {0} is annotated with an invalid @Repeatable annotation
# 0: symbol or type
compiler.err.invalid.repeatable.annotation.no.value=\
- duplicate annotation: {0} is not a valid Repeatable, no value element method declared
+ {0} is not a valid @Repeatable, no value element method declared
# 0: type, 1: number
compiler.err.invalid.repeatable.annotation.multiple.values=\
- duplicate annotation: {0} is not a valid Repeatable, {1} value element methods declared
+ {0} is not a valid @Repeatable, {1} element methods named ''value'' declared
# 0: type
compiler.err.invalid.repeatable.annotation.invalid.value=\
- duplicate annotation: {0} is not a valid Repeatable: invalid value element
-
-# 0: symbol type, 1: type, 2: type
+ {0} is not a valid @Repeatable: invalid value element
+
+# 0: symbol type, 1: unused, 2: type
compiler.err.invalid.repeatable.annotation.value.return=\
- duplicate annotation: value element of containing annotation {0} should have type {2}, found {1}
+ containing annotation type ({0}) must declare an element named ''value'' of type {2}
# 0: symbol or type, 1: symbol
compiler.err.invalid.repeatable.annotation.elem.nondefault=\
- containing annotation {0} does not have a default value for element {1}
-
-# 0: symbol, 1: type, 2: symbol, 3: type
+ containing annotation type ({0}) does not have a default value for element {1}
+
+# 0: symbol, 1: unused, 2: symbol, 3: unused
compiler.err.invalid.repeatable.annotation.retention=\
- containing annotation {0} has shorter retention ({1}) than the contained annotation {2} with retention {3}
+ retention of containing annotation type ({0}) is shorter than the retention of repeatable annotation type ({2})
# 0: symbol, 1: symbol
compiler.err.invalid.repeatable.annotation.not.documented=\
- containing annotation type, {0}, is not @Documented while repeated annotation type, {1}, is
+ repeatable annotation type ({1}) is @Documented while containing annotation type ({0}) is not
# 0: symbol, 1: symbol
compiler.err.invalid.repeatable.annotation.not.inherited=\
- containing annotation type, {0}, is not @Inherited while repeated annotation type, {1}, is
+ repeatable annotation type ({1}) is @Inherited while containing annotation type ({0}) is not
# 0: symbol, 1: symbol
compiler.err.invalid.repeatable.annotation.incompatible.target=\
- target of container annotation {0} is not a subset of target of repeated annotation {1}
+ containing annotation type ({0}) is applicable to more targets than repeatable annotation type ({1})
# 0: symbol
compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\
@@ -561,26 +559,31 @@
integer number too large: {0}
compiler.err.intf.annotation.members.cant.have.params=\
- @interface members may not have parameters
-
+ elements in annotation type declarations cannot declare formal parameters
+
+# 0: symbol
compiler.err.intf.annotation.cant.have.type.params=\
- @interface may not have type parameters
+ annotation type {0} cannot be generic
compiler.err.intf.annotation.members.cant.have.type.params=\
- @interface members may not have type parameters
+ elements in annotation type declarations cannot be generic methods
# 0: symbol, 1: type
compiler.err.intf.annotation.member.clash=\
- @interface member clashes with method ''{0}'' in {1}
+ annotation type {1} declares an element with the same name as method {0}
compiler.err.intf.expected.here=\
interface expected here
+compiler.err.intf.or.array.expected.here=\
+ interface or array type expected here
+
compiler.err.intf.meth.cant.have.body=\
interface abstract methods cannot have body
+# 0: symbol
compiler.err.invalid.annotation.member.type=\
- invalid type for annotation member
+ invalid type for element {0} of annotation type
compiler.err.invalid.binary.number=\
binary numbers must contain at least one binary digit
@@ -2310,8 +2313,13 @@
(use -source 8 or higher to enable type annotations)
# 0: string
+compiler.err.repeatable.annotations.not.supported.in.source=\
+ repeated annotations are not supported in -source {0}\n\
+(use -source 8 or higher to enable repeated annotations)
+
+# 0: string
compiler.err.foreach.not.supported.in.source=\
- for-each loops are not supported in -source {0}\n\
+ enhanced for loops are not supported in -source {0}\n\
(use -source 5 or higher to enable for-each loops)
# 0: string
--- a/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Thu Oct 10 20:57:27 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 20:57:27 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 20:57:27 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 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Thu Oct 10 20:57:27 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: </li>" + NL + "<li><a href=\"#annotation_type_" +
- "field_summary\">Field</a> | </li>"},
+ "<li>Summary: </li>" + NL + "<li><a href=\"#annotation.type." +
+ "field.summary\">Field</a> | </li>"},
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
- "<li>Detail: </li>" + NL + "<li><a href=\"#annotation_type_" +
- "field_detail\">Field</a> | </li>"},
+ "<li>Detail: </li>" + NL + "<li><a href=\"#annotation.type." +
+ "field.detail\">Field</a> | </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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Thu Oct 10 20:57:27 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> in class <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> in interface <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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testHref/TestHref.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Thu Oct 10 20:57:27 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>" +
" <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 + " " + 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>" +
" <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>" +
" <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 + " " + 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>" +
" <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> <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> <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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testInterface/TestInterface.java Thu Oct 10 20:57:27 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> in interface <code>" +
"<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" +
"Interface</a><<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> in class <code><a href=\"../pkg/Parent.html\" " +
"title=\"class in pkg\">Parent</a><<a href=\"../pkg/Child.html\" " +
"title=\"type parameter in Child\">T</a>></code></dd>"
--- a/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Thu Oct 10 20:57:27 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 void setRate(double 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> </td>" },
+ "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#setTestMethodProperty--\">setTestMethodProperty</a></span>()</code> </td>" },
{"./" + BUG_ID + "/C.html",
"<h4>isPaused</h4>" + NL +
"<pre>public final double isPaused()</pre>" + NL +
--- a/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Thu Oct 10 20:57:27 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> in interface <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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testNavigation/TestNavigation.java Thu Oct 10 20:57:27 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 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java Thu Oct 10 20:57:27 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<A, java.util.Map<A, A>>)</code></a></div>"
}
};
--- a/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Thu Oct 10 20:57:27 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... 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",
"<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
"TypeParameters</a>... t"},
@@ -156,13 +156,13 @@
//Make sure the summary links are correct.
{BUG_ID + FS + "pkg" + FS + "AnnotationType.html",
"<li>Summary: </li>" + NL + "<li>Field | </li>" + NL +
- "<li><a href=\"#annotation_type_required_element_summary\">" +
+ "<li><a href=\"#annotation.type.required.element.summary\">" +
"Required</a> | </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: </li>" + NL + "<li>Field | </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 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 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 void method()</pre>"},
//METHOD PARAMS
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"<pre>public void 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 documented," + NL +
" int undocmented)</pre>"},
@@ -242,9 +242,9 @@
{BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
"<pre>public 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 documented," + NL +
" int 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 t)</code> </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 t)</code> </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 t)</code> </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 t)</code> </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 t)</code> </td>"
+ "html#method-T-\">method</a></span>(T t)</code> </td>"
},
{BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html",
"<td class=\"colFirst\"><code><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 t)</code>" +
+ "html#method-T-\">method</a></span>(T t)</code>" +
" </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<<a href=\"../../pkg2/Foo4.html\" title=\"" +
"class in pkg2\">Foo4</a>> p)</code> </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<Object>)</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<Object>)</a></span>"
},
};
--- a/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java Thu Oct 10 20:57:27 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: <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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Thu Oct 10 20:57:27 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> in class <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> in class <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> in class <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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Thu Oct 10 20:57:27 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> in class <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> in interface <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: <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>" +
" in interface <code>" +
"<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" +
"<java.lang.String></code></dd>"},
--- a/langtools/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java Thu Oct 10 20:57:27 2013 -0700
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 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
@@ -56,7 +56,7 @@
{BUG_ID + FS + "pkg" + FS + "C.html",
"<a href=\"../pkg/RegContainerDoc.html\" " +
"title=\"annotation in pkg\">@RegContainerDoc</a>" +
- "(<a href=\"../pkg/RegContainerDoc.html#value()\">value</a>={" +
+ "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={" +
"<a href=\"../pkg/RegContaineeNotDoc.html\" " +
"title=\"annotation in pkg\">@RegContaineeNotDoc</a>," +
"<a href=\"../pkg/RegContaineeNotDoc.html\" " +
@@ -71,7 +71,7 @@
{BUG_ID + FS + "pkg" + FS + "C.html",
"<a href=\"../pkg/ContainerSynthDoc.html\" " +
"title=\"annotation in pkg\">@ContainerSynthDoc</a>(" +
- "<a href=\"../pkg/ContainerSynthDoc.html#value()\">value</a>=" +
+ "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>=" +
"<a href=\"../pkg/ContaineeSynthDoc.html\" " +
"title=\"annotation in pkg\">@ContaineeSynthDoc</a>)"},
{BUG_ID + FS + "pkg" + FS + "C.html",
@@ -82,37 +82,37 @@
{BUG_ID + FS + "pkg" + FS + "D.html",
"<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>" +
- "(<a href=\"../pkg/RegDoc.html#x()\">x</a>=1)"},
+ "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)"},
{BUG_ID + FS + "pkg" + FS + "D.html",
"<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" +
- "(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>=1)"},
+ "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)"},
{BUG_ID + FS + "pkg" + FS + "D.html",
"<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" +
- "(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>={1,2})"},
+ "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})"},
{BUG_ID + FS + "pkg" + FS + "D.html",
"<a href=\"../pkg/NonSynthDocContainer.html\" " +
"title=\"annotation in pkg\">@NonSynthDocContainer</a>" +
- "(<a href=\"../pkg/NonSynthDocContainer.html#value()\">value</a>=" +
+ "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>=" +
"<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)"},
{BUG_ID + FS + "pkg1" + FS + "C.html",
"<a href=\"../pkg1/RegContainerValDoc.html\" " +
"title=\"annotation in pkg1\">@RegContainerValDoc</a>" +
- "(<a href=\"../pkg1/RegContainerValDoc.html#value()\">value</a>={" +
+ "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={" +
"<a href=\"../pkg1/RegContaineeNotDoc.html\" " +
"title=\"annotation in pkg1\">@RegContaineeNotDoc</a>," +
"<a href=\"../pkg1/RegContaineeNotDoc.html\" " +
"title=\"annotation in pkg1\">@RegContaineeNotDoc</a>}," +
- "<a href=\"../pkg1/RegContainerValDoc.html#y()\">y</a>=3)"},
+ "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)"},
{BUG_ID + FS + "pkg1" + FS + "C.html",
"<a href=\"../pkg1/ContainerValDoc.html\" " +
"title=\"annotation in pkg1\">@ContainerValDoc</a>" +
- "(<a href=\"../pkg1/ContainerValDoc.html#value()\">value</a>={" +
+ "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={" +
"<a href=\"../pkg1/ContaineeNotDoc.html\" " +
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>," +
"<a href=\"../pkg1/ContaineeNotDoc.html\" " +
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," +
- "<a href=\"../pkg1/ContainerValDoc.html#x()\">x</a>=1)"}
+ "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)"}
};
private static final String[][] NEGATED_TEST = {
@@ -124,7 +124,7 @@
{BUG_ID + FS + "pkg" + FS + "C.html",
"<a href=\"../pkg/RegContainerNotDoc.html\" " +
"title=\"annotation in pkg\">@RegContainerNotDoc</a>" +
- "(<a href=\"../pkg/RegContainerNotDoc.html#value()\">value</a>={" +
+ "(<a href=\"../pkg/RegContainerNotDoc.html#value--\">value</a>={" +
"<a href=\"../pkg/RegContaineeNotDoc.html\" " +
"title=\"annotation in pkg\">@RegContaineeNotDoc</a>," +
"<a href=\"../pkg/RegContaineeNotDoc.html\" " +
@@ -138,25 +138,25 @@
{BUG_ID + FS + "pkg1" + FS + "C.html",
"<a href=\"../pkg1/RegContainerValNotDoc.html\" " +
"title=\"annotation in pkg1\">@RegContainerValNotDoc</a>" +
- "(<a href=\"../pkg1/RegContainerValNotDoc.html#value()\">value</a>={" +
+ "(<a href=\"../pkg1/RegContainerValNotDoc.html#value--\">value</a>={" +
"<a href=\"../pkg1/RegContaineeDoc.html\" " +
"title=\"annotation in pkg1\">@RegContaineeDoc</a>," +
"<a href=\"../pkg1/RegContaineeDoc.html\" " +
"title=\"annotation in pkg1\">@RegContaineeDoc</a>}," +
- "<a href=\"../pkg1/RegContainerValNotDoc.html#y()\">y</a>=4)"},
+ "<a href=\"../pkg1/RegContainerValNotDoc.html#y--\">y</a>=4)"},
{BUG_ID + FS + "pkg1" + FS + "C.html",
"<a href=\"../pkg1/ContainerValNotDoc.html\" " +
"title=\"annotation in pkg1\">@ContainerValNotDoc</a>" +
- "(<a href=\"../pkg1/ContainerValNotDoc.html#value()\">value</a>={" +
+ "(<a href=\"../pkg1/ContainerValNotDoc.html#value--\">value</a>={" +
"<a href=\"../pkg1/ContaineeNotDoc.html\" " +
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>," +
"<a href=\"../pkg1/ContaineeNotDoc.html\" " +
"title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," +
- "<a href=\"../pkg1/ContainerValNotDoc.html#x()\">x</a>=2)"},
+ "<a href=\"../pkg1/ContainerValNotDoc.html#x--\">x</a>=2)"},
{BUG_ID + FS + "pkg1" + FS + "C.html",
"<a href=\"../pkg1/ContainerSynthNotDoc.html\" " +
"title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>(" +
- "<a href=\"../pkg1/ContainerSynthNotDoc.html#value()\">value</a>=" +
+ "<a href=\"../pkg1/ContainerSynthNotDoc.html#value--\">value</a>=" +
"<a href=\"../pkg1/ContaineeSynthDoc.html\" " +
"title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)"}
};
--- a/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Thu Oct 10 20:57:27 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>" +
" <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 + " " + 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>" +
" <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> <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> <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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testTaglets/TestTaglets.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java Thu Oct 10 20:57:27 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 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 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 wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" +
"class in typeannos\">MyList</a><? 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> l)</pre>"
},
{BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html",
"<pre><a href=\"../typeannos/MyList.html\" title=\"class in " +
"typeannos\">MyList</a><? 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" +
"> returnWcExtends()</pre>"
},
@@ -329,7 +329,7 @@
"<pre>java.lang.String 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\")" +
" DefaultUnmodified this)</pre>"
},
{BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html",
@@ -354,7 +354,7 @@
{BUG_ID + FS + "typeannos" + FS + "WithValue.html",
"<pre><T extends java.lang.Runnable> void 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\") WithValue this," + NL +
" T r)" + NL +
" throws java.lang.Exception</pre>"
@@ -362,7 +362,7 @@
{BUG_ID + FS + "typeannos" + FS + "WithFinal.html",
"<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB." +
"html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" +
- "typeannos/RcvrB.html#value()\">value</a>=\"m\") WithFinal" +
+ "typeannos/RcvrB.html#value--\">value</a>=\"m\") WithFinal" +
" this)</pre>"
},
{BUG_ID + FS + "typeannos" + FS + "WithBody.html",
--- a/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Thu Oct 10 20:57:27 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 13:41:08 2013 -0700
+++ b/langtools/test/com/sun/javadoc/testWarnings/TestWarnings.java Thu Oct 10 20:57:27 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/>"},
};
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java Thu Oct 10 20:57:27 2013 -0700
@@ -0,0 +1,439 @@
+/*
+ * 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 8005085 8008762 8008751 8013065 8015323 8015257
+ * @summary Type annotations on anonymous and inner class.
+ * Six TYPE_USE annotations are repeated(or not); Four combinations create
+ * four test files, and each results in the test class and 2 anonymous classes.
+ * Each element of these three classes is checked for expected number of the
+ * four annotation Attributes. Expected annotation counts depend on type of
+ * annotation place on type of element (a FIELD&TYPE_USE element on a field
+ * results in 2). Elements with no annotations expect 0.
+ * Source template is read in from testanoninner.template
+ *
+ */
+import java.lang.annotation.*;
+import java.io.*;
+import java.util.List;
+import java.util.LinkedList;
+import com.sun.tools.classfile.*;
+import java.nio.file.Files;
+import java.nio.charset.*;
+import java.io.File;
+import java.io.IOException;
+
+
+import java.lang.annotation.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.*;
+
+/*
+ * A source template is read in and testname and annotations are inserted
+ * via replace().
+ */
+public class TestAnonInnerClasses extends ClassfileTestHelper {
+ // tally errors and test cases
+ int errors = 0;
+ int checks = 0;
+ //Note expected test count in case of skips due to bugs.
+ int tc = 0, xtc = 180; // 45 x 4 variations of repeated annotations.
+ File testSrc = new File(System.getProperty("test.src"));
+
+ String[] AnnoAttributes = {
+ Attribute.RuntimeVisibleTypeAnnotations,
+ Attribute.RuntimeInvisibleTypeAnnotations,
+ Attribute.RuntimeVisibleAnnotations,
+ Attribute.RuntimeInvisibleAnnotations
+ };
+
+ // template for source files
+ String srcTemplate = "testanoninner.template";
+
+ // Four test files generated based on combinations of repeating annotations.
+ Boolean As= false, Bs=true, Cs=false, Ds=false, TAs=false,TBs=false;
+ Boolean[][] bRepeat = new Boolean[][]{
+ /* no repeats */ {false, false, false, false, false, false},
+ /* repeat A,C,TA */ {true, false, true, false, true, false},
+ /* repeat B,D,TB */ {false, true, false, true, false, true},
+ /* repeat all */ {true, true, true, true, true, true}
+ };
+ // Save descriptions of failed test case; does not terminate upon a failure.
+ List<String> failed = new LinkedList<>();
+
+ public static void main(String[] args) throws Exception {
+ new TestAnonInnerClasses().run();
+ }
+
+ // Check annotation counts and make reports sufficiently descriptive to
+ // easily diagnose.
+ void check(String testcase, int vtaX, int itaX, int vaX, int iaX,
+ int vtaA, int itaA, int vaA, int iaA) {
+
+ String descr = " checking " + testcase+" _TYPE_, expected: " +
+ vtaX + ", " + itaX + ", " + vaX + ", " + iaX + "; actual: " +
+ vtaA + ", " + itaA + ", " + vaA + ", " + iaA;
+ String description;
+ description=descr.replace("_TYPE_","RuntimeVisibleTypeAnnotations");
+ if (vtaX != vtaA) {
+ errors++;
+ failed.add(++checks + " " + testcase + ": (vtaX) " + vtaX +
+ " != " + vtaA + " (vtaA)");
+ println(checks + " FAIL: " + description);
+ } else {
+ println(++checks + " PASS: " + description);
+ }
+ description=descr.replace("_TYPE_","RuntimeInvisibleTypeAnnotations");
+ if (itaX != itaA) {
+ errors++;
+ failed.add(++checks + " " + testcase + ": (itaX) " + itaX + " != " +
+ itaA + " (itaA)");
+ println(checks + " FAIL: " + description);
+ } else {
+ println(++checks + " PASS: " + description);
+ }
+ description=descr.replace("_TYPE_","RuntimeVisibleAnnotations");
+ if (vaX != vaA) {
+ errors++;
+ failed.add(++checks + " " + testcase + ": (vaX) " + vaX + " != " +
+ vaA + " (vaA)");
+ println(checks + " FAIL: " + description);
+ } else {
+ println(++checks + " PASS: " + description);
+ }
+ description=descr.replace("_TYPE_","RuntimeInvisibleAnnotations");
+ if (iaX != iaA) {
+ errors++;
+ failed.add(++checks + " " + testcase + ": (iaX) " + iaX + " != " +
+ iaA + " (iaA)");
+ println(checks + " FAIL: " + description);
+ } else {
+ println(++checks + " PASS: " + description);
+ }
+ println("");
+ }
+
+ // Print failed cases (if any) and throw exception for fail.
+ void report() {
+ if (errors!=0) {
+ System.err.println("Failed tests: " + errors +
+ "\nfailed test cases:\n");
+ for (String t: failed) System.err.println(" " + t);
+ throw new RuntimeException("FAIL: There were test failures.");
+ } else
+ System.out.println("PASSED all tests.");
+ }
+
+ void test(String ttype, ClassFile cf, Method m, Field f, boolean visible) {
+ int vtaActual = 0,
+ itaActual = 0,
+ vaActual = 0,
+ iaActual = 0,
+ vtaExp = 0,
+ itaExp = 0,
+ vaExp = 0,
+ iaExp = 0,
+ index = 0,
+ index2 = 0;
+ String memberName = null,
+ testcase = "undefined",
+ testClassName = null;
+ Attribute attr = null,
+ cattr = null;
+ Code_attribute CAttr = null;
+ // Get counts of 4 annotation Attributes on element being checked.
+ for (String AnnoType : AnnoAttributes) {
+ try {
+ switch (ttype) {
+ case "METHOD":
+ index = m.attributes.getIndex(cf.constant_pool,
+ AnnoType);
+ memberName = m.getName(cf.constant_pool);
+ if (index != -1)
+ attr = m.attributes.get(index);
+ //fetch index annotations from code attribute.
+ index2 = m.attributes.getIndex(cf.constant_pool,
+ Attribute.Code);
+ if (index2 != -1) {
+ cattr = m.attributes.get(index2);
+ assert cattr instanceof Code_attribute;
+ CAttr = (Code_attribute)cattr;
+ index2 = CAttr.attributes.getIndex(cf.constant_pool,
+ AnnoType);
+ if (index2 != -1)
+ cattr = CAttr.attributes.get(index2);
+ }
+ break;
+ case "FIELD":
+ index = f.attributes.getIndex(cf.constant_pool,
+ AnnoType);
+ memberName = f.getName(cf.constant_pool);
+ if (index != -1)
+ attr = f.attributes.get(index);
+ //fetch index annotations from code attribute.
+ index2 = cf.attributes.getIndex(cf.constant_pool,
+ Attribute.Code);
+ if (index2!= -1) {
+ cattr = cf.attributes.get(index2);
+ assert cattr instanceof Code_attribute;
+ CAttr = (Code_attribute)cattr;
+ index2 = CAttr.attributes.getIndex(cf.constant_pool,
+ AnnoType);
+ if (index2!= -1)
+ cattr = CAttr.attributes.get(index2);
+ }
+ break;
+
+ default:
+ memberName = cf.getName();
+ index = cf.attributes.getIndex(cf.constant_pool,
+ AnnoType);
+ if (index!= -1) attr = cf.attributes.get(index);
+ break;
+ }
+ }
+ catch (ConstantPoolException cpe) { cpe.printStackTrace(); }
+ try {
+ testClassName=cf.getName();
+ testcase = ttype + ": " + testClassName + ": " +
+ memberName + ", ";
+ }
+ catch (ConstantPoolException cpe) { cpe.printStackTrace(); }
+ if (index != -1) {
+ switch (AnnoType) {
+ case Attribute.RuntimeVisibleTypeAnnotations:
+ //count RuntimeVisibleTypeAnnotations
+ RuntimeVisibleTypeAnnotations_attribute RVTAa =
+ (RuntimeVisibleTypeAnnotations_attribute)attr;
+ vtaActual += RVTAa.annotations.length;
+ break;
+ case Attribute.RuntimeVisibleAnnotations:
+ //count RuntimeVisibleAnnotations
+ RuntimeVisibleAnnotations_attribute RVAa =
+ (RuntimeVisibleAnnotations_attribute)attr;
+ vaActual += RVAa.annotations.length;
+ break;
+ case Attribute.RuntimeInvisibleTypeAnnotations:
+ //count RuntimeInvisibleTypeAnnotations
+ RuntimeInvisibleTypeAnnotations_attribute RITAa =
+ (RuntimeInvisibleTypeAnnotations_attribute)attr;
+ itaActual += RITAa.annotations.length;
+ break;
+ case Attribute.RuntimeInvisibleAnnotations:
+ //count RuntimeInvisibleAnnotations
+ RuntimeInvisibleAnnotations_attribute RIAa =
+ (RuntimeInvisibleAnnotations_attribute)attr;
+ iaActual += RIAa.annotations.length;
+ break;
+ }
+ }
+ // annotations from code attribute.
+ if (index2 != -1) {
+ switch (AnnoType) {
+ case Attribute.RuntimeVisibleTypeAnnotations:
+ //count RuntimeVisibleTypeAnnotations
+ RuntimeVisibleTypeAnnotations_attribute RVTAa =
+ (RuntimeVisibleTypeAnnotations_attribute)cattr;
+ vtaActual += RVTAa.annotations.length;
+ break;
+ case Attribute.RuntimeVisibleAnnotations:
+ //count RuntimeVisibleAnnotations
+ RuntimeVisibleAnnotations_attribute RVAa =
+ (RuntimeVisibleAnnotations_attribute)cattr;
+ vaActual += RVAa.annotations.length;
+ break;
+ case Attribute.RuntimeInvisibleTypeAnnotations:
+ //count RuntimeInvisibleTypeAnnotations
+ RuntimeInvisibleTypeAnnotations_attribute RITAa =
+ (RuntimeInvisibleTypeAnnotations_attribute)cattr;
+ itaActual += RITAa.annotations.length;
+ break;
+ case Attribute.RuntimeInvisibleAnnotations:
+ //count RuntimeInvisibleAnnotations
+ RuntimeInvisibleAnnotations_attribute RIAa =
+ (RuntimeInvisibleAnnotations_attribute)cattr;
+ iaActual += RIAa.annotations.length;
+ break;
+ }
+ }
+ }
+
+ switch (memberName) {
+ //METHODs
+ case "test" : vtaExp=4; itaExp=4; vaExp=0; iaExp=0; tc++; break;
+ case "mtest": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "m3": vtaExp=10; itaExp=10; vaExp=1; iaExp=1; tc++; break;
+ case "tm": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ //inner class
+ case "i_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "i_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "i_um": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ //local class
+ case "l_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "l_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "l_um": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ //anon class
+ case "mm_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "mm_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "mm_m3": vtaExp=10; itaExp=10;vaExp=1; iaExp=1; tc++; break;
+ case "mm_tm": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ //InnerAnon class
+ case "ia_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "ia_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "ia_um": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ //FIELDs
+ case "data": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "odata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "pdata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "tdata": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "sa1": vtaExp = 6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ //inner class
+ case "i_odata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "i_pdata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "i_udata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "i_sa1": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ case "i_tdata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ //local class
+ case "l_odata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "l_pdata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "l_udata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "l_sa1": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ case "l_tdata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ //anon class
+ case "mm_odata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "mm_pdata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "mm_sa1": vtaExp = 6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ case "mm_tdata": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ // InnerAnon class
+ case "ia_odata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "ia_pdata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "ia_udata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "ia_sa1": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break;
+ case "ia_tdata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break;
+ case "IA": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ case "IN": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break;
+ // default cases are <init>, this$0, this$1, mmtest, atest
+ default: vtaExp = 0; itaExp=0; vaExp=0; iaExp=0; break;
+ }
+ check(testcase,vtaExp, itaExp, vaExp, iaExp,
+ vtaActual,itaActual,vaActual,iaActual);
+ }
+
+ public void run() {
+ ClassFile cf = null;
+ InputStream in = null;
+ int testcount = 1;
+ File testFile = null;
+ // Generate source, check methods and fields for each combination.
+ for (Boolean[] bCombo : bRepeat) {
+ As=bCombo[0]; Bs=bCombo[1]; Cs=bCombo[2];
+ Ds=bCombo[3]; TAs=bCombo[4]; TBs=bCombo[5];
+ String testname = "Test" + testcount++;
+ println("Combinations: " + As + ", " + Bs + ", " + Cs + ", " + Ds +
+ ", " + TAs + ", " + TBs +
+ "; see " + testname + ".java");
+ String[] classes = {testname + ".class",
+ testname + "$Inner.class",
+ testname + "$1Local1.class",
+ testname + "$1.class",
+ testname + "$1$1.class",
+ testname + "$1$InnerAnon.class"
+ };
+ // Create test source, create and compile File.
+ String sourceString = getSource(srcTemplate, testname,
+ As, Bs, Cs, Ds, TAs, TBs);
+ System.out.println(sourceString);
+ try {
+ testFile = writeTestFile(testname+".java", sourceString);
+ }
+ catch (IOException ioe) { ioe.printStackTrace(); }
+ // Compile test source and read classfile.
+ File classFile = null;
+ try {
+ classFile = compile(testFile);
+ }
+ catch (Error err) {
+ System.err.println("FAILED compile. Source:\n" + sourceString);
+ throw err;
+ }
+ String testloc = classFile.getAbsolutePath().substring(
+ 0,classFile.getAbsolutePath().indexOf(classFile.getPath()));
+ for (String clazz : classes) {
+ try {
+ cf = ClassFile.read(new File(testloc+clazz));
+ }
+ catch (Exception e) { e.printStackTrace(); }
+ // Test for all methods and fields
+ for (Method m: cf.methods) {
+ test("METHOD", cf, m, null, true);
+ }
+ for (Field f: cf.fields) {
+ test("FIELD", cf, null, f, true);
+ }
+ }
+ }
+ report();
+ if (tc!=xtc) System.out.println("Test Count: " + tc + " != " +
+ "expected: " + xtc);
+ }
+
+
+ String getSrcTemplate(String sTemplate) {
+ List<String> tmpl = null;
+ String sTmpl = "";
+ try {
+ tmpl = Files.readAllLines(new File(testSrc,sTemplate).toPath(),
+ Charset.defaultCharset());
+ }
+ catch (IOException ioe) {
+ String error = "FAILED: Test failed to read template" + sTemplate;
+ ioe.printStackTrace();
+ throw new RuntimeException(error);
+ }
+ for (String l : tmpl)
+ sTmpl=sTmpl.concat(l).concat("\n");
+ return sTmpl;
+ }
+
+ // test class template
+ String getSource(String templateName, String testname,
+ Boolean Arepeats, Boolean Brepeats,
+ Boolean Crepeats, Boolean Drepeats,
+ Boolean TArepeats, Boolean TBrepeats) {
+ String As = Arepeats ? "@A @A":"@A",
+ Bs = Brepeats ? "@B @B":"@B",
+ Cs = Crepeats ? "@C @C":"@C",
+ Ds = Drepeats ? "@D @D":"@D",
+ TAs = TArepeats ? "@TA @TA":"@TA",
+ TBs = TBrepeats ? "@TB @TB":"@TB";
+
+ // split up replace() lines for readability
+ String testsource = getSrcTemplate(templateName).replace("testname",testname);
+ testsource = testsource.replace("_As",As).replace("_Bs",Bs).replace("_Cs",Cs);
+ testsource = testsource.replace("_Ds",Ds).replace("_TAs",TAs).replace("_TBs",TBs);
+ return testsource;
+ }
+}
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/classfile/testanoninner.template Thu Oct 10 20:57:27 2013 -0700
@@ -0,0 +1,108 @@
+import java.lang.annotation.*;
+import static java.lang.annotation.RetentionPolicy.*;
+import static java.lang.annotation.ElementType.*;
+import java.util.List;
+
+class testname <T> { // TestN.class
+ _As _Bs _Cs _Ds String data = "test";
+ _As _Bs _Cs _Ds Object mtest( _As _Bs _Cs _Ds testname <T> t){ return null; }
+ Object mmtest( testname<T> t){ return null; }
+
+ class Inner<U> { // TestN$1$Inner.class
+ _As _Bs _Cs _Ds String i_odata1 = "test";
+ _As _Bs _Cs _Ds int i_pdata1 = 0;
+ _As _Bs _Cs _Ds U i_udata = null;
+//8015257
+ _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds [] i_sa1 = null;
+ _As _Bs _Cs _Ds T i_tdata = null;
+ _As _Bs _Cs _Ds String i_m1(){ return null; };
+ _As _Bs _Cs _Ds int i_m2( _As _Bs _Cs _Ds Object o){return 0;}
+ _As _Bs _Cs _Ds
+ <_TAs _TBs _Cs _Ds U> Object i_um( _As _Bs _Cs _Ds U u) { return null; }
+ }
+//8015323
+ _As _Bs _Cs _Ds Inner< _As _Bs _Cs _Ds String> IN = new Inner< String>();
+
+ public void test() {
+
+ class Local1<U> { // TestN$Local1.class
+ _As _Bs _Cs _Ds String l_odata1 = "test";
+ _As _Bs _Cs _Ds int l_pdata1 = 0;
+ _As _Bs _Cs _Ds U l_udata = null;
+//8015257
+ _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] l_sa1 = null;
+ _TAs _TBs _Cs _Ds T l_tdata = null;
+ _As _Bs _Cs _Ds String l_m1(){ return null; };
+ _As _Bs _Cs _Ds int l_m2(_As _Bs _Cs _Ds Object o){return 0;}
+ _As _Bs _Cs _Ds
+ <_TAs _TBs _Cs _Ds U> Object l_um(_As _Bs _Cs _Ds U u) { return null; }
+ }
+ // The below, as a local variable, will show up on test()
+ _As _Bs _Cs _Ds Local1<_As _Bs _Cs _Ds String> LC = new Local1<String>();
+
+ mtest( new testname<T>() { // TestN$1
+ class InnerAnon<U> { // TestN$1$InnerAnon.class
+ _As _Bs _Cs _Ds String ia_odata1 = "test";
+ _As _Bs _Cs _Ds int ia_pdata1 = 0;
+ _As _Bs _Cs _Ds U ia_udata = null;
+//8015257
+ _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] ia_sa1 = null;
+ _TAs _TBs _Cs _Ds T ia_tdata = null;
+ _As _Bs _Cs _Ds String ia_m1(){ return null; };
+ _As _Bs _Cs _Ds int ia_m2(_As _Bs _Cs _Ds Object o){return 0;}
+ _As _Bs _Cs _Ds
+ <_TAs _TBs _Cs _Ds U> Object ia_um(_As _Bs _Cs _Ds U u) { return null; }
+ }
+//8015257
+ _As _Bs _Cs _Ds InnerAnon<_As _Bs _Cs _Ds String> IA = new InnerAnon< String>();
+
+ _As _Bs _Cs _Ds String odata1 = "test";
+ _As _Bs _Cs _Ds int pdata1 = 0;
+//8015257
+ _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa1 = null;
+ _As _Bs _Cs _Ds T tdata = null;
+
+ _As _Bs _Cs _Ds String m1(){ return null; };
+ _As _Bs _Cs _Ds int m2(_As _Bs _Cs _Ds Object o){return 0;}
+
+ _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds []
+ m3(String _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa){ return null; }
+
+ _As _Bs _Cs _Ds
+ <_TAs _TBs _Cs _Ds T> Object tm(_As _Bs _Cs _Ds T t) { return null; }
+
+ public void atest( testname<T> t){
+ t.mmtest( new testname<T>() { // TestN$1$1.class
+ _As _Bs _Cs _Ds String mm_odata1 = "test";
+ _As _Bs _Cs _Ds int mm_pdata1 = 0;
+//8015257
+ _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] mm_sa1 = null;
+ _TAs _TBs _Cs _Ds T mm_tdata = null;
+
+ _As _Bs _Cs _Ds String mm_m1(){ return null; };
+ _As _Bs _Cs _Ds int mm_m2(_As _Bs _Cs _Ds Object o){return 0;}
+
+ _As _Bs _Cs _Ds String _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds []
+ mm_m3(String _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa){ return null; }
+
+ _As _Bs _Cs _Ds
+ <_TAs _TBs _Cs _Ds T> Object mm_tm(_As _Bs _Cs _Ds T t) { return null; }
+ });
+ }
+ });
+ }
+}
+@Retention(RUNTIME) @Target({TYPE_USE,FIELD}) @Repeatable( AC.class ) @interface A { }
+@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @Repeatable( BC.class ) @interface B { }
+@Retention(RUNTIME) @Target({TYPE_USE,FIELD}) @interface AC { A[] value(); }
+@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @interface BC { B[] value(); }
+
+@Retention(CLASS) @Target({TYPE_USE,FIELD}) @Repeatable( CC.class ) @interface C { }
+@Retention(CLASS) @Target({TYPE_USE,METHOD}) @Repeatable( DC.class ) @interface D { }
+@Retention(CLASS) @Target({TYPE_USE,FIELD}) @interface CC { C[] value(); }
+@Retention(CLASS) @Target({TYPE_USE,METHOD}) @interface DC { D[] value(); }
+
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,FIELD}) @Repeatable( TAC.class ) @interface TA { }
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,METHOD}) @Repeatable( TBC.class ) @interface TB { }
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,FIELD}) @interface TAC { TA[] value(); }
+@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,METHOD}) @interface TBC { TB[] value(); }
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.java Thu Oct 10 20:57:27 2013 -0700
@@ -1,7 +1,7 @@
/*
* @test /nodynamiccopyright/
* @bug 8006733 8006775
- * @ignore 8013409: test failures for type annotations
+
* @summary A static outer class cannot be annotated.
* @author Werner Dietl
* @compile/fail/ref=CantAnnotateStaticClass.out -XDrawDiagnostics CantAnnotateStaticClass.java
--- a/langtools/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out Thu Oct 10 20:57:27 2013 -0700
@@ -1,1 +1,10 @@
-dummy
\ No newline at end of file
+CantAnnotateStaticClass.java:22:20: compiler.err.cant.annotate.static.class
+CantAnnotateStaticClass.java:23:13: compiler.err.cant.annotate.static.class
+CantAnnotateStaticClass.java:24:29: compiler.err.cant.annotate.static.class
+CantAnnotateStaticClass.java:26:29: compiler.err.cant.annotate.static.class
+CantAnnotateStaticClass.java:29:26: compiler.err.cant.annotate.static.class
+CantAnnotateStaticClass.java:30:9: compiler.err.cant.annotate.static.class
+CantAnnotateStaticClass.java:31:35: compiler.err.cant.annotate.static.class
+- compiler.note.unchecked.filename: CantAnnotateStaticClass.java
+- compiler.note.unchecked.recompile
+7 errors
--- a/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/MultiCatch.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/newlocations/MultiCatch.java Thu Oct 10 20:57:27 2013 -0700
@@ -25,6 +25,7 @@
/*
* @test
+ * @ignore 8008762 Type annotations failures
* @bug 8006775
* @summary new type annotation location: multicatch
* @author Werner Dietl
--- a/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java Thu Oct 10 13:41:08 2013 -0700
+++ b/langtools/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java Thu Oct 10 20:57:27 2013 -0700
@@ -25,6 +25,7 @@
/*
* @test
+ * @ignore 8008762 Type annotation failures
* @bug 8006732 8006775
* @summary Test population of reference info for multicatch exception parameters
* @author Werner Dietl
--- a/langtools/test/tools/javac/diags/examples/DuplicateAnnotation.java Thu Oct 10 13:41:08 2013 -0700
+++ /dev/null Thu Jan 01 00:00:00 1970 +0000
@@ -1,32 +0,0 @@
-/*
- * Copyright (c) 2010, 2012, 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.
- */
-
-// key: compiler.err.duplicate.annotation
-// key: compiler.warn.source.no.bootclasspath
-// options: -source 7
-
-@interface Anno { }
-
-@Anno
-@Anno
-class DuplicateAnnotation { }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/InterfaceOrArrayExpected.java Thu Oct 10 20:57:27 2013 -0700
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+// key: compiler.err.intf.or.array.expected.here
+
+import java.util.List;
+
+class InterfaceExpected<T extends List & String> { }
--- /dev/null Thu Jan 01 00:00:00 1970 +0000
+++ b/langtools/test/tools/javac/diags/examples/RepeatableAnnotationsNotSupported.java Thu Oct 10 20:57:27 2013 -0700
@@ -0,0 +1,32 @@
+/*
+ * Copyright (c) 2010, 2012, 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.
+ */
+
+// key: compiler.err.repeatable.annotations.not.supported.in.source
+// key: compiler.warn.source.no.bootclasspath
+// options: -source 7
+
+@interface Anno { }
+
+@Anno
+@Anno
+class RepeatableAnnotationsNotSupported { }