Thu, 10 Oct 2013 20:57:27 -0700
Merge
test/tools/javac/diags/examples/DuplicateAnnotation.java | file | annotate | diff | comparison | revisions |
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java Thu Oct 10 13:41:08 2013 -0700 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractExecutableMemberWriter.java Thu Oct 10 20:57:27 2013 -0700 1.3 @@ -305,6 +305,6 @@ 1.4 buf.append(t.dimension()); 1.5 } 1.6 buf.append(")"); 1.7 - return foundTypeVariable ? buf.toString() : null; 1.8 + return foundTypeVariable ? writer.getName(buf.toString()) : null; 1.9 } 1.10 }
2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Thu Oct 10 13:41:08 2013 -0700 2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Thu Oct 10 20:57:27 2013 -0700 2.3 @@ -89,10 +89,11 @@ 2.4 * @param memberlist List of members for the unicode character 2.5 * @param contentTree the content tree to which the information will be added 2.6 */ 2.7 - protected void addContents(Character unicode, List<? extends Doc> memberlist, 2.8 + protected void addContents(Character uc, List<? extends Doc> memberlist, 2.9 Content contentTree) { 2.10 - contentTree.addContent(getMarkerAnchor("_" + unicode + "_")); 2.11 - Content headContent = new StringContent(unicode.toString()); 2.12 + String unicode = uc.toString(); 2.13 + contentTree.addContent(getMarkerAnchorForIndex(unicode)); 2.14 + Content headContent = new StringContent(unicode); 2.15 Content heading = HtmlTree.HEADING(HtmlConstants.CONTENT_HEADING, false, 2.16 HtmlStyle.title, headContent); 2.17 contentTree.addContent(heading); 2.18 @@ -253,4 +254,24 @@ 2.19 addPreQualifiedClassLink(LinkInfoImpl.Kind.INDEX, containing, 2.20 false, contentTree); 2.21 } 2.22 + 2.23 + /** 2.24 + * Get the marker anchor which will be added to the index documentation tree. 2.25 + * 2.26 + * @param anchorNameForIndex the anchor name attribute for index page 2.27 + * @return a content tree for the marker anchor 2.28 + */ 2.29 + public Content getMarkerAnchorForIndex(String anchorNameForIndex) { 2.30 + return getMarkerAnchor(getNameForIndex(anchorNameForIndex), null); 2.31 + } 2.32 + 2.33 + /** 2.34 + * Generate a valid HTML name for member index page. 2.35 + * 2.36 + * @param unicode the string that needs to be converted to valid HTML name. 2.37 + * @return a valid HTML name string. 2.38 + */ 2.39 + public String getNameForIndex(String unicode) { 2.40 + return "I:" + getName(unicode); 2.41 + } 2.42 }
3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeFieldWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 3.3 @@ -88,7 +88,7 @@ 3.4 Content memberDetailsTree) { 3.5 if (!writer.printedAnnotationFieldHeading) { 3.6 memberDetailsTree.addContent(writer.getMarkerAnchor( 3.7 - "annotation_type_field_detail")); 3.8 + SectionName.ANNOTATION_TYPE_FIELD_DETAIL)); 3.9 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 3.10 writer.fieldDetailsLabel); 3.11 memberDetailsTree.addContent(heading); 3.12 @@ -217,7 +217,7 @@ 3.13 */ 3.14 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 3.15 memberTree.addContent(writer.getMarkerAnchor( 3.16 - "annotation_type_field_summary")); 3.17 + SectionName.ANNOTATION_TYPE_FIELD_SUMMARY)); 3.18 } 3.19 3.20 /** 3.21 @@ -272,7 +272,8 @@ 3.22 */ 3.23 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 3.24 if (link) { 3.25 - return writer.getHyperLink("annotation_type_field_summary", 3.26 + return writer.getHyperLink( 3.27 + SectionName.ANNOTATION_TYPE_FIELD_SUMMARY, 3.28 writer.getResource("doclet.navField")); 3.29 } else { 3.30 return writer.getResource("doclet.navField"); 3.31 @@ -284,7 +285,8 @@ 3.32 */ 3.33 protected void addNavDetailLink(boolean link, Content liNav) { 3.34 if (link) { 3.35 - liNav.addContent(writer.getHyperLink("annotation_type_field_detail", 3.36 + liNav.addContent(writer.getHyperLink( 3.37 + SectionName.ANNOTATION_TYPE_FIELD_DETAIL, 3.38 writer.getResource("doclet.navField"))); 3.39 } else { 3.40 liNav.addContent(writer.getResource("doclet.navField"));
4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 4.3 @@ -133,7 +133,7 @@ 4.4 */ 4.5 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 4.6 memberTree.addContent(writer.getMarkerAnchor( 4.7 - "annotation_type_optional_element_summary")); 4.8 + SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY)); 4.9 } 4.10 4.11 /** 4.12 @@ -141,7 +141,8 @@ 4.13 */ 4.14 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 4.15 if (link) { 4.16 - return writer.getHyperLink("annotation_type_optional_element_summary", 4.17 + return writer.getHyperLink( 4.18 + SectionName.ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY, 4.19 writer.getResource("doclet.navAnnotationTypeOptionalMember")); 4.20 } else { 4.21 return writer.getResource("doclet.navAnnotationTypeOptionalMember");
5.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 5.3 @@ -89,7 +89,7 @@ 5.4 Content memberDetailsTree) { 5.5 if (!writer.printedAnnotationHeading) { 5.6 memberDetailsTree.addContent(writer.getMarkerAnchor( 5.7 - "annotation_type_element_detail")); 5.8 + SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL)); 5.9 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 5.10 writer.annotationTypeDetailsLabel); 5.11 memberDetailsTree.addContent(heading); 5.12 @@ -219,7 +219,7 @@ 5.13 */ 5.14 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 5.15 memberTree.addContent(writer.getMarkerAnchor( 5.16 - "annotation_type_required_element_summary")); 5.17 + SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY)); 5.18 } 5.19 5.20 /** 5.21 @@ -274,7 +274,8 @@ 5.22 */ 5.23 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 5.24 if (link) { 5.25 - return writer.getHyperLink("annotation_type_required_element_summary", 5.26 + return writer.getHyperLink( 5.27 + SectionName.ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY, 5.28 writer.getResource("doclet.navAnnotationTypeRequiredMember")); 5.29 } else { 5.30 return writer.getResource("doclet.navAnnotationTypeRequiredMember"); 5.31 @@ -286,7 +287,8 @@ 5.32 */ 5.33 protected void addNavDetailLink(boolean link, Content liNav) { 5.34 if (link) { 5.35 - liNav.addContent(writer.getHyperLink("annotation_type_element_detail", 5.36 + liNav.addContent(writer.getHyperLink( 5.37 + SectionName.ANNOTATION_TYPE_ELEMENT_DETAIL, 5.38 writer.getResource("doclet.navAnnotationTypeMember"))); 5.39 } else { 5.40 liNav.addContent(writer.getResource("doclet.navAnnotationTypeMember"));
6.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 6.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstantsSummaryWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 6.3 @@ -107,7 +107,8 @@ 6.4 //add link to summary 6.5 Content link; 6.6 if (packageName.length() == 0) { 6.7 - link = getHyperLink(DocLink.fragment(DocletConstants.UNNAMED_PACKAGE_ANCHOR), 6.8 + link = getHyperLink(getDocLink( 6.9 + SectionName.UNNAMED_PACKAGE_ANCHOR), 6.10 defaultPackageLabel, "", ""); 6.11 } else { 6.12 Content packageNameContent = getPackageLabel(parsedPackageName); 6.13 @@ -153,7 +154,7 @@ 6.14 Content pkgNameContent; 6.15 if (parsedPackageName.length() == 0) { 6.16 summariesTree.addContent(getMarkerAnchor( 6.17 - DocletConstants.UNNAMED_PACKAGE_ANCHOR)); 6.18 + SectionName.UNNAMED_PACKAGE_ANCHOR)); 6.19 pkgNameContent = defaultPackageLabel; 6.20 } else { 6.21 summariesTree.addContent(getMarkerAnchor(
7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 7.3 @@ -97,7 +97,8 @@ 7.4 Content memberDetailsTree) { 7.5 memberDetailsTree.addContent(HtmlConstants.START_OF_CONSTRUCTOR_DETAILS); 7.6 Content constructorDetailsTree = writer.getMemberTreeHeader(); 7.7 - constructorDetailsTree.addContent(writer.getMarkerAnchor("constructor_detail")); 7.8 + constructorDetailsTree.addContent(writer.getMarkerAnchor( 7.9 + SectionName.CONSTRUCTOR_DETAIL)); 7.10 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 7.11 writer.constructorDetailsLabel); 7.12 constructorDetailsTree.addContent(heading); 7.13 @@ -256,7 +257,8 @@ 7.14 * {@inheritDoc} 7.15 */ 7.16 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 7.17 - memberTree.addContent(writer.getMarkerAnchor("constructor_summary")); 7.18 + memberTree.addContent(writer.getMarkerAnchor( 7.19 + SectionName.CONSTRUCTOR_SUMMARY)); 7.20 } 7.21 7.22 /** 7.23 @@ -280,7 +282,7 @@ 7.24 */ 7.25 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 7.26 if (link) { 7.27 - return writer.getHyperLink("constructor_summary", 7.28 + return writer.getHyperLink(SectionName.CONSTRUCTOR_SUMMARY, 7.29 writer.getResource("doclet.navConstructor")); 7.30 } else { 7.31 return writer.getResource("doclet.navConstructor"); 7.32 @@ -292,7 +294,8 @@ 7.33 */ 7.34 protected void addNavDetailLink(boolean link, Content liNav) { 7.35 if (link) { 7.36 - liNav.addContent(writer.getHyperLink("constructor_detail", 7.37 + liNav.addContent(writer.getHyperLink( 7.38 + SectionName.CONSTRUCTOR_DETAIL, 7.39 writer.getResource("doclet.navConstructor"))); 7.40 } else { 7.41 liNav.addContent(writer.getResource("doclet.navConstructor"));
8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Thu Oct 10 13:41:08 2013 -0700 8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/DeprecatedListWriter.java Thu Oct 10 20:57:27 2013 -0700 8.3 @@ -48,8 +48,8 @@ 8.4 8.5 private static final String[] ANCHORS = new String[] { 8.6 "package", "interface", "class", "enum", "exception", "error", 8.7 - "annotation_type", "field", "method", "constructor", "enum_constant", 8.8 - "annotation_type_member" 8.9 + "annotation.type", "field", "method", "constructor", "enum.constant", 8.10 + "annotation.type.member" 8.11 }; 8.12 8.13 private static final String[] HEADING_KEYS = new String[] {
9.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 9.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 9.3 @@ -73,7 +73,8 @@ 9.4 Content memberDetailsTree) { 9.5 memberDetailsTree.addContent(HtmlConstants.START_OF_ENUM_CONSTANT_DETAILS); 9.6 Content enumConstantsDetailsTree = writer.getMemberTreeHeader(); 9.7 - enumConstantsDetailsTree.addContent(writer.getMarkerAnchor("enum_constant_detail")); 9.8 + enumConstantsDetailsTree.addContent(writer.getMarkerAnchor( 9.9 + SectionName.ENUM_CONSTANT_DETAIL)); 9.10 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 9.11 writer.enumConstantsDetailsLabel); 9.12 enumConstantsDetailsTree.addContent(heading); 9.13 @@ -202,7 +203,8 @@ 9.14 * {@inheritDoc} 9.15 */ 9.16 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 9.17 - memberTree.addContent(writer.getMarkerAnchor("enum_constant_summary")); 9.18 + memberTree.addContent(writer.getMarkerAnchor( 9.19 + SectionName.ENUM_CONSTANT_SUMMARY)); 9.20 } 9.21 9.22 /** 9.23 @@ -263,11 +265,14 @@ 9.24 */ 9.25 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 9.26 if (link) { 9.27 - return writer.getHyperLink((cd == null)? 9.28 - "enum_constant_summary": 9.29 - "enum_constants_inherited_from_class_" + 9.30 - configuration.getClassName(cd), 9.31 - writer.getResource("doclet.navEnum")); 9.32 + if (cd == null) { 9.33 + return writer.getHyperLink(SectionName.ENUM_CONSTANT_SUMMARY, 9.34 + writer.getResource("doclet.navEnum")); 9.35 + } else { 9.36 + return writer.getHyperLink( 9.37 + SectionName.ENUM_CONSTANTS_INHERITANCE, 9.38 + configuration.getClassName(cd), writer.getResource("doclet.navEnum")); 9.39 + } 9.40 } else { 9.41 return writer.getResource("doclet.navEnum"); 9.42 } 9.43 @@ -278,7 +283,8 @@ 9.44 */ 9.45 protected void addNavDetailLink(boolean link, Content liNav) { 9.46 if (link) { 9.47 - liNav.addContent(writer.getHyperLink("enum_constant_detail", 9.48 + liNav.addContent(writer.getHyperLink( 9.49 + SectionName.ENUM_CONSTANT_DETAIL, 9.50 writer.getResource("doclet.navEnum"))); 9.51 } else { 9.52 liNav.addContent(writer.getResource("doclet.navEnum"));
10.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 10.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 10.3 @@ -74,7 +74,8 @@ 10.4 Content memberDetailsTree) { 10.5 memberDetailsTree.addContent(HtmlConstants.START_OF_FIELD_DETAILS); 10.6 Content fieldDetailsTree = writer.getMemberTreeHeader(); 10.7 - fieldDetailsTree.addContent(writer.getMarkerAnchor("field_detail")); 10.8 + fieldDetailsTree.addContent(writer.getMarkerAnchor( 10.9 + SectionName.FIELD_DETAIL)); 10.10 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 10.11 writer.fieldDetailsLabel); 10.12 fieldDetailsTree.addContent(heading); 10.13 @@ -224,7 +225,8 @@ 10.14 * {@inheritDoc} 10.15 */ 10.16 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 10.17 - memberTree.addContent(writer.getMarkerAnchor("field_summary")); 10.18 + memberTree.addContent(writer.getMarkerAnchor( 10.19 + SectionName.FIELD_SUMMARY)); 10.20 } 10.21 10.22 /** 10.23 @@ -232,7 +234,7 @@ 10.24 */ 10.25 public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { 10.26 inheritedTree.addContent(writer.getMarkerAnchor( 10.27 - "fields_inherited_from_class_" + configuration.getClassName(cd))); 10.28 + SectionName.FIELDS_INHERITANCE, configuration.getClassName(cd))); 10.29 } 10.30 10.31 /** 10.32 @@ -293,11 +295,15 @@ 10.33 */ 10.34 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 10.35 if (link) { 10.36 - return writer.getHyperLink((cd == null)? 10.37 - "field_summary": 10.38 - "fields_inherited_from_class_" + 10.39 - configuration.getClassName(cd), 10.40 - writer.getResource("doclet.navField")); 10.41 + if (cd == null) { 10.42 + return writer.getHyperLink( 10.43 + SectionName.FIELD_SUMMARY, 10.44 + writer.getResource("doclet.navField")); 10.45 + } else { 10.46 + return writer.getHyperLink( 10.47 + SectionName.FIELDS_INHERITANCE, 10.48 + configuration.getClassName(cd), writer.getResource("doclet.navField")); 10.49 + } 10.50 } else { 10.51 return writer.getResource("doclet.navField"); 10.52 } 10.53 @@ -308,7 +314,8 @@ 10.54 */ 10.55 protected void addNavDetailLink(boolean link, Content liNav) { 10.56 if (link) { 10.57 - liNav.addContent(writer.getHyperLink("field_detail", 10.58 + liNav.addContent(writer.getHyperLink( 10.59 + SectionName.FIELD_DETAIL, 10.60 writer.getResource("doclet.navField"))); 10.61 } else { 10.62 liNav.addContent(writer.getResource("doclet.navField"));
11.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Thu Oct 10 13:41:08 2013 -0700 11.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Thu Oct 10 20:57:27 2013 -0700 11.3 @@ -509,28 +509,28 @@ 11.4 body.addContent(HtmlConstants.START_OF_TOP_NAVBAR); 11.5 navDiv.addStyle(HtmlStyle.topNav); 11.6 allClassesId += "navbar_top"; 11.7 - Content a = getMarkerAnchor("navbar_top"); 11.8 + Content a = getMarkerAnchor(SectionName.NAVBAR_TOP); 11.9 //WCAG - Hyperlinks should contain text or an image with alt text - for AT tools 11.10 navDiv.addContent(a); 11.11 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink( 11.12 - DocLink.fragment("skip-navbar_top"), skipNavLinks, 11.13 + getDocLink(SectionName.SKIP_NAVBAR_TOP), skipNavLinks, 11.14 skipNavLinks.toString(), "")); 11.15 navDiv.addContent(skipLinkContent); 11.16 } else { 11.17 body.addContent(HtmlConstants.START_OF_BOTTOM_NAVBAR); 11.18 navDiv.addStyle(HtmlStyle.bottomNav); 11.19 allClassesId += "navbar_bottom"; 11.20 - Content a = getMarkerAnchor("navbar_bottom"); 11.21 + Content a = getMarkerAnchor(SectionName.NAVBAR_BOTTOM); 11.22 navDiv.addContent(a); 11.23 Content skipLinkContent = HtmlTree.DIV(HtmlStyle.skipNav, getHyperLink( 11.24 - DocLink.fragment("skip-navbar_bottom"), skipNavLinks, 11.25 + getDocLink(SectionName.SKIP_NAVBAR_BOTTOM), skipNavLinks, 11.26 skipNavLinks.toString(), "")); 11.27 navDiv.addContent(skipLinkContent); 11.28 } 11.29 if (header) { 11.30 - navDiv.addContent(getMarkerAnchor("navbar_top_firstrow")); 11.31 + navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_TOP_FIRSTROW)); 11.32 } else { 11.33 - navDiv.addContent(getMarkerAnchor("navbar_bottom_firstrow")); 11.34 + navDiv.addContent(getMarkerAnchor(SectionName.NAVBAR_BOTTOM_FIRSTROW)); 11.35 } 11.36 HtmlTree navList = new HtmlTree(HtmlTag.UL); 11.37 navList.addStyle(HtmlStyle.navList); 11.38 @@ -577,11 +577,11 @@ 11.39 subDiv.addContent(getAllClassesLinkScript(allClassesId.toString())); 11.40 addSummaryDetailLinks(subDiv); 11.41 if (header) { 11.42 - subDiv.addContent(getMarkerAnchor("skip-navbar_top")); 11.43 + subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_TOP)); 11.44 body.addContent(subDiv); 11.45 body.addContent(HtmlConstants.END_OF_TOP_NAVBAR); 11.46 } else { 11.47 - subDiv.addContent(getMarkerAnchor("skip-navbar_bottom")); 11.48 + subDiv.addContent(getMarkerAnchor(SectionName.SKIP_NAVBAR_BOTTOM)); 11.49 body.addContent(subDiv); 11.50 body.addContent(HtmlConstants.END_OF_BOTTOM_NAVBAR); 11.51 } 11.52 @@ -886,7 +886,28 @@ 11.53 * @return a content tree for the marker anchor 11.54 */ 11.55 public Content getMarkerAnchor(String anchorName) { 11.56 - return getMarkerAnchor(anchorName, null); 11.57 + return getMarkerAnchor(getName(anchorName), null); 11.58 + } 11.59 + 11.60 + /** 11.61 + * Get the marker anchor which will be added to the documentation tree. 11.62 + * 11.63 + * @param sectionName the section name anchor attribute for page 11.64 + * @return a content tree for the marker anchor 11.65 + */ 11.66 + public Content getMarkerAnchor(SectionName sectionName) { 11.67 + return getMarkerAnchor(sectionName.getName(), null); 11.68 + } 11.69 + 11.70 + /** 11.71 + * Get the marker anchor which will be added to the documentation tree. 11.72 + * 11.73 + * @param sectionName the section name anchor attribute for page 11.74 + * @param anchorName the anchor name combined with section name attribute for the page 11.75 + * @return a content tree for the marker anchor 11.76 + */ 11.77 + public Content getMarkerAnchor(SectionName sectionName, String anchorName) { 11.78 + return getMarkerAnchor(sectionName.getName() + getName(anchorName), null); 11.79 } 11.80 11.81 /** 11.82 @@ -1291,10 +1312,10 @@ 11.83 } else if (doc instanceof ExecutableMemberDoc) { 11.84 ExecutableMemberDoc emd = (ExecutableMemberDoc)doc; 11.85 return getLink(new LinkInfoImpl(configuration, context, classDoc) 11.86 - .label(label).where(getAnchor(emd, isProperty)).strong(strong)); 11.87 + .label(label).where(getName(getAnchor(emd, isProperty))).strong(strong)); 11.88 } else if (doc instanceof MemberDoc) { 11.89 return getLink(new LinkInfoImpl(configuration, context, classDoc) 11.90 - .label(label).where(doc.name()).strong(strong)); 11.91 + .label(label).where(getName(doc.name())).strong(strong)); 11.92 } else { 11.93 return label; 11.94 } 11.95 @@ -1319,10 +1340,10 @@ 11.96 } else if (doc instanceof ExecutableMemberDoc) { 11.97 ExecutableMemberDoc emd = (ExecutableMemberDoc) doc; 11.98 return getLink(new LinkInfoImpl(configuration, context, classDoc) 11.99 - .label(label).where(getAnchor(emd))); 11.100 + .label(label).where(getName(getAnchor(emd)))); 11.101 } else if (doc instanceof MemberDoc) { 11.102 return getLink(new LinkInfoImpl(configuration, context, classDoc) 11.103 - .label(label).where(doc.name())); 11.104 + .label(label).where(getName(doc.name()))); 11.105 } else { 11.106 return label; 11.107 }
12.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Thu Oct 10 13:41:08 2013 -0700 12.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Thu Oct 10 20:57:27 2013 -0700 12.3 @@ -49,8 +49,6 @@ 12.4 implements SerializedFormWriter.SerialFieldWriter { 12.5 ProgramElementDoc[] members = null; 12.6 12.7 - private boolean printedOverallAnchor = false; 12.8 - 12.9 public HtmlSerialFieldWriter(SubWriterHolderWriter writer, 12.10 ClassDoc classdoc) { 12.11 super(writer, classdoc); 12.12 @@ -98,10 +96,6 @@ 12.13 HtmlTree li = new HtmlTree(HtmlTag.LI); 12.14 li.addStyle(HtmlStyle.blockList); 12.15 if (serializableFieldsTree.isValid()) { 12.16 - if (!printedOverallAnchor) { 12.17 - li.addContent(writer.getMarkerAnchor("serializedForm")); 12.18 - printedOverallAnchor = true; 12.19 - } 12.20 Content headingContent = new StringContent(heading); 12.21 Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING, 12.22 headingContent);
13.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Thu Oct 10 13:41:08 2013 -0700 13.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Thu Oct 10 20:57:27 2013 -0700 13.3 @@ -85,12 +85,10 @@ 13.4 * @return a content tree for the serializable methods content 13.5 */ 13.6 public Content getSerializableMethods(String heading, Content serializableMethodContent) { 13.7 - Content li = HtmlTree.LI(HtmlStyle.blockList, writer.getMarkerAnchor( 13.8 - "serialized_methods")); 13.9 Content headingContent = new StringContent(heading); 13.10 Content serialHeading = HtmlTree.HEADING(HtmlConstants.SERIALIZED_MEMBER_HEADING, 13.11 headingContent); 13.12 - li.addContent(serialHeading); 13.13 + Content li = HtmlTree.LI(HtmlStyle.blockList, serialHeading); 13.14 li.addContent(serializableMethodContent); 13.15 return li; 13.16 } 13.17 @@ -113,8 +111,6 @@ 13.18 * @param methodsContentTree the content tree to which the member header will be added 13.19 */ 13.20 public void addMemberHeader(MethodDoc member, Content methodsContentTree) { 13.21 - methodsContentTree.addContent(writer.getMarkerAnchor( 13.22 - writer.getAnchor(member))); 13.23 methodsContentTree.addContent(getHead(member)); 13.24 methodsContentTree.addContent(getSignature(member)); 13.25 }
14.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 14.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 14.3 @@ -85,7 +85,8 @@ 14.4 Content memberDetailsTree) { 14.5 memberDetailsTree.addContent(HtmlConstants.START_OF_METHOD_DETAILS); 14.6 Content methodDetailsTree = writer.getMemberTreeHeader(); 14.7 - methodDetailsTree.addContent(writer.getMarkerAnchor("method_detail")); 14.8 + methodDetailsTree.addContent(writer.getMarkerAnchor( 14.9 + SectionName.METHOD_DETAIL)); 14.10 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 14.11 writer.methodDetailsLabel); 14.12 methodDetailsTree.addContent(heading); 14.13 @@ -244,7 +245,8 @@ 14.14 * {@inheritDoc} 14.15 */ 14.16 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 14.17 - memberTree.addContent(writer.getMarkerAnchor("method_summary")); 14.18 + memberTree.addContent(writer.getMarkerAnchor( 14.19 + SectionName.METHOD_SUMMARY)); 14.20 } 14.21 14.22 /** 14.23 @@ -252,8 +254,7 @@ 14.24 */ 14.25 public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { 14.26 inheritedTree.addContent(writer.getMarkerAnchor( 14.27 - "methods_inherited_from_class_" + 14.28 - configuration.getClassName(cd))); 14.29 + SectionName.METHODS_INHERITANCE, configuration.getClassName(cd))); 14.30 } 14.31 14.32 /** 14.33 @@ -318,7 +319,7 @@ 14.34 Content methlink = writer.getLink( 14.35 new LinkInfoImpl(writer.configuration, LinkInfoImpl.Kind.MEMBER, 14.36 overriddenType.asClassDoc()) 14.37 - .where(writer.getAnchor(method)).label(name)); 14.38 + .where(writer.getName(writer.getAnchor(method))).label(name)); 14.39 Content codeMethLink = HtmlTree.CODE(methlink); 14.40 Content dd = HtmlTree.DD(codeMethLink); 14.41 dd.addContent(writer.getSpace()); 14.42 @@ -400,11 +401,15 @@ 14.43 */ 14.44 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 14.45 if (link) { 14.46 - return writer.getHyperLink((cd == null)? 14.47 - "method_summary": 14.48 - "methods_inherited_from_class_" + 14.49 - configuration.getClassName(cd), 14.50 - writer.getResource("doclet.navMethod")); 14.51 + if (cd == null) { 14.52 + return writer.getHyperLink( 14.53 + SectionName.METHOD_SUMMARY, 14.54 + writer.getResource("doclet.navMethod")); 14.55 + } else { 14.56 + return writer.getHyperLink( 14.57 + SectionName.METHODS_INHERITANCE, 14.58 + configuration.getClassName(cd), writer.getResource("doclet.navMethod")); 14.59 + } 14.60 } else { 14.61 return writer.getResource("doclet.navMethod"); 14.62 } 14.63 @@ -415,8 +420,8 @@ 14.64 */ 14.65 protected void addNavDetailLink(boolean link, Content liNav) { 14.66 if (link) { 14.67 - liNav.addContent(writer.getHyperLink("method_detail", 14.68 - writer.getResource("doclet.navMethod"))); 14.69 + liNav.addContent(writer.getHyperLink( 14.70 + SectionName.METHOD_DETAIL, writer.getResource("doclet.navMethod"))); 14.71 } else { 14.72 liNav.addContent(writer.getResource("doclet.navMethod")); 14.73 }
15.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 15.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 15.3 @@ -132,7 +132,8 @@ 15.4 * {@inheritDoc} 15.5 */ 15.6 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 15.7 - memberTree.addContent(writer.getMarkerAnchor("nested_class_summary")); 15.8 + memberTree.addContent(writer.getMarkerAnchor( 15.9 + SectionName.NESTED_CLASS_SUMMARY)); 15.10 } 15.11 15.12 /** 15.13 @@ -140,7 +141,8 @@ 15.14 */ 15.15 public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { 15.16 inheritedTree.addContent(writer.getMarkerAnchor( 15.17 - "nested_classes_inherited_from_class_" + cd.qualifiedName())); 15.18 + SectionName.NESTED_CLASSES_INHERITANCE, 15.19 + cd.qualifiedName())); 15.20 } 15.21 15.22 /** 15.23 @@ -202,9 +204,15 @@ 15.24 */ 15.25 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 15.26 if (link) { 15.27 - return writer.getHyperLink((cd == null) ? "nested_class_summary": 15.28 - "nested_classes_inherited_from_class_" + cd.qualifiedName(), 15.29 - writer.getResource("doclet.navNested")); 15.30 + if (cd == null) { 15.31 + return writer.getHyperLink( 15.32 + SectionName.NESTED_CLASS_SUMMARY, 15.33 + writer.getResource("doclet.navNested")); 15.34 + } else { 15.35 + return writer.getHyperLink( 15.36 + SectionName.NESTED_CLASSES_INHERITANCE, 15.37 + cd.qualifiedName(), writer.getResource("doclet.navNested")); 15.38 + } 15.39 } else { 15.40 return writer.getResource("doclet.navNested"); 15.41 }
16.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Thu Oct 10 13:41:08 2013 -0700 16.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageIndexWriter.java Thu Oct 10 20:57:27 2013 -0700 16.3 @@ -203,8 +203,9 @@ 16.4 Content see = seeLabel; 16.5 see.addContent(" "); 16.6 Content descPara = HtmlTree.P(see); 16.7 - Content descLink = getHyperLink(DocLink.fragment("overview_description"), 16.8 - descriptionLabel, "", ""); 16.9 + Content descLink = getHyperLink(getDocLink( 16.10 + SectionName.OVERVIEW_DESCRIPTION), 16.11 + descriptionLabel, "", ""); 16.12 descPara.addContent(descLink); 16.13 div.addContent(descPara); 16.14 body.addContent(div); 16.15 @@ -220,7 +221,8 @@ 16.16 */ 16.17 protected void addOverviewComment(Content htmltree) { 16.18 if (root.inlineTags().length > 0) { 16.19 - htmltree.addContent(getMarkerAnchor("overview_description")); 16.20 + htmltree.addContent( 16.21 + getMarkerAnchor(SectionName.OVERVIEW_DESCRIPTION)); 16.22 addInlineComment(root, htmltree); 16.23 } 16.24 }
17.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 17.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 17.3 @@ -112,7 +112,8 @@ 17.4 addSummaryComment(packageDoc, docSummaryDiv); 17.5 div.addContent(docSummaryDiv); 17.6 Content space = getSpace(); 17.7 - Content descLink = getHyperLink(DocLink.fragment("package_description"), 17.8 + Content descLink = getHyperLink(getDocLink( 17.9 + SectionName.PACKAGE_DESCRIPTION), 17.10 descriptionLabel, "", ""); 17.11 Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink); 17.12 div.addContent(descPara); 17.13 @@ -211,7 +212,8 @@ 17.14 */ 17.15 public void addPackageDescription(Content packageContentTree) { 17.16 if (packageDoc.inlineTags().length > 0) { 17.17 - packageContentTree.addContent(getMarkerAnchor("package_description")); 17.18 + packageContentTree.addContent( 17.19 + getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION)); 17.20 Content h2Content = new StringContent( 17.21 configuration.getText("doclet.Package_Description", 17.22 packageDoc.name()));
18.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 18.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 18.3 @@ -129,7 +129,8 @@ 18.4 addSummaryComment(packageDoc, docSummaryDiv); 18.5 div.addContent(docSummaryDiv); 18.6 Content space = getSpace(); 18.7 - Content descLink = getHyperLink(DocLink.fragment("package_description"), 18.8 + Content descLink = getHyperLink(getDocLink( 18.9 + SectionName.PACKAGE_DESCRIPTION), 18.10 descriptionLabel, "", ""); 18.11 Content descPara = new HtmlTree(HtmlTag.P, seeLabel, space, descLink); 18.12 div.addContent(descPara); 18.13 @@ -192,7 +193,8 @@ 18.14 */ 18.15 public void addPackageDescription(Content packageContentTree) { 18.16 if (packageDoc.inlineTags().length > 0) { 18.17 - packageContentTree.addContent(getMarkerAnchor("package_description")); 18.18 + packageContentTree.addContent( 18.19 + getMarkerAnchor(SectionName.PACKAGE_DESCRIPTION)); 18.20 Content h2Content = new StringContent( 18.21 configuration.getText("doclet.Package_Description", 18.22 packageDoc.name()));
19.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Thu Oct 10 13:41:08 2013 -0700 19.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PropertyWriterImpl.java Thu Oct 10 20:57:27 2013 -0700 19.3 @@ -70,7 +70,8 @@ 19.4 Content memberDetailsTree) { 19.5 memberDetailsTree.addContent(HtmlConstants.START_OF_PROPERTY_DETAILS); 19.6 Content propertyDetailsTree = writer.getMemberTreeHeader(); 19.7 - propertyDetailsTree.addContent(writer.getMarkerAnchor("property_detail")); 19.8 + propertyDetailsTree.addContent(writer.getMarkerAnchor( 19.9 + SectionName.PROPERTY_DETAIL)); 19.10 Content heading = HtmlTree.HEADING(HtmlConstants.DETAILS_HEADING, 19.11 writer.propertyDetailsLabel); 19.12 propertyDetailsTree.addContent(heading); 19.13 @@ -220,7 +221,8 @@ 19.14 * {@inheritDoc} 19.15 */ 19.16 public void addSummaryAnchor(ClassDoc cd, Content memberTree) { 19.17 - memberTree.addContent(writer.getMarkerAnchor("property_summary")); 19.18 + memberTree.addContent(writer.getMarkerAnchor( 19.19 + SectionName.PROPERTY_SUMMARY)); 19.20 } 19.21 19.22 /** 19.23 @@ -228,7 +230,8 @@ 19.24 */ 19.25 public void addInheritedSummaryAnchor(ClassDoc cd, Content inheritedTree) { 19.26 inheritedTree.addContent(writer.getMarkerAnchor( 19.27 - "properties_inherited_from_class_" + configuration.getClassName(cd))); 19.28 + SectionName.PROPERTIES_INHERITANCE, 19.29 + configuration.getClassName(cd))); 19.30 } 19.31 19.32 /** 19.33 @@ -297,11 +300,15 @@ 19.34 */ 19.35 protected Content getNavSummaryLink(ClassDoc cd, boolean link) { 19.36 if (link) { 19.37 - return writer.getHyperLink((cd == null)? 19.38 - "property_summary": 19.39 - "properties_inherited_from_class_" + 19.40 - configuration.getClassName(cd), 19.41 + if (cd == null) { 19.42 + return writer.getHyperLink( 19.43 + SectionName.PROPERTY_SUMMARY, 19.44 writer.getResource("doclet.navProperty")); 19.45 + } else { 19.46 + return writer.getHyperLink( 19.47 + SectionName.PROPERTIES_INHERITANCE, 19.48 + configuration.getClassName(cd), writer.getResource("doclet.navProperty")); 19.49 + } 19.50 } else { 19.51 return writer.getResource("doclet.navProperty"); 19.52 } 19.53 @@ -312,7 +319,8 @@ 19.54 */ 19.55 protected void addNavDetailLink(boolean link, Content liNav) { 19.56 if (link) { 19.57 - liNav.addContent(writer.getHyperLink("property_detail", 19.58 + liNav.addContent(writer.getHyperLink( 19.59 + SectionName.PROPERTY_DETAIL, 19.60 writer.getResource("doclet.navProperty"))); 19.61 } else { 19.62 liNav.addContent(writer.getResource("doclet.navProperty"));
20.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 20.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/SectionName.java Thu Oct 10 20:57:27 2013 -0700 20.3 @@ -0,0 +1,80 @@ 20.4 +/* 20.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 20.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 20.7 + * 20.8 + * This code is free software; you can redistribute it and/or modify it 20.9 + * under the terms of the GNU General Public License version 2 only, as 20.10 + * published by the Free Software Foundation. Oracle designates this 20.11 + * particular file as subject to the "Classpath" exception as provided 20.12 + * by Oracle in the LICENSE file that accompanied this code. 20.13 + * 20.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 20.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 20.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 20.17 + * version 2 for more details (a copy is included in the LICENSE file that 20.18 + * accompanied this code). 20.19 + * 20.20 + * You should have received a copy of the GNU General Public License version 20.21 + * 2 along with this work; if not, write to the Free Software Foundation, 20.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 20.23 + * 20.24 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 20.25 + * or visit www.oracle.com if you need additional information or have any 20.26 + * questions. 20.27 + */ 20.28 + 20.29 +package com.sun.tools.doclets.formats.html; 20.30 + 20.31 +/** 20.32 + * Enum representing various section names of generated API documentation. 20.33 + * 20.34 + * <p><b>This is NOT part of any supported API. 20.35 + * If you write code that depends on this, you do so at your own risk. 20.36 + * This code and its internal interfaces are subject to change or 20.37 + * deletion without notice.</b> 20.38 + * 20.39 + * @author Bhavesh Patel 20.40 + */ 20.41 +public enum SectionName { 20.42 + 20.43 + ANNOTATION_TYPE_ELEMENT_DETAIL("annotation.type.element.detail"), 20.44 + ANNOTATION_TYPE_FIELD_DETAIL("annotation.type.field.detail"), 20.45 + ANNOTATION_TYPE_FIELD_SUMMARY("annotation.type.field.summary"), 20.46 + ANNOTATION_TYPE_OPTIONAL_ELEMENT_SUMMARY("annotation.type.optional.element.summary"), 20.47 + ANNOTATION_TYPE_REQUIRED_ELEMENT_SUMMARY("annotation.type.required.element.summary"), 20.48 + CONSTRUCTOR_DETAIL("constructor.detail"), 20.49 + CONSTRUCTOR_SUMMARY("constructor.summary"), 20.50 + ENUM_CONSTANT_DETAIL("enum.constant.detail"), 20.51 + ENUM_CONSTANTS_INHERITANCE("enum.constants.inherited.from.class."), 20.52 + ENUM_CONSTANT_SUMMARY("enum.constant.summary"), 20.53 + FIELD_DETAIL("field.detail"), 20.54 + FIELDS_INHERITANCE("fields.inherited.from.class."), 20.55 + FIELD_SUMMARY("field.summary"), 20.56 + METHOD_DETAIL("method.detail"), 20.57 + METHODS_INHERITANCE("methods.inherited.from.class."), 20.58 + METHOD_SUMMARY("method.summary"), 20.59 + NAVBAR_BOTTOM("navbar.bottom"), 20.60 + NAVBAR_BOTTOM_FIRSTROW("navbar.bottom.firstrow"), 20.61 + NAVBAR_TOP("navbar.top"), 20.62 + NAVBAR_TOP_FIRSTROW("navbar.top.firstrow"), 20.63 + NESTED_CLASSES_INHERITANCE("nested.classes.inherited.from.class."), 20.64 + NESTED_CLASS_SUMMARY("nested.class.summary"), 20.65 + OVERVIEW_DESCRIPTION("overview.description"), 20.66 + PACKAGE_DESCRIPTION("package.description"), 20.67 + PROPERTY_DETAIL("property.detail"), 20.68 + PROPERTIES_INHERITANCE("properties.inherited.from.class."), 20.69 + PROPERTY_SUMMARY("property.summary"), 20.70 + SKIP_NAVBAR_BOTTOM("skip.navbar.bottom"), 20.71 + SKIP_NAVBAR_TOP("skip.navbar.top"), 20.72 + UNNAMED_PACKAGE_ANCHOR("unnamed.package"); 20.73 + 20.74 + private final String value; 20.75 + 20.76 + SectionName(String sName) { 20.77 + this.value = sName; 20.78 + } 20.79 + 20.80 + public String getName() { 20.81 + return this.value; 20.82 + } 20.83 +}
21.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Thu Oct 10 13:41:08 2013 -0700 21.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/SingleIndexWriter.java Thu Oct 10 20:57:27 2013 -0700 21.3 @@ -115,7 +115,8 @@ 21.4 for (int i = 0; i < indexbuilder.elements().length; i++) { 21.5 String unicode = (indexbuilder.elements())[i].toString(); 21.6 contentTree.addContent( 21.7 - getHyperLink("_" + unicode + "_", new StringContent(unicode))); 21.8 + getHyperLink(getNameForIndex(unicode), 21.9 + new StringContent(unicode))); 21.10 contentTree.addContent(getSpace()); 21.11 } 21.12 }
22.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Thu Oct 10 13:41:08 2013 -0700 22.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Thu Oct 10 20:57:27 2013 -0700 22.3 @@ -30,6 +30,7 @@ 22.4 22.5 import com.sun.javadoc.*; 22.6 import com.sun.tools.doclets.formats.html.ConfigurationImpl; 22.7 +import com.sun.tools.doclets.formats.html.SectionName; 22.8 import com.sun.tools.doclets.internal.toolkit.*; 22.9 import com.sun.tools.doclets.internal.toolkit.util.DocFile; 22.10 import com.sun.tools.doclets.internal.toolkit.util.DocLink; 22.11 @@ -78,7 +79,7 @@ 22.12 } 22.13 22.14 /** 22.15 - * Get Html Hyper Link string. 22.16 + * Get Html Hyper Link Content. 22.17 * 22.18 * @param where Position of the link in the file. Character '#' is not 22.19 * needed. 22.20 @@ -87,7 +88,125 @@ 22.21 */ 22.22 public Content getHyperLink(String where, 22.23 Content label) { 22.24 - return getHyperLink(DocLink.fragment(where), label, "", ""); 22.25 + return getHyperLink(getDocLink(where), label, "", ""); 22.26 + } 22.27 + 22.28 + /** 22.29 + * Get Html Hyper Link Content. 22.30 + * 22.31 + * @param sectionName The section name to which the link will be created. 22.32 + * @param label Tag for the link. 22.33 + * @return a content tree for the hyper link 22.34 + */ 22.35 + public Content getHyperLink(SectionName sectionName, 22.36 + Content label) { 22.37 + return getHyperLink(getDocLink(sectionName), label, "", ""); 22.38 + } 22.39 + 22.40 + /** 22.41 + * Get Html Hyper Link Content. 22.42 + * 22.43 + * @param sectionName The section name combined with where to which the link 22.44 + * will be created. 22.45 + * @param where The fragment combined with sectionName to which the link 22.46 + * will be created. 22.47 + * @param label Tag for the link. 22.48 + * @return a content tree for the hyper link 22.49 + */ 22.50 + public Content getHyperLink(SectionName sectionName, String where, 22.51 + Content label) { 22.52 + return getHyperLink(getDocLink(sectionName, where), label, "", ""); 22.53 + } 22.54 + 22.55 + /** 22.56 + * Get the link. 22.57 + * 22.58 + * @param where Position of the link in the file. 22.59 + * @return a DocLink object for the hyper link 22.60 + */ 22.61 + public DocLink getDocLink(String where) { 22.62 + return DocLink.fragment(getName(where)); 22.63 + } 22.64 + 22.65 + /** 22.66 + * Get the link. 22.67 + * 22.68 + * @param sectionName The section name to which the link will be created. 22.69 + * @return a DocLink object for the hyper link 22.70 + */ 22.71 + public DocLink getDocLink(SectionName sectionName) { 22.72 + return DocLink.fragment(sectionName.getName()); 22.73 + } 22.74 + 22.75 + /** 22.76 + * Get the link. 22.77 + * 22.78 + * @param sectionName The section name combined with where to which the link 22.79 + * will be created. 22.80 + * @param where The fragment combined with sectionName to which the link 22.81 + * will be created. 22.82 + * @return a DocLink object for the hyper link 22.83 + */ 22.84 + public DocLink getDocLink(SectionName sectionName, String where) { 22.85 + return DocLink.fragment(sectionName.getName() + getName(where)); 22.86 + } 22.87 + 22.88 + /** 22.89 + * Convert the name to a valid HTML name. 22.90 + * 22.91 + * @param name the name that needs to be converted to valid HTML name. 22.92 + * @return a valid HTML name string. 22.93 + */ 22.94 + public String getName(String name) { 22.95 + StringBuilder sb = new StringBuilder(); 22.96 + char ch; 22.97 + /* The HTML 4 spec at http://www.w3.org/TR/html4/types.html#h-6.2 mentions 22.98 + * that the name/id should begin with a letter followed by other valid characters. 22.99 + * The HTML 5 spec (draft) is more permissive on names/ids where the only restriction 22.100 + * is that it should be at least one character long and should not contain spaces. 22.101 + * The spec draft is @ http://www.w3.org/html/wg/drafts/html/master/dom.html#the-id-attribute. 22.102 + * 22.103 + * For HTML 4, we need to check for non-characters at the beginning of the name and 22.104 + * substitute it accordingly, "_" and "$" can appear at the beginning of a member name. 22.105 + * The method substitutes "$" with "Z:Z:D" and will prefix "_" with "Z:Z". 22.106 + */ 22.107 + for (int i = 0; i < name.length(); i++) { 22.108 + ch = name.charAt(i); 22.109 + switch (ch) { 22.110 + case '(': 22.111 + case ')': 22.112 + case '<': 22.113 + case '>': 22.114 + case ',': 22.115 + sb.append('-'); 22.116 + break; 22.117 + case ' ': 22.118 + case '[': 22.119 + break; 22.120 + case ']': 22.121 + sb.append(":A"); 22.122 + break; 22.123 + // Any appearance of $ needs to be substituted with ":D" and not with hyphen 22.124 + // since a field name "P$$ and a method P(), both valid member names, can end 22.125 + // up as "P--". A member name beginning with $ needs to be substituted with 22.126 + // "Z:Z:D". 22.127 + case '$': 22.128 + if (i == 0) 22.129 + sb.append("Z:Z"); 22.130 + sb.append(":D"); 22.131 + break; 22.132 + // A member name beginning with _ needs to be prefixed with "Z:Z" since valid anchor 22.133 + // names can only begin with a letter. 22.134 + case '_': 22.135 + if (i == 0) 22.136 + sb.append("Z:Z"); 22.137 + sb.append(ch); 22.138 + break; 22.139 + default: 22.140 + sb.append(ch); 22.141 + } 22.142 + } 22.143 + return sb.toString(); 22.144 } 22.145 22.146 /**
23.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java Thu Oct 10 13:41:08 2013 -0700 23.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/util/DocletConstants.java Thu Oct 10 20:57:27 2013 -0700 23.3 @@ -58,9 +58,4 @@ 23.4 * The default package file name. 23.5 */ 23.6 public static final String DEFAULT_PACKAGE_FILE_NAME = "default"; 23.7 - 23.8 - /** 23.9 - * The anchor for the default package. 23.10 - */ 23.11 - public static final String UNNAMED_PACKAGE_ANCHOR = "unnamed_package"; 23.12 }
24.1 --- a/src/share/classes/com/sun/tools/javac/code/Attribute.java Thu Oct 10 13:41:08 2013 -0700 24.2 +++ b/src/share/classes/com/sun/tools/javac/code/Attribute.java Thu Oct 10 20:57:27 2013 -0700 24.3 @@ -64,6 +64,8 @@ 24.4 return false; 24.5 } 24.6 24.7 + public TypeAnnotationPosition getPosition() { return null; }; 24.8 + 24.9 /** The value for an annotation element of primitive type or String. */ 24.10 public static class Constant extends Attribute { 24.11 public final Object value; 24.12 @@ -191,8 +193,13 @@ 24.13 } 24.14 24.15 public Attribute member(Name member) { 24.16 + Pair<MethodSymbol,Attribute> res = getElemPair(member); 24.17 + return res == null ? null : res.snd; 24.18 + } 24.19 + 24.20 + private Pair<MethodSymbol, Attribute> getElemPair(Name member) { 24.21 for (Pair<MethodSymbol,Attribute> pair : values) 24.22 - if (pair.fst.name == member) return pair.snd; 24.23 + if (pair.fst.name == member) return pair; 24.24 return null; 24.25 } 24.26 24.27 @@ -208,6 +215,16 @@ 24.28 return (DeclaredType) type; 24.29 } 24.30 24.31 + @Override 24.32 + public TypeAnnotationPosition getPosition() { 24.33 + if (values.size() != 0) { 24.34 + Name valueName = values.head.fst.name.table.names.value; 24.35 + Pair<MethodSymbol, Attribute> res = getElemPair(valueName); 24.36 + return res == null ? null : res.snd.getPosition(); 24.37 + } 24.38 + return null; 24.39 + } 24.40 + 24.41 public Map<MethodSymbol, Attribute> getElementValues() { 24.42 Map<MethodSymbol, Attribute> valmap = 24.43 new LinkedHashMap<MethodSymbol, Attribute>(); 24.44 @@ -230,6 +247,14 @@ 24.45 this.position = position; 24.46 } 24.47 24.48 + @Override 24.49 + public TypeAnnotationPosition getPosition() { 24.50 + if (hasUnknownPosition()) { 24.51 + position = super.getPosition(); 24.52 + } 24.53 + return position; 24.54 + } 24.55 + 24.56 public boolean hasUnknownPosition() { 24.57 return position == null || position.type == TargetType.UNKNOWN; 24.58 } 24.59 @@ -302,6 +327,14 @@ 24.60 public <R, P> R accept(AnnotationValueVisitor<R, P> v, P p) { 24.61 return v.visitArray(getValue(), p); 24.62 } 24.63 + 24.64 + @Override 24.65 + public TypeAnnotationPosition getPosition() { 24.66 + if (values.length != 0) 24.67 + return values[0].getPosition(); 24.68 + else 24.69 + return null; 24.70 + } 24.71 } 24.72 24.73 /** The value for an annotation element of an enum type.
25.1 --- a/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Thu Oct 10 13:41:08 2013 -0700 25.2 +++ b/src/share/classes/com/sun/tools/javac/code/TypeAnnotations.java Thu Oct 10 20:57:27 2013 -0700 25.3 @@ -71,6 +71,7 @@ 25.4 import com.sun.tools.javac.util.ListBuffer; 25.5 import com.sun.tools.javac.util.Log; 25.6 import com.sun.tools.javac.util.Names; 25.7 +import com.sun.tools.javac.util.Options; 25.8 25.9 /** 25.10 * Contains operations specific to processing type annotations. 25.11 @@ -94,6 +95,7 @@ 25.12 final Names names; 25.13 final Symtab syms; 25.14 final Annotate annotate; 25.15 + private final boolean typeAnnoAsserts; 25.16 25.17 protected TypeAnnotations(Context context) { 25.18 context.put(typeAnnosKey, this); 25.19 @@ -101,6 +103,8 @@ 25.20 log = Log.instance(context); 25.21 syms = Symtab.instance(context); 25.22 annotate = Annotate.instance(context); 25.23 + Options options = Options.instance(context); 25.24 + typeAnnoAsserts = options.isSet("TypeAnnotationAsserts"); 25.25 } 25.26 25.27 /** 25.28 @@ -265,10 +269,6 @@ 25.29 */ 25.30 private void separateAnnotationsKinds(JCTree typetree, Type type, Symbol sym, 25.31 TypeAnnotationPosition pos) { 25.32 - /* 25.33 - System.out.printf("separateAnnotationsKinds(typetree: %s, type: %s, symbol: %s, pos: %s%n", 25.34 - typetree, type, sym, pos); 25.35 - */ 25.36 List<Attribute.Compound> annotations = sym.getRawAttributes(); 25.37 ListBuffer<Attribute.Compound> declAnnos = new ListBuffer<Attribute.Compound>(); 25.38 ListBuffer<Attribute.TypeCompound> typeAnnos = new ListBuffer<Attribute.TypeCompound>(); 25.39 @@ -1023,10 +1023,12 @@ 25.40 @Override 25.41 public void visitMethodDef(final JCMethodDecl tree) { 25.42 if (tree.sym == null) { 25.43 - // Something most be wrong, e.g. a class not found. 25.44 - // Quietly ignore. (See test FailOver15.java) 25.45 + if (typeAnnoAsserts) { 25.46 + Assert.error("Visiting tree node before memberEnter"); 25.47 + } else { 25.48 return; 25.49 } 25.50 + } 25.51 if (sigOnly) { 25.52 if (!tree.mods.annotations.isEmpty()) { 25.53 // Nothing to do for separateAnnotationsKinds if 25.54 @@ -1129,6 +1131,9 @@ 25.55 // Nothing to do for separateAnnotationsKinds if 25.56 // there are no annotations of either kind. 25.57 } else if (tree.sym == null) { 25.58 + if (typeAnnoAsserts) { 25.59 + Assert.error("Visiting tree node before memberEnter"); 25.60 + } 25.61 // Something is wrong already. Quietly ignore. 25.62 } else if (tree.sym.getKind() == ElementKind.PARAMETER) { 25.63 // Parameters are handled in visitMethodDef or visitLambda. 25.64 @@ -1282,9 +1287,9 @@ 25.65 private void findPosition(JCTree tree, JCTree frame, List<JCAnnotation> annotations) { 25.66 if (!annotations.isEmpty()) { 25.67 /* 25.68 - System.out.println("Finding pos for: " + annotations); 25.69 - System.out.println(" tree: " + tree + " kind: " + tree.getKind()); 25.70 - System.out.println(" frame: " + frame + " kind: " + frame.getKind()); 25.71 + System.err.println("Finding pos for: " + annotations); 25.72 + System.err.println(" tree: " + tree + " kind: " + tree.getKind()); 25.73 + System.err.println(" frame: " + frame + " kind: " + frame.getKind()); 25.74 */ 25.75 TypeAnnotationPosition p = new TypeAnnotationPosition(); 25.76 p.onLambda = currentLambda;
26.1 --- a/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Oct 10 13:41:08 2013 -0700 26.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Attr.java Thu Oct 10 20:57:27 2013 -0700 26.3 @@ -792,17 +792,19 @@ 26.4 Type t = tree.type != null ? 26.5 tree.type : 26.6 attribType(tree, env); 26.7 - return checkBase(t, tree, env, classExpected, interfaceExpected, checkExtensible); 26.8 + return checkBase(t, tree, env, classExpected, interfaceExpected, false, checkExtensible); 26.9 } 26.10 Type checkBase(Type t, 26.11 JCTree tree, 26.12 Env<AttrContext> env, 26.13 boolean classExpected, 26.14 - boolean interfaceOrArrayExpected, 26.15 + boolean interfacesOnlyExpected, 26.16 + boolean interfacesOrArraysExpected, 26.17 boolean checkExtensible) { 26.18 if (t.isErroneous()) 26.19 return t; 26.20 - if (t.hasTag(TYPEVAR) && !classExpected && !interfaceOrArrayExpected) { 26.21 + if (t.hasTag(TYPEVAR) && !classExpected && 26.22 + !interfacesOrArraysExpected && !interfacesOnlyExpected) { 26.23 // check that type variable is already visible 26.24 if (t.getUpperBound() == null) { 26.25 log.error(tree.pos(), "illegal.forward.ref"); 26.26 @@ -814,9 +816,14 @@ 26.27 t = chk.checkClassOrArrayType(tree.pos(), t, 26.28 checkExtensible|!allowGenerics); 26.29 } 26.30 - if (interfaceOrArrayExpected && 26.31 + if (interfacesOnlyExpected && !t.tsym.isInterface()) { 26.32 + log.error(tree.pos(), "intf.expected.here"); 26.33 + // return errType is necessary since otherwise there might 26.34 + // be undetected cycles which cause attribution to loop 26.35 + return types.createErrorType(t); 26.36 + } else if (interfacesOrArraysExpected && 26.37 !(t.tsym.isInterface() || t.getTag() == ARRAY)) { 26.38 - log.error(tree.pos(), "intf.expected.here"); 26.39 + log.error(tree.pos(), "intf.or.array.expected.here"); 26.40 // return errType is necessary since otherwise there might 26.41 // be undetected cycles which cause attribution to loop 26.42 return types.createErrorType(t); 26.43 @@ -3988,7 +3995,7 @@ 26.44 Set<Type> boundSet = new HashSet<Type>(); 26.45 if (bounds.nonEmpty()) { 26.46 // accept class or interface or typevar as first bound. 26.47 - bounds.head.type = checkBase(bounds.head.type, bounds.head, env, false, false, false); 26.48 + bounds.head.type = checkBase(bounds.head.type, bounds.head, env, false, false, false, false); 26.49 boundSet.add(types.erasure(bounds.head.type)); 26.50 if (bounds.head.type.isErroneous()) { 26.51 return bounds.head.type; 26.52 @@ -4004,7 +4011,7 @@ 26.53 // if first bound was a class or interface, accept only interfaces 26.54 // as further bounds. 26.55 for (JCExpression bound : bounds.tail) { 26.56 - bound.type = checkBase(bound.type, bound, env, false, true, false); 26.57 + bound.type = checkBase(bound.type, bound, env, false, false, true, false); 26.58 if (bound.type.isErroneous()) { 26.59 bounds = List.of(bound); 26.60 }
27.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java Thu Oct 10 13:41:08 2013 -0700 27.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java Thu Oct 10 20:57:27 2013 -0700 27.3 @@ -3420,15 +3420,14 @@ 27.4 sym.name != names.error && 27.5 (!staticImport || !e.isStaticallyImported())) { 27.6 if (!e.sym.type.isErroneous()) { 27.7 - String what = e.sym.toString(); 27.8 if (!isClassDecl) { 27.9 if (staticImport) 27.10 - log.error(pos, "already.defined.static.single.import", what); 27.11 + log.error(pos, "already.defined.static.single.import", e.sym); 27.12 else 27.13 - log.error(pos, "already.defined.single.import", what); 27.14 + log.error(pos, "already.defined.single.import", e.sym); 27.15 } 27.16 else if (sym != e.sym) 27.17 - log.error(pos, "already.defined.this.unit", what); 27.18 + log.error(pos, "already.defined.this.unit", e.sym); 27.19 } 27.20 return false; 27.21 }
28.1 --- a/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Thu Oct 10 13:41:08 2013 -0700 28.2 +++ b/src/share/classes/com/sun/tools/javac/comp/MemberEnter.java Thu Oct 10 20:57:27 2013 -0700 28.3 @@ -114,12 +114,15 @@ 28.4 deferredLintHandler = DeferredLintHandler.instance(context); 28.5 lint = Lint.instance(context); 28.6 allowTypeAnnos = source.allowTypeAnnotations(); 28.7 + allowRepeatedAnnos = source.allowRepeatedAnnotations(); 28.8 } 28.9 28.10 /** Switch: support type annotations. 28.11 */ 28.12 boolean allowTypeAnnos; 28.13 28.14 + boolean allowRepeatedAnnos; 28.15 + 28.16 /** A queue for classes whose members still need to be entered into the 28.17 * symbol table. 28.18 */ 28.19 @@ -640,9 +643,6 @@ 28.20 if (TreeInfo.isEnumInit(tree)) { 28.21 attr.attribIdentAsEnumType(localEnv, (JCIdent)tree.vartype); 28.22 } else { 28.23 - // Make sure type annotations are processed. 28.24 - // But we don't have a symbol to attach them to yet - use null. 28.25 - typeAnnotate(tree.vartype, env, null, tree.pos()); 28.26 attr.attribType(tree.vartype, localEnv); 28.27 if (tree.nameexpr != null) { 28.28 attr.attribExpr(tree.nameexpr, localEnv); 28.29 @@ -693,7 +693,6 @@ 28.30 } 28.31 annotateLater(tree.mods.annotations, localEnv, v, tree.pos()); 28.32 typeAnnotate(tree.vartype, env, v, tree.pos()); 28.33 - annotate.flush(); 28.34 v.pos = tree.pos; 28.35 } 28.36 // where 28.37 @@ -906,14 +905,14 @@ 28.38 } 28.39 28.40 if (annotated.containsKey(a.type.tsym)) { 28.41 - if (source.allowRepeatedAnnotations()) { 28.42 - ListBuffer<Attribute.Compound> l = annotated.get(a.type.tsym); 28.43 - l = l.append(c); 28.44 - annotated.put(a.type.tsym, l); 28.45 - pos.put(c, a.pos()); 28.46 - } else { 28.47 - log.error(a.pos(), "duplicate.annotation"); 28.48 + if (!allowRepeatedAnnos) { 28.49 + log.error(a.pos(), "repeatable.annotations.not.supported.in.source"); 28.50 + allowRepeatedAnnos = true; 28.51 } 28.52 + ListBuffer<Attribute.Compound> l = annotated.get(a.type.tsym); 28.53 + l = l.append(c); 28.54 + annotated.put(a.type.tsym, l); 28.55 + pos.put(c, a.pos()); 28.56 } else { 28.57 annotated.put(a.type.tsym, ListBuffer.of(c)); 28.58 pos.put(c, a.pos()); 28.59 @@ -1081,7 +1080,6 @@ 28.60 // Do this here, where we have the symbol. 28.61 for (JCTypeParameter tp : tree.typarams) 28.62 typeAnnotate(tp, baseEnv, sym, tree.pos()); 28.63 - annotate.flush(); 28.64 28.65 // Add default constructor if needed. 28.66 if ((c.flags() & INTERFACE) == 0 && 28.67 @@ -1197,7 +1195,7 @@ 28.68 annotated.put(a.type.tsym, l); 28.69 pos.put(tc, a.pos()); 28.70 } else { 28.71 - log.error(a.pos(), "duplicate.annotation"); 28.72 + log.error(a.pos(), "repeatable.annotations.not.supported.in.source"); 28.73 } 28.74 } else { 28.75 annotated.put(a.type.tsym, ListBuffer.of(tc));
29.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Oct 10 13:41:08 2013 -0700 29.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Oct 10 20:57:27 2013 -0700 29.3 @@ -104,6 +104,8 @@ 29.4 */ 29.5 private LVTRanges lvtRanges; 29.6 29.7 + private final boolean typeAnnoAsserts; 29.8 + 29.9 protected Gen(Context context) { 29.10 context.put(genKey, this); 29.11 29.12 @@ -140,6 +142,7 @@ 29.13 debugCode = options.isSet("debugcode"); 29.14 allowInvokedynamic = target.hasInvokedynamic() || options.isSet("invokedynamic"); 29.15 pool = new Pool(types); 29.16 + typeAnnoAsserts = options.isSet("TypeAnnotationAsserts"); 29.17 29.18 generateIproxies = 29.19 target.requiresIproxy() || 29.20 @@ -562,9 +565,13 @@ 29.21 ListBuffer<Attribute.TypeCompound> fieldTAs = new ListBuffer<Attribute.TypeCompound>(); 29.22 ListBuffer<Attribute.TypeCompound> nonfieldTAs = new ListBuffer<Attribute.TypeCompound>(); 29.23 for (TypeCompound ta : tas) { 29.24 - if (ta.position.type == TargetType.FIELD) { 29.25 + if (ta.getPosition().type == TargetType.FIELD) { 29.26 fieldTAs.add(ta); 29.27 } else { 29.28 + if (typeAnnoAsserts) { 29.29 + Assert.error("Type annotation does not have a valid positior"); 29.30 + } 29.31 + 29.32 nonfieldTAs.add(ta); 29.33 } 29.34 }
30.1 --- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties Thu Oct 10 13:41:08 2013 -0700 30.2 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties Thu Oct 10 20:57:27 2013 -0700 30.3 @@ -78,26 +78,26 @@ 30.4 30.5 # 0: string 30.6 compiler.err.already.defined.single.import=\ 30.7 - {0} is already defined in a single-type import 30.8 + a type with the same simple name is already defined by the single-type-import of {0} 30.9 30.10 # 0: string 30.11 compiler.err.already.defined.static.single.import=\ 30.12 - {0} is already defined in a static single-type import 30.13 + a type with the same simple name is already defined by the static single-type-import of {0} 30.14 30.15 compiler.err.already.defined.this.unit=\ 30.16 {0} is already defined in this compilation unit 30.17 30.18 # 0: type, 1: list of name 30.19 compiler.err.annotation.missing.default.value=\ 30.20 - annotation {0} is missing value for the attribute {1} 30.21 + annotation @{0} is missing a default value for the element ''{1}'' 30.22 30.23 # 0: type, 1: list of name 30.24 compiler.err.annotation.missing.default.value.1=\ 30.25 - annotation {0} is missing values for attributes {1} 30.26 + annotation @{0} is missing default values for elements {1} 30.27 30.28 # 0: type 30.29 compiler.err.annotation.not.valid.for.type=\ 30.30 - annotation not valid for a value of type {0} 30.31 + annotation not valid for an element of type {0} 30.32 30.33 compiler.err.annotation.type.not.applicable=\ 30.34 annotation type not applicable to this kind of declaration 30.35 @@ -135,7 +135,7 @@ 30.36 array required, but {0} found 30.37 30.38 compiler.err.attribute.value.must.be.constant=\ 30.39 - attribute value must be constant 30.40 + element value must be a constant expression 30.41 30.42 # 0: statement type 30.43 compiler.err.bad.initializer=\ 30.44 @@ -298,8 +298,9 @@ 30.45 compiler.err.cyclic.inheritance=\ 30.46 cyclic inheritance involving {0} 30.47 30.48 +# 0: symbol 30.49 compiler.err.cyclic.annotation.element=\ 30.50 - cyclic annotation element type 30.51 + type of element {0} is cyclic 30.52 30.53 # 0: unused 30.54 compiler.err.call.to.super.not.allowed.in.enum.ctor=\ 30.55 @@ -307,73 +308,70 @@ 30.56 30.57 # 0: type 30.58 compiler.err.no.superclass=\ 30.59 - {0} has no superclass 30.60 + {0} has no superclass. 30.61 30.62 # 0: symbol, 1: type, 2: symbol, 3: type, 4: unused 30.63 compiler.err.concrete.inheritance.conflict=\ 30.64 methods {0} from {1} and {2} from {3} are inherited with the same signature 30.65 30.66 compiler.err.default.allowed.in.intf.annotation.member=\ 30.67 - default value only allowed in an @interface member 30.68 + default value only allowed in an annotation type declaration 30.69 30.70 # 0: symbol 30.71 compiler.err.doesnt.exist=\ 30.72 package {0} does not exist 30.73 30.74 -compiler.err.duplicate.annotation=\ 30.75 - duplicate annotation 30.76 - 30.77 # 0: type 30.78 compiler.err.duplicate.annotation.invalid.repeated=\ 30.79 - annotation {0} cannot be repeated\nIt does not define a valid containing annotation. 30.80 + annotation {0} is not a valid repeatable annotation 30.81 30.82 # 0: name, 1: type 30.83 compiler.err.duplicate.annotation.member.value=\ 30.84 - duplicate annotation member value {0} in {1} 30.85 - 30.86 -# 0: type, 1: type 30.87 + duplicate element ''{0}'' in annotation @{1}. 30.88 + 30.89 +# 0: name, 1: unused 30.90 compiler.err.duplicate.annotation.missing.container=\ 30.91 - duplicate annotation: the declaration of {0} does not have a valid {1} annotation 30.92 - 30.93 -# 0: type 30.94 + {0} is not a repeatable annotation type 30.95 + 30.96 +# 0: type, 1: unused 30.97 compiler.err.invalid.repeatable.annotation=\ 30.98 - duplicate annotation: {0} is annotated with an invalid Repeatable annotation 30.99 + duplicate annotation: {0} is annotated with an invalid @Repeatable annotation 30.100 30.101 # 0: symbol or type 30.102 compiler.err.invalid.repeatable.annotation.no.value=\ 30.103 - duplicate annotation: {0} is not a valid Repeatable, no value element method declared 30.104 + {0} is not a valid @Repeatable, no value element method declared 30.105 30.106 # 0: type, 1: number 30.107 compiler.err.invalid.repeatable.annotation.multiple.values=\ 30.108 - duplicate annotation: {0} is not a valid Repeatable, {1} value element methods declared 30.109 + {0} is not a valid @Repeatable, {1} element methods named ''value'' declared 30.110 30.111 # 0: type 30.112 compiler.err.invalid.repeatable.annotation.invalid.value=\ 30.113 - duplicate annotation: {0} is not a valid Repeatable: invalid value element 30.114 - 30.115 -# 0: symbol type, 1: type, 2: type 30.116 + {0} is not a valid @Repeatable: invalid value element 30.117 + 30.118 +# 0: symbol type, 1: unused, 2: type 30.119 compiler.err.invalid.repeatable.annotation.value.return=\ 30.120 - duplicate annotation: value element of containing annotation {0} should have type {2}, found {1} 30.121 + containing annotation type ({0}) must declare an element named ''value'' of type {2} 30.122 30.123 # 0: symbol or type, 1: symbol 30.124 compiler.err.invalid.repeatable.annotation.elem.nondefault=\ 30.125 - containing annotation {0} does not have a default value for element {1} 30.126 - 30.127 -# 0: symbol, 1: type, 2: symbol, 3: type 30.128 + containing annotation type ({0}) does not have a default value for element {1} 30.129 + 30.130 +# 0: symbol, 1: unused, 2: symbol, 3: unused 30.131 compiler.err.invalid.repeatable.annotation.retention=\ 30.132 - containing annotation {0} has shorter retention ({1}) than the contained annotation {2} with retention {3} 30.133 + retention of containing annotation type ({0}) is shorter than the retention of repeatable annotation type ({2}) 30.134 30.135 # 0: symbol, 1: symbol 30.136 compiler.err.invalid.repeatable.annotation.not.documented=\ 30.137 - containing annotation type, {0}, is not @Documented while repeated annotation type, {1}, is 30.138 + repeatable annotation type ({1}) is @Documented while containing annotation type ({0}) is not 30.139 30.140 # 0: symbol, 1: symbol 30.141 compiler.err.invalid.repeatable.annotation.not.inherited=\ 30.142 - containing annotation type, {0}, is not @Inherited while repeated annotation type, {1}, is 30.143 + repeatable annotation type ({1}) is @Inherited while containing annotation type ({0}) is not 30.144 30.145 # 0: symbol, 1: symbol 30.146 compiler.err.invalid.repeatable.annotation.incompatible.target=\ 30.147 - target of container annotation {0} is not a subset of target of repeated annotation {1} 30.148 + containing annotation type ({0}) is applicable to more targets than repeatable annotation type ({1}) 30.149 30.150 # 0: symbol 30.151 compiler.err.invalid.repeatable.annotation.repeated.and.container.present=\ 30.152 @@ -561,26 +559,31 @@ 30.153 integer number too large: {0} 30.154 30.155 compiler.err.intf.annotation.members.cant.have.params=\ 30.156 - @interface members may not have parameters 30.157 - 30.158 + elements in annotation type declarations cannot declare formal parameters 30.159 + 30.160 +# 0: symbol 30.161 compiler.err.intf.annotation.cant.have.type.params=\ 30.162 - @interface may not have type parameters 30.163 + annotation type {0} cannot be generic 30.164 30.165 compiler.err.intf.annotation.members.cant.have.type.params=\ 30.166 - @interface members may not have type parameters 30.167 + elements in annotation type declarations cannot be generic methods 30.168 30.169 # 0: symbol, 1: type 30.170 compiler.err.intf.annotation.member.clash=\ 30.171 - @interface member clashes with method ''{0}'' in {1} 30.172 + annotation type {1} declares an element with the same name as method {0} 30.173 30.174 compiler.err.intf.expected.here=\ 30.175 interface expected here 30.176 30.177 +compiler.err.intf.or.array.expected.here=\ 30.178 + interface or array type expected here 30.179 + 30.180 compiler.err.intf.meth.cant.have.body=\ 30.181 interface abstract methods cannot have body 30.182 30.183 +# 0: symbol 30.184 compiler.err.invalid.annotation.member.type=\ 30.185 - invalid type for annotation member 30.186 + invalid type for element {0} of annotation type 30.187 30.188 compiler.err.invalid.binary.number=\ 30.189 binary numbers must contain at least one binary digit 30.190 @@ -2310,8 +2313,13 @@ 30.191 (use -source 8 or higher to enable type annotations) 30.192 30.193 # 0: string 30.194 +compiler.err.repeatable.annotations.not.supported.in.source=\ 30.195 + repeated annotations are not supported in -source {0}\n\ 30.196 +(use -source 8 or higher to enable repeated annotations) 30.197 + 30.198 +# 0: string 30.199 compiler.err.foreach.not.supported.in.source=\ 30.200 - for-each loops are not supported in -source {0}\n\ 30.201 + enhanced for loops are not supported in -source {0}\n\ 30.202 (use -source 5 or higher to enable for-each loops) 30.203 30.204 # 0: string
31.1 --- a/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Thu Oct 10 13:41:08 2013 -0700 31.2 +++ b/test/com/sun/javadoc/AccessSkipNav/AccessSkipNav.java Thu Oct 10 20:57:27 2013 -0700 31.3 @@ -23,7 +23,7 @@ 31.4 31.5 /* 31.6 * @test 31.7 - * @bug 4638136 7198273 31.8 + * @bug 4638136 7198273 8025633 31.9 * @summary Add ability to skip over nav bar for accessibility 31.10 * @author dkramer 31.11 * @run main AccessSkipNav 31.12 @@ -86,20 +86,20 @@ 31.13 // Testing only for the presence of the <a href> and <a name> 31.14 31.15 // Top navbar <a href> 31.16 - { "<a href=\"#skip-navbar_top\" title=\"Skip navigation links\">Skip navigation links</a>", 31.17 + { "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a>", 31.18 TMPDEST_DIR1 + "p1" + FS + "C1.html" }, 31.19 31.20 // Top navbar <a name> 31.21 - { "<a name=\"skip-navbar_top\">" + LS + 31.22 + { "<a name=\"skip.navbar.top\">" + LS + 31.23 "<!-- -->" + LS + "</a>", 31.24 TMPDEST_DIR1 + "p1" + FS + "C1.html" }, 31.25 31.26 // Bottom navbar <a href> 31.27 - { "<a href=\"#skip-navbar_bottom\" title=\"Skip navigation links\">Skip navigation links</a>", 31.28 + { "<a href=\"#skip.navbar.bottom\" title=\"Skip navigation links\">Skip navigation links</a>", 31.29 TMPDEST_DIR1 + "p1" + FS + "C1.html" }, 31.30 31.31 // Bottom navbar <a name> 31.32 - { "<a name=\"skip-navbar_bottom\">" + LS + 31.33 + { "<a name=\"skip.navbar.bottom\">" + LS + 31.34 "<!-- -->" + LS + "</a>", 31.35 TMPDEST_DIR1 + "p1" + FS + "C1.html" } 31.36 };
32.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 32.2 +++ b/test/com/sun/javadoc/testAnchorNames/TestAnchorNames.java Thu Oct 10 20:57:27 2013 -0700 32.3 @@ -0,0 +1,290 @@ 32.4 +/* 32.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 32.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 32.7 + * 32.8 + * This code is free software; you can redistribute it and/or modify it 32.9 + * under the terms of the GNU General Public License version 2 only, as 32.10 + * published by the Free Software Foundation. 32.11 + * 32.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 32.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 32.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 32.15 + * version 2 for more details (a copy is included in the LICENSE file that 32.16 + * accompanied this code). 32.17 + * 32.18 + * You should have received a copy of the GNU General Public License version 32.19 + * 2 along with this work; if not, write to the Free Software Foundation, 32.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 32.21 + * 32.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 32.23 + * or visit www.oracle.com if you need additional information or have any 32.24 + * questions. 32.25 + */ 32.26 + 32.27 +/* 32.28 + * @test 32.29 + * @bug 8025633 32.30 + * @summary Test for valid name attribute in HTML anchors. 32.31 + * @author Bhavesh Patel 32.32 + * @library ../lib/ 32.33 + * @build JavadocTester TestAnchorNames 32.34 + * @run main TestAnchorNames 32.35 + */ 32.36 + 32.37 +public class TestAnchorNames extends JavadocTester { 32.38 + 32.39 + private static final String BUG_ID = "8025633"; 32.40 + 32.41 + //Input for string search tests. 32.42 + private static final String[][] TEST = { 32.43 + 32.44 + //Test some section markers and links to these markers 32.45 + 32.46 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.47 + "<a name=\"skip.navbar.top\">" 32.48 + }, 32.49 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.50 + "<a href=\"#skip.navbar.top\" title=\"Skip navigation links\">" 32.51 + }, 32.52 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.53 + "<a name=\"nested.class.summary\">" 32.54 + }, 32.55 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.56 + "<a href=\"#nested.class.summary\">" 32.57 + }, 32.58 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.59 + "<a name=\"method.summary\">" 32.60 + }, 32.61 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.62 + "<a href=\"#method.summary\">" 32.63 + }, 32.64 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.65 + "<a name=\"field.detail\">" 32.66 + }, 32.67 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.68 + "<a href=\"#field.detail\">" 32.69 + }, 32.70 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.71 + "<a name=\"constructor.detail\">" 32.72 + }, 32.73 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.74 + "<a href=\"#constructor.detail\">" 32.75 + }, 32.76 + 32.77 + //Test some members and link to these members 32.78 + 32.79 + //The marker for this appears in the serialized-form.html which we will 32.80 + //test below 32.81 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.82 + "<a href=\"../serialized-form.html#pkg1.RegClass\">" 32.83 + }, 32.84 + //Test some fields 32.85 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.86 + "<a name=\"Z:Z_\">" 32.87 + }, 32.88 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.89 + "<a href=\"../pkg1/RegClass.html#Z:Z_\">" 32.90 + }, 32.91 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.92 + "<a name=\"Z:Z_:D\">" 32.93 + }, 32.94 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.95 + "<a href=\"../pkg1/RegClass.html#Z:Z_:D\">" 32.96 + }, 32.97 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.98 + "<a name=\"Z:Z:D_\">" 32.99 + }, 32.100 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.101 + "<a href=\"../pkg1/RegClass.html#Z:Z:D_\">" 32.102 + }, 32.103 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.104 + "<a name=\"Z:Z:Dfield\">" 32.105 + }, 32.106 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.107 + "<a href=\"../pkg1/RegClass.html#Z:Z:Dfield\">" 32.108 + }, 32.109 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.110 + "<a name=\"fieldInCla:D:D\">" 32.111 + }, 32.112 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.113 + "<a href=\"../pkg1/RegClass.html#fieldInCla:D:D\">" 32.114 + }, 32.115 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.116 + "<a name=\"S_:D:D:D:D:DINT\">" 32.117 + }, 32.118 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.119 + "<a href=\"../pkg1/RegClass.html#S_:D:D:D:D:DINT\">" 32.120 + }, 32.121 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.122 + "<a name=\"method:D:D\">" 32.123 + }, 32.124 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.125 + "<a href=\"../pkg1/RegClass.html#method:D:D\">" 32.126 + }, 32.127 + {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html", 32.128 + "<a name=\"Z:Z_field_In_Class\">" 32.129 + }, 32.130 + {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html", 32.131 + "<a href=\"../pkg1/DeprMemClass.html#Z:Z_field_In_Class\">" 32.132 + }, 32.133 + //Test constructor 32.134 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.135 + "<a name=\"RegClass-java.lang.String-int-\">" 32.136 + }, 32.137 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.138 + "<a href=\"../pkg1/RegClass.html#RegClass-java.lang.String-int-\">" 32.139 + }, 32.140 + //Test some methods 32.141 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.142 + "<a name=\"Z:Z_methodInClass-java.lang.String-\">" 32.143 + }, 32.144 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.145 + "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClass-java.lang.String-\">" 32.146 + }, 32.147 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.148 + "<a name=\"method--\">" 32.149 + }, 32.150 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.151 + "<a href=\"../pkg1/RegClass.html#method--\">" 32.152 + }, 32.153 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.154 + "<a name=\"foo-java.util.Map-\">" 32.155 + }, 32.156 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.157 + "<a href=\"../pkg1/RegClass.html#foo-java.util.Map-\">" 32.158 + }, 32.159 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.160 + "<a name=\"methodInCla:Ds-java.lang.String:A-\">" 32.161 + }, 32.162 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.163 + "<a href=\"../pkg1/RegClass.html#methodInCla:Ds-java.lang.String:A-\">" 32.164 + }, 32.165 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.166 + "<a name=\"Z:Z_methodInClas:D-java.lang.String-int-\">" 32.167 + }, 32.168 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.169 + "<a href=\"../pkg1/RegClass.html#Z:Z_methodInClas:D-java.lang.String-int-\">" 32.170 + }, 32.171 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.172 + "<a name=\"methodD-pkg1.RegClass.:DA-\">" 32.173 + }, 32.174 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.175 + "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.:DA-\">" 32.176 + }, 32.177 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.178 + "<a name=\"methodD-pkg1.RegClass.D:A-\">" 32.179 + }, 32.180 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.181 + "<a href=\"../pkg1/RegClass.html#methodD-pkg1.RegClass.D:A-\">" 32.182 + }, 32.183 + {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html", 32.184 + "<a name=\"Z:Z:Dmethod_In_Class--\">" 32.185 + }, 32.186 + {BUG_ID + FS + "pkg1" + FS + "DeprMemClass.html", 32.187 + "<a href=\"../pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">" 32.188 + }, 32.189 + 32.190 + //Test enum 32.191 + 32.192 + {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html", 32.193 + "<a name=\"Z:Z:DFLD2\">" 32.194 + }, 32.195 + {BUG_ID + FS + "pkg1" + FS + "RegClass.Te$t_Enum.html", 32.196 + "<a href=\"../pkg1/RegClass.Te$t_Enum.html#Z:Z:DFLD2\">" 32.197 + }, 32.198 + 32.199 + //Test nested class 32.200 + 32.201 + {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html", 32.202 + "<a name=\"RegClass._NestedClas:D--\">" 32.203 + }, 32.204 + {BUG_ID + FS + "pkg1" + FS + "RegClass._NestedClas$.html", 32.205 + "<a href=\"../pkg1/RegClass._NestedClas$.html#RegClass._NestedClas:D--\">" 32.206 + }, 32.207 + 32.208 + //Test class use page 32.209 + 32.210 + {BUG_ID + FS + "pkg1" + FS + "class-use" + FS + "DeprMemClass.html", 32.211 + "<a href=\"../../pkg1/RegClass.html#d____mc\">" 32.212 + }, 32.213 + 32.214 + //Test deprecated list page 32.215 + 32.216 + {BUG_ID + FS + "deprecated-list.html", 32.217 + "<a href=\"pkg1/DeprMemClass.html#Z:Z_field_In_Class\">" 32.218 + }, 32.219 + {BUG_ID + FS + "deprecated-list.html", 32.220 + "<a href=\"pkg1/DeprMemClass.html#Z:Z:Dmethod_In_Class--\">" 32.221 + }, 32.222 + 32.223 + //Test constant values page 32.224 + 32.225 + {BUG_ID + FS + "constant-values.html", 32.226 + "<a href=\"pkg1/RegClass.html#S_:D:D:D:D:DINT\">" 32.227 + }, 32.228 + 32.229 + //Test serialized form page 32.230 + 32.231 + //This is the marker for the link that appears in the pkg1.RegClass.html page 32.232 + {BUG_ID + FS + "serialized-form.html", 32.233 + "<a name=\"pkg1.RegClass\">" 32.234 + }, 32.235 + 32.236 + //Test member name index page 32.237 + 32.238 + {BUG_ID + FS + "index-all.html", 32.239 + "<a name=\"I:Z:Z:D\">" 32.240 + }, 32.241 + {BUG_ID + FS + "index-all.html", 32.242 + "<a href=\"#I:Z:Z:D\">$" 32.243 + }, 32.244 + {BUG_ID + FS + "index-all.html", 32.245 + "<a href=\"#I:Z:Z_\">_" 32.246 + } 32.247 + }; 32.248 + 32.249 + private static final String[][] NEGATED_TEST = { 32.250 + //The marker name conversion should only affect HTML anchors. It should not 32.251 + //affect the lables. 32.252 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.253 + " Z:Z_" 32.254 + }, 32.255 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.256 + " Z:Z:Dfield" 32.257 + }, 32.258 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.259 + " Z:Z_field_In_Class" 32.260 + }, 32.261 + {BUG_ID + FS + "pkg1" + FS + "RegClass.html", 32.262 + " S_:D:D:D:D:DINT" 32.263 + }, 32.264 + }; 32.265 + 32.266 + private static final String[] ARGS = new String[] { 32.267 + "-d", BUG_ID, "-sourcepath", SRC_DIR, "-use", "pkg1" 32.268 + }; 32.269 + 32.270 + /** 32.271 + * The entry point of the test. 32.272 + * @param args the array of command line arguments. 32.273 + */ 32.274 + public static void main(String[] args) throws Exception { 32.275 + TestAnchorNames tester = new TestAnchorNames(); 32.276 + run(tester, ARGS, TEST, NEGATED_TEST); 32.277 + tester.printSummary(); 32.278 + } 32.279 + 32.280 + /** 32.281 + * {@inheritDoc} 32.282 + */ 32.283 + public String getBugId() { 32.284 + return BUG_ID; 32.285 + } 32.286 + 32.287 + /** 32.288 + * {@inheritDoc} 32.289 + */ 32.290 + public String getBugName() { 32.291 + return getClass().getName(); 32.292 + } 32.293 +}
33.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 33.2 +++ b/test/com/sun/javadoc/testAnchorNames/pkg1/DeprMemClass.java Thu Oct 10 20:57:27 2013 -0700 33.3 @@ -0,0 +1,45 @@ 33.4 +/* 33.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 33.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 33.7 + * 33.8 + * This code is free software; you can redistribute it and/or modify it 33.9 + * under the terms of the GNU General Public License version 2 only, as 33.10 + * published by the Free Software Foundation. 33.11 + * 33.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 33.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 33.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 33.15 + * version 2 for more details (a copy is included in the LICENSE file that 33.16 + * accompanied this code). 33.17 + * 33.18 + * You should have received a copy of the GNU General Public License version 33.19 + * 2 along with this work; if not, write to the Free Software Foundation, 33.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 33.21 + * 33.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 33.23 + * or visit www.oracle.com if you need additional information or have any 33.24 + * questions. 33.25 + */ 33.26 + 33.27 +package pkg1; 33.28 + 33.29 +public class DeprMemClass 33.30 +{ 33.31 + /** 33.32 + * Field in the class. 33.33 + * @deprecated Do not use this field. 33.34 + */ 33.35 + public int _field_In_Class; 33.36 + 33.37 + public int _fld; 33.38 + 33.39 + /** 33.40 + * Method in the class. 33.41 + * @deprecated Do not use this method. 33.42 + */ 33.43 + public void $method_In_Class() { 33.44 + } 33.45 + 33.46 + public void regularMethod() { 33.47 + } 33.48 +}
34.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 34.2 +++ b/test/com/sun/javadoc/testAnchorNames/pkg1/RegClass.java Thu Oct 10 20:57:27 2013 -0700 34.3 @@ -0,0 +1,186 @@ 34.4 +/* 34.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 34.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 34.7 + * 34.8 + * This code is free software; you can redistribute it and/or modify it 34.9 + * under the terms of the GNU General Public License version 2 only, as 34.10 + * published by the Free Software Foundation. 34.11 + * 34.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 34.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 34.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 34.15 + * version 2 for more details (a copy is included in the LICENSE file that 34.16 + * accompanied this code). 34.17 + * 34.18 + * You should have received a copy of the GNU General Public License version 34.19 + * 2 along with this work; if not, write to the Free Software Foundation, 34.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 34.21 + * 34.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 34.23 + * or visit www.oracle.com if you need additional information or have any 34.24 + * questions. 34.25 + */ 34.26 + 34.27 +package pkg1; 34.28 + 34.29 +import java.io.Serializable; 34.30 +import java.util.Map; 34.31 + 34.32 +/** 34.33 + * @serial This is the serial tag's comment. 34.34 + */ 34.35 +public class RegClass implements Serializable { 34.36 + 34.37 + /** 34.38 + * Normal field in class. 34.39 + */ 34.40 + public String field; 34.41 + 34.42 + /** 34.43 + * Normal field in class. 34.44 + */ 34.45 + public String method$$; 34.46 + 34.47 + /** 34.48 + * Filed staring with $. 34.49 + */ 34.50 + public String $field; 34.51 + 34.52 + /** 34.53 + * Filed staring with underscore. 34.54 + */ 34.55 + public String _field; 34.56 + 34.57 + /** 34.58 + * Serial field 34.59 + * @serial 34.60 + */ 34.61 + public boolean t_e$t; 34.62 + 34.63 + /** 34.64 + * Field in class with a $ in the name. 34.65 + */ 34.66 + public String fieldInCla$$; 34.67 + 34.68 + /** 34.69 + * Field name as just an underscore. 34.70 + */ 34.71 + public int _; 34.72 + 34.73 + /** 34.74 + * Field name as just a $. 34.75 + */ 34.76 + public int $; 34.77 + 34.78 + /** 34.79 + * Field name with underscore and $. 34.80 + */ 34.81 + public int _$; 34.82 + 34.83 + /** 34.84 + * Field name with $ and underscore. 34.85 + */ 34.86 + public int $_; 34.87 + 34.88 + /** 34.89 + * An array. 34.90 + */ 34.91 + public int arr[]; 34.92 + 34.93 + /** 34.94 + * Another array. 34.95 + */ 34.96 + public int[] arr1; 34.97 + 34.98 + /** 34.99 + * A constant field. 34.100 + */ 34.101 + public static final int S_$$$$$INT = 0; 34.102 + 34.103 + /** 34.104 + * Another field. 34.105 + */ 34.106 + public DeprMemClass d____mc; 34.107 + 34.108 + /** 34.109 + * An enum. 34.110 + */ 34.111 + public static enum Te$t_Enum { 34.112 + FLD_1, 34.113 + $FLD2 34.114 + }; 34.115 + 34.116 + /** 34.117 + * A constructor. 34.118 + */ 34.119 + public RegClass(String p, int i) { 34.120 + } 34.121 + 34.122 + /** 34.123 + * Method in Class. 34.124 + * @param p a string 34.125 + */ 34.126 + public void _methodInClass(String p) { 34.127 + } 34.128 + 34.129 + /** 34.130 + * Method in Class. 34.131 + * @param p a string 34.132 + * @param i an int 34.133 + */ 34.134 + public void _methodInClas$(String p, int i) { 34.135 + } 34.136 + 34.137 + /** 34.138 + * Method with $ in the name. 34.139 + * @param p a string array 34.140 + */ 34.141 + public void methodInCla$s(String[] p) { 34.142 + } 34.143 + 34.144 + /** 34.145 + * Method with D[] as a parameter. 34.146 + * @param p an array of D 34.147 + */ 34.148 + public void methodD(D[] p) { 34.149 + } 34.150 + 34.151 + /** 34.152 + * Method with $A as a parameter. 34.153 + * @param p an object of $A 34.154 + */ 34.155 + public void methodD($A p) { 34.156 + } 34.157 + 34.158 + /** 34.159 + * Serial test. 34.160 + * @serialData This is a serial data comment. 34.161 + * @return null 34.162 + */ 34.163 + protected Object $readResolve(){return null;} 34.164 + 34.165 + /** 34.166 + * Simple method. 34.167 + */ 34.168 + public void method() {} 34.169 + 34.170 + /** 34.171 + * Generics. 34.172 + */ 34.173 + public static <A> void foo(Map<A, Map<A, A>> map) {} 34.174 + 34.175 + /** 34.176 + * A nested class. 34.177 + */ 34.178 + public class _NestedClas$ {} 34.179 + 34.180 + /** 34.181 + * Nested class D. 34.182 + */ 34.183 + class D {} 34.184 + 34.185 + /** 34.186 + * Nested class $A. 34.187 + */ 34.188 + class $A {} 34.189 +}
35.1 --- a/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Thu Oct 10 13:41:08 2013 -0700 35.2 +++ b/test/com/sun/javadoc/testAnnotationOptional/TestAnnotationOptional.java Thu Oct 10 20:57:27 2013 -0700 35.3 @@ -1,5 +1,5 @@ 35.4 /* 35.5 - * Copyright (c) 2009, Oracle and/or its affiliates. All rights reserved. 35.6 + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved. 35.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 35.8 * 35.9 * This code is free software; you can redistribute it and/or modify it 35.10 @@ -23,7 +23,8 @@ 35.11 35.12 /* 35.13 * @test 35.14 - * @summary Make sure that annotations types with optional elements has 35.15 + * @bug 8025633 35.16 + * @summary Make sure that annotations types with optional elements have 35.17 * element headers 35.18 * @author Mahmood Ali 35.19 * @library ../lib/ 35.20 @@ -45,7 +46,7 @@ 35.21 //Input for string search tests. 35.22 private static final String[][] TEST = { 35.23 {BUG_ID + FS + "pkg" + FS + "AnnotationOptional.html", 35.24 - "<a name=\"annotation_type_element_detail\">" 35.25 + "<a name=\"annotation.type.element.detail\">" 35.26 } 35.27 }; 35.28
36.1 --- a/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Thu Oct 10 13:41:08 2013 -0700 36.2 +++ b/test/com/sun/javadoc/testAnnotationTypes/TestAnnotationTypes.java Thu Oct 10 20:57:27 2013 -0700 36.3 @@ -23,7 +23,7 @@ 36.4 36.5 /* 36.6 * @test 36.7 - * @bug 4973609 8015249 36.8 + * @bug 4973609 8015249 8025633 36.9 * @summary Make sure that annotation types with 0 members does not have 36.10 * extra HR tags. 36.11 * @author jamieh 36.12 @@ -45,11 +45,11 @@ 36.13 //Input for string search tests. 36.14 private static final String[][] TEST = { 36.15 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html", 36.16 - "<li>Summary: </li>" + NL + "<li><a href=\"#annotation_type_" + 36.17 - "field_summary\">Field</a> | </li>"}, 36.18 + "<li>Summary: </li>" + NL + "<li><a href=\"#annotation.type." + 36.19 + "field.summary\">Field</a> | </li>"}, 36.20 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html", 36.21 - "<li>Detail: </li>" + NL + "<li><a href=\"#annotation_type_" + 36.22 - "field_detail\">Field</a> | </li>"}, 36.23 + "<li>Detail: </li>" + NL + "<li><a href=\"#annotation.type." + 36.24 + "field.detail\">Field</a> | </li>"}, 36.25 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html", 36.26 "<!-- =========== ANNOTATION TYPE FIELD SUMMARY =========== -->"}, 36.27 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeField.html",
37.1 --- a/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Thu Oct 10 13:41:08 2013 -0700 37.2 +++ b/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Thu Oct 10 20:57:27 2013 -0700 37.3 @@ -23,7 +23,7 @@ 37.4 37.5 /* 37.6 * @test 37.7 - * @bug 4652655 4857717 37.8 + * @bug 4652655 4857717 8025633 37.9 * @summary This test verifies that class cross references work properly. 37.10 * @author jamieh 37.11 * @library ../lib/ 37.12 @@ -45,7 +45,7 @@ 37.13 "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigDecimal.html?is-external=true\" " + 37.14 "title=\"class or interface in java.math\"><code>Link to external class BigDecimal</code></a>"}, 37.15 {BUG_ID + FS + "C.html", 37.16 - "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" " + 37.17 + "<a href=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd-java.math.BigInteger-\" " + 37.18 "title=\"class or interface in java.math\"><code>Link to external member gcd</code></a>"}, 37.19 {BUG_ID + FS + "C.html", 37.20 "<dl>" + NL + "<dt><span class=\"strong\">Overrides:</span></dt>" + NL +
38.1 --- a/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Thu Oct 10 13:41:08 2013 -0700 38.2 +++ b/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Thu Oct 10 20:57:27 2013 -0700 38.3 @@ -23,14 +23,13 @@ 38.4 38.5 /* 38.6 * @test 38.7 - * @bug 4857717 38.8 + * @bug 4857717 8025633 38.9 * @summary Test to make sure that externally overriden and implemented methods 38.10 * are documented properly. The method should still include "implements" or 38.11 * "overrides" documentation even though the method is external. 38.12 * @author jamieh 38.13 * @library ../lib/ 38.14 - * @build JavadocTester 38.15 - * @build TestExternalOverridenMethod 38.16 + * @build JavadocTester TestExternalOverridenMethod 38.17 * @run main TestExternalOverridenMethod 38.18 */ 38.19 38.20 @@ -40,13 +39,13 @@ 38.21 private static final String[][] TEST = { 38.22 {BUG_ID + FS + "pkg" + FS + "XReader.html", 38.23 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 38.24 - "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read()\" " + 38.25 + "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read--\" " + 38.26 "title=\"class or interface in java.io\">read</a></code> in class <code>" + 38.27 "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true\" " + 38.28 "title=\"class or interface in java.io\">FilterReader</a></code></dd>"}, 38.29 {BUG_ID + FS + "pkg" + FS + "XReader.html", 38.30 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 38.31 - "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt()\" " + 38.32 + "<dd><code><a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt--\" " + 38.33 "title=\"class or interface in java.io\">readInt</a></code> in interface <code>" + 38.34 "<a href=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true\" " + 38.35 "title=\"class or interface in java.io\">DataInput</a></code></dd>"}};
39.1 --- a/test/com/sun/javadoc/testHref/TestHref.java Thu Oct 10 13:41:08 2013 -0700 39.2 +++ b/test/com/sun/javadoc/testHref/TestHref.java Thu Oct 10 20:57:27 2013 -0700 39.3 @@ -23,7 +23,7 @@ 39.4 39.5 /* 39.6 * @test 39.7 - * @bug 4663254 8016328 39.8 + * @bug 4663254 8016328 8025633 39.9 * @summary Verify that spaces do not appear in hrefs and anchors. 39.10 * @author jamieh 39.11 * @library ../lib/ 39.12 @@ -46,31 +46,31 @@ 39.13 private static final String[][] TEST = { 39.14 //External link. 39.15 {BUG_ID + FS + "pkg" + FS + "C1.html", 39.16 - "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\"" 39.17 + "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait-long-int-\"" 39.18 }, 39.19 //Member summary table link. 39.20 {BUG_ID + FS + "pkg" + FS + "C1.html", 39.21 - "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\"" 39.22 + "href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\"" 39.23 }, 39.24 //Anchor test. 39.25 {BUG_ID + FS + "pkg" + FS + "C1.html", 39.26 - "<a name=\"method(int, int, java.util.ArrayList)\">" + NL + 39.27 + "<a name=\"method-int-int-java.util.ArrayList-\">" + NL + 39.28 "<!-- -->" + NL + 39.29 "</a>" 39.30 }, 39.31 //Backward compatibility anchor test. 39.32 {BUG_ID + FS + "pkg" + FS + "C1.html", 39.33 - "<a name=\"method(int, int, java.util.ArrayList)\">" + NL + 39.34 + "<a name=\"method-int-int-java.util.ArrayList-\">" + NL + 39.35 "<!-- -->" + NL + 39.36 "</a>" 39.37 }, 39.38 //{@link} test. 39.39 {BUG_ID + FS + "pkg" + FS + "C2.html", 39.40 - "Link: <a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">" 39.41 + "Link: <a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">" 39.42 }, 39.43 //@see test. 39.44 {BUG_ID + FS + "pkg" + FS + "C2.html", 39.45 - "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">" 39.46 + "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method-int-int-java.util.ArrayList-\">" 39.47 }, 39.48 39.49 //Header does not link to the page itself.
40.1 --- a/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Thu Oct 10 13:41:08 2013 -0700 40.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Thu Oct 10 20:57:27 2013 -0700 40.3 @@ -25,7 +25,7 @@ 40.4 40.5 /* 40.6 * @test 40.7 - * @bug 6786690 6820360 40.8 + * @bug 6786690 6820360 8025633 40.9 * @summary This test verifies the nesting of definition list tags. 40.10 * @author Bhavesh Patel 40.11 * @library ../lib/ 40.12 @@ -64,7 +64,7 @@ 40.13 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + 40.14 "<dd>1.4</dd>" + NL + 40.15 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" + 40.16 - "<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 40.17 + "<a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + 40.18 "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.19 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>"+ NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" + 40.20 "</code> - the title</dd>" + NL + "<dd><code>test</code> - boolean value" + 40.21 @@ -79,11 +79,11 @@ 40.22 "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"strong\">Since:" + 40.23 "</span></dt>" + NL + "<dd>1.4</dd>" + NL + 40.24 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" + 40.25 - "<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" + 40.26 + "<a href=\"../pkg1/C1.html#readObject--\"><code>readObject()" + 40.27 "</code></a></dd>" + NL + "</dl>"}, 40.28 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + 40.29 "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:" + 40.30 - "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 40.31 + "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + 40.32 "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.33 {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" + 40.34 "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"strong\">" + 40.35 @@ -91,20 +91,20 @@ 40.36 {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" + 40.37 "</dt>" + NL + "<dd><code>" + 40.38 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + 40.39 - "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.40 + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.41 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.42 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + 40.43 " <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 40.44 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.45 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.46 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + 40.47 "<div class=\"block\">This field indicates whether the C1 is " + 40.48 "undecorated.</div>" + NL + " " + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + 40.49 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + 40.50 - "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.51 + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.52 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.53 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + 40.54 " <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 40.55 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.56 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.57 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + 40.58 "<div class=\"block\">Reads the object stream.</div>" + NL + 40.59 "<dl>" + NL + "<dt><span class=\"strong\">Throws:" + 40.60 @@ -141,29 +141,29 @@ 40.61 " if no decorations are" + NL + " to be enabled;" + NL + 40.62 " <code>false</code> if decorations are to be enabled." + 40.63 "</dd>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL + 40.64 - "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject()\">" + 40.65 + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject--\">" + 40.66 "<code>readObject()</code></a></dd>" + NL + "</dl>"}, 40.67 {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" + 40.68 "</dt>" + NL + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt>" + 40.69 - "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 40.70 + "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated-boolean-\">" + 40.71 "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.72 {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" + 40.73 "</dt>" + NL + "<dd><code>" + 40.74 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + 40.75 - "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.76 + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.77 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.78 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + 40.79 " <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 40.80 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.81 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.82 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + 40.83 "<div class=\"block\">This field indicates whether the C1 is " + 40.84 "undecorated.</div>" + NL + " " + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + 40.85 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + 40.86 - "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.87 + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.88 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 40.89 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + 40.90 " <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 40.91 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.92 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.93 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + 40.94 "<div class=\"block\">Reads the object stream.</div>" + NL + 40.95 "<dl>" + NL + "<dt><span class=\"strong\">Throws:" + 40.96 @@ -188,12 +188,12 @@ 40.97 {BUG_ID + FS + "serialized-form.html", "<pre>boolean " + 40.98 "undecorated</pre>" + NL + "<div class=\"block\"><span class=\"strong\">" + 40.99 "Deprecated.</span> <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 40.100 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" + 40.101 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" + 40.102 "setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}, 40.103 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" + 40.104 "Deprecated.</span> <span class=\"italic\">As of JDK version" + 40.105 " 1.5, replaced by" + NL + 40.106 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 40.107 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 40.108 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}}; 40.109 40.110 // Test for valid HTML generation which should not comprise of empty
41.1 --- a/test/com/sun/javadoc/testInterface/TestInterface.java Thu Oct 10 13:41:08 2013 -0700 41.2 +++ b/test/com/sun/javadoc/testInterface/TestInterface.java Thu Oct 10 20:57:27 2013 -0700 41.3 @@ -23,7 +23,7 @@ 41.4 41.5 /* 41.6 * @test 41.7 - * @bug 4682448 4947464 5029946 41.8 + * @bug 4682448 4947464 5029946 8025633 41.9 * @summary Verify that the public modifier does not show up in the 41.10 * documentation for public methods, as recommended by the JLS. 41.11 * If A implements I and B extends A, B should be in the list of 41.12 @@ -84,7 +84,7 @@ 41.13 //Make sure "Specified By" has substituted type parameters. 41.14 {BUG_ID + FS + "pkg" + FS + "Child.html", 41.15 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 41.16 - "<dd><code><a href=\"../pkg/Interface.html#method()\">method</a>" + 41.17 + "<dd><code><a href=\"../pkg/Interface.html#method--\">method</a>" + 41.18 "</code> in interface <code>" + 41.19 "<a href=\"../pkg/Interface.html\" title=\"interface in pkg\">" + 41.20 "Interface</a><<a href=\"../pkg/Child.html\" title=\"type parameter in Child\">" + 41.21 @@ -93,7 +93,7 @@ 41.22 //Make sure "Overrides" has substituted type parameters. 41.23 {BUG_ID + FS + "pkg" + FS + "Child.html", 41.24 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 41.25 - "<dd><code><a href=\"../pkg/Parent.html#method()\">method</a>" + 41.26 + "<dd><code><a href=\"../pkg/Parent.html#method--\">method</a>" + 41.27 "</code> in class <code><a href=\"../pkg/Parent.html\" " + 41.28 "title=\"class in pkg\">Parent</a><<a href=\"../pkg/Child.html\" " + 41.29 "title=\"type parameter in Child\">T</a>></code></dd>"
42.1 --- a/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Thu Oct 10 13:41:08 2013 -0700 42.2 +++ b/test/com/sun/javadoc/testJavaFX/TestJavaFX.java Thu Oct 10 20:57:27 2013 -0700 42.3 @@ -23,7 +23,7 @@ 42.4 42.5 /* 42.6 * @test 42.7 - * @bug 7112427 8012295 42.8 + * @bug 7112427 8012295 8025633 42.9 * @summary Test of the JavaFX doclet features. 42.10 * @author jvalenta 42.11 * @library ../lib/ 42.12 @@ -38,8 +38,8 @@ 42.13 private static final String[][] TEST = 42.14 new String[][] { 42.15 {"./" + BUG_ID + "/C.html", 42.16 - "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL + 42.17 - "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"}, 42.18 + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate--\"><code>getRate()</code></a>, " + NL + 42.19 + "<a href=\"C.html#setRate-double-\"><code>setRate(double)</code></a></dd>"}, 42.20 {"./" + BUG_ID + "/C.html", 42.21 "<pre>public final void setRate(double value)</pre>" + NL + 42.22 "<div class=\"block\">Sets the value of the property rate.</div>" + NL + 42.23 @@ -63,7 +63,7 @@ 42.24 {"./" + BUG_ID + "/C.html", 42.25 "<span class=\"strong\">Property description:</span>"}, 42.26 {"./" + BUG_ID + "/C.html", 42.27 - "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#setTestMethodProperty()\">setTestMethodProperty</a></span>()</code> </td>" }, 42.28 + "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"C.html#setTestMethodProperty--\">setTestMethodProperty</a></span>()</code> </td>" }, 42.29 {"./" + BUG_ID + "/C.html", 42.30 "<h4>isPaused</h4>" + NL + 42.31 "<pre>public final double isPaused()</pre>" + NL +
43.1 --- a/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Thu Oct 10 13:41:08 2013 -0700 43.2 +++ b/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Thu Oct 10 20:57:27 2013 -0700 43.3 @@ -23,7 +23,7 @@ 43.4 43.5 /* 43.6 * @test 43.7 - * @bug 4732864 6280605 7064544 8014636 8016328 43.8 + * @bug 4732864 6280605 7064544 8014636 8016328 8025633 43.9 * @summary Make sure that you can link from one member to another using 43.10 * non-qualified name, furthermore, ensure the right one is linked. 43.11 * @author jamieh 43.12 @@ -49,9 +49,9 @@ 43.13 "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL + 43.14 " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL + 43.15 " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>" + NL + 43.16 - " 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 + 43.17 - " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL + 43.18 - " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>" 43.19 + " 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 + 43.20 + " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>" + NL + 43.21 + " Unqualified Link: <a href=\"../pkg/C.html#method-pkg.C.InnerC-pkg.C.InnerC2-\"><code>method(InnerC, InnerC2)</code></a>.<br/>" 43.22 }, 43.23 {BUG_ID + FS + "pkg" + FS + "C.InnerC.html", 43.24 "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>" + NL +
44.1 --- a/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Thu Oct 10 13:41:08 2013 -0700 44.2 +++ b/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Thu Oct 10 20:57:27 2013 -0700 44.3 @@ -23,7 +23,7 @@ 44.4 44.5 /* 44.6 * @test 44.7 - * @bug 4638588 4635809 6256068 6270645 44.8 + * @bug 4638588 4635809 6256068 6270645 8025633 44.9 * @summary Test to make sure that members are inherited properly in the Javadoc. 44.10 * Verify that inheritence labels are correct. 44.11 * @author jamieh 44.12 @@ -44,7 +44,7 @@ 44.13 44.14 //Public method should be inherited 44.15 {BUG_ID + FS + "pkg" + FS + "SubClass.html", 44.16 - "<a href=\"../pkg/BaseClass.html#pubMethod()\">"}, 44.17 + "<a href=\"../pkg/BaseClass.html#pubMethod--\">"}, 44.18 44.19 //Public inner class should be inherited. 44.20 {BUG_ID + FS + "pkg" + FS + "SubClass.html", 44.21 @@ -56,7 +56,7 @@ 44.22 44.23 //Protected method should be inherited 44.24 {BUG_ID + FS + "pkg" + FS + "SubClass.html", 44.25 - "<a href=\"../pkg/BaseClass.html#proMethod()\">"}, 44.26 + "<a href=\"../pkg/BaseClass.html#proMethod--\">"}, 44.27 44.28 //Protected inner class should be inherited. 44.29 {BUG_ID + FS + "pkg" + FS + "SubClass.html", 44.30 @@ -73,14 +73,14 @@ 44.31 // Test overriding/implementing methods with generic parameters. 44.32 {BUG_ID + FS + "pkg" + FS + "BaseClass.html", 44.33 "<dl>" + NL + "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 44.34 - "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation(java.lang.Class)\">" + 44.35 + "<dd><code><a href=\"../pkg/BaseInterface.html#getAnnotation-java.lang.Class-\">" + 44.36 "getAnnotation</a></code> in interface <code>" + 44.37 "<a href=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">" + 44.38 "BaseInterface</a></code></dd>" + NL + "</dl>"}, 44.39 44.40 // Test diamond inheritence member summary (6256068) 44.41 {BUG_ID + FS + "diamond" + FS + "Z.html", 44.42 - "<code><a href=\"../diamond/A.html#aMethod()\">aMethod</a></code>"}, 44.43 + "<code><a href=\"../diamond/A.html#aMethod--\">aMethod</a></code>"}, 44.44 44.45 // Test that doc is inherited from closed parent (6270645) 44.46 {BUG_ID + FS + "inheritDist" + FS + "C.html", 44.47 @@ -90,7 +90,7 @@ 44.48 44.49 private static final String[][] NEGATED_TEST = { 44.50 {BUG_ID + FS + "pkg" + FS + "SubClass.html", 44.51 - "<a href=\"../pkg/BaseClass.html#staticMethod()\">staticMethod</a></code>"}, 44.52 + "<a href=\"../pkg/BaseClass.html#staticMethod--\">staticMethod</a></code>"}, 44.53 }; 44.54 private static final String[] ARGS = 44.55 new String[] {
45.1 --- a/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Thu Oct 10 13:41:08 2013 -0700 45.2 +++ b/test/com/sun/javadoc/testMemberSummary/TestMemberSummary.java Thu Oct 10 20:57:27 2013 -0700 45.3 @@ -23,7 +23,7 @@ 45.4 45.5 /* 45.6 * @test 45.7 - * @bug 4951228 6290760 45.8 + * @bug 4951228 6290760 8025633 45.9 * @summary Test the case where the overriden method returns a different 45.10 * type than the method in the child class. Make sure the 45.11 * documentation is inherited but the return type isn't. 45.12 @@ -49,7 +49,7 @@ 45.13 // Check return type in member summary. 45.14 {BUG_ID + FS + "pkg" + FS + "PublicChild.html", 45.15 "<code><a href=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</a></code></td>" + NL + 45.16 - "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../pkg/PublicChild.html#returnTypeTest()\">" + 45.17 + "<td class=\"colLast\"><code><span class=\"strong\"><a href=\"../pkg/PublicChild.html#returnTypeTest--\">" + 45.18 "returnTypeTest</a></span>()</code>" 45.19 }, 45.20 // Check return type in member detail. 45.21 @@ -60,9 +60,9 @@ 45.22 45.23 // Legacy anchor dimensions (6290760) 45.24 {BUG_ID + FS + "pkg2" + FS + "A.html", 45.25 - "<a name=\"f(java.lang.Object[])\">" + NL + 45.26 + "<a name=\"f-java.lang.Object:A-\">" + NL + 45.27 "<!-- -->" + NL + 45.28 - "</a><a name=\"f(T[])\">" + NL + 45.29 + "</a><a name=\"f-T:A-\">" + NL + 45.30 "<!-- -->" + NL + 45.31 "</a>" 45.32 },
46.1 --- a/test/com/sun/javadoc/testNavigation/TestNavigation.java Thu Oct 10 13:41:08 2013 -0700 46.2 +++ b/test/com/sun/javadoc/testNavigation/TestNavigation.java Thu Oct 10 20:57:27 2013 -0700 46.3 @@ -23,7 +23,7 @@ 46.4 46.5 /* 46.6 * @test 46.7 - * @bug 4131628 4664607 7025314 8023700 7198273 46.8 + * @bug 4131628 4664607 7025314 8023700 7198273 8025633 46.9 * @summary Make sure the Next/Prev Class links iterate through all types. 46.10 * Make sure the navagation is 2 columns, not 3. 46.11 * @author jamieh 46.12 @@ -60,7 +60,7 @@ 46.13 {BUG_ID + FS + "pkg" + FS + "I.html", "<li>Next Class</li>"}, 46.14 // Test for 4664607 46.15 {BUG_ID + FS + "pkg" + FS + "I.html", 46.16 - "<div class=\"skipNav\"><a href=\"#skip-navbar_top\" title=\"Skip navigation links\">Skip navigation links</a></div>" + NL + "<a name=\"navbar_top_firstrow\">" + NL + 46.17 + "<div class=\"skipNav\"><a href=\"#skip.navbar.top\" title=\"Skip navigation links\">Skip navigation links</a></div>" + NL + "<a name=\"navbar.top.firstrow\">" + NL + 46.18 "<!-- -->" + NL + "</a>"} 46.19 }; 46.20 private static final String[][] NEGATED_TEST = NO_TEST;
47.1 --- a/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java Thu Oct 10 13:41:08 2013 -0700 47.2 +++ b/test/com/sun/javadoc/testNestedGenerics/TestNestedGenerics.java Thu Oct 10 20:57:27 2013 -0700 47.3 @@ -1,5 +1,5 @@ 47.4 /* 47.5 - * Copyright (c) 2011, Oracle and/or its affiliates. All rights reserved. 47.6 + * Copyright (c) 2011, 2013, Oracle and/or its affiliates. All rights reserved. 47.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 47.8 * 47.9 * This code is free software; you can redistribute it and/or modify it 47.10 @@ -23,7 +23,7 @@ 47.11 47.12 /* 47.13 * @test 47.14 - * @bug 6758050 47.15 + * @bug 6758050 8025633 47.16 * @summary Test HTML output for nested generic types. 47.17 * @author bpatel 47.18 * @library ../lib/ 47.19 @@ -46,7 +46,7 @@ 47.20 private static final String[][] TEST = { 47.21 {BUG_ID + FS + "pkg" + FS + "NestedGenerics.html", 47.22 "<div class=\"block\">Contains <a " + 47.23 - "href=\"../pkg/NestedGenerics.html#foo(java.util.Map)\"><code>foo" + 47.24 + "href=\"../pkg/NestedGenerics.html#foo-java.util.Map-\"><code>foo" + 47.25 "(java.util.Map<A, java.util.Map<A, A>>)</code></a></div>" 47.26 } 47.27 };
48.1 --- a/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Thu Oct 10 13:41:08 2013 -0700 48.2 +++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Thu Oct 10 20:57:27 2013 -0700 48.3 @@ -23,7 +23,7 @@ 48.4 48.5 /* 48.6 * @test 48.7 - * @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 48.8 + * @bug 4789689 4905985 4927164 4827184 4993906 5004549 7025314 7010344 8025633 48.9 * @summary Run Javadoc on a set of source files that demonstrate new 48.10 * language features. Check the output to ensure that the new 48.11 * language features are properly documented. 48.12 @@ -145,7 +145,7 @@ 48.13 //================================= 48.14 {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int... i)"}, 48.15 {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[][]... i)"}, 48.16 - {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "(int[]...)"}, 48.17 + {BUG_ID + FS + "pkg" + FS + "VarArgs.html", "-int:A...-"}, 48.18 {BUG_ID + FS + "pkg" + FS + "VarArgs.html", 48.19 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" + 48.20 "TypeParameters</a>... t"}, 48.21 @@ -156,13 +156,13 @@ 48.22 //Make sure the summary links are correct. 48.23 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 48.24 "<li>Summary: </li>" + NL + "<li>Field | </li>" + NL + 48.25 - "<li><a href=\"#annotation_type_required_element_summary\">" + 48.26 + "<li><a href=\"#annotation.type.required.element.summary\">" + 48.27 "Required</a> | </li>" + NL + "<li>" + 48.28 - "<a href=\"#annotation_type_optional_element_summary\">Optional</a></li>"}, 48.29 + "<a href=\"#annotation.type.optional.element.summary\">Optional</a></li>"}, 48.30 //Make sure the detail links are correct. 48.31 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 48.32 "<li>Detail: </li>" + NL + "<li>Field | </li>" + NL + 48.33 - "<li><a href=\"#annotation_type_element_detail\">Element</a></li>"}, 48.34 + "<li><a href=\"#annotation.type.element.detail\">Element</a></li>"}, 48.35 //Make sure the heading is correct. 48.36 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 48.37 "Annotation Type AnnotationType</h2>"}, 48.38 @@ -188,16 +188,16 @@ 48.39 48.40 //PACKAGE 48.41 {BUG_ID + FS + "pkg" + FS + "package-summary.html", 48.42 - "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>=\"Package Annotation\"," + NL + 48.43 - " <a href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)"}, 48.44 + "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>=\"Package Annotation\"," + NL + 48.45 + " <a href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)"}, 48.46 48.47 //CLASS 48.48 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 48.49 "<pre><a href=\"../pkg/AnnotationType.html\" " + 48.50 "title=\"annotation in pkg\">@AnnotationType</a>(" + 48.51 - "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" + 48.52 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + 48.53 "=\"Class Annotation\"," + NL + 48.54 - " <a href=\"../pkg/AnnotationType.html#required()\">" + 48.55 + " <a href=\"../pkg/AnnotationType.html#required--\">" + 48.56 "required</a>=1994)" + NL + "public class <span class=\"strong\">" + 48.57 "AnnotationTypeUsage</span>" + NL + "extends java.lang.Object</pre>"}, 48.58 48.59 @@ -205,36 +205,36 @@ 48.60 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 48.61 "<pre><a href=\"../pkg/AnnotationType.html\" " + 48.62 "title=\"annotation in pkg\">@AnnotationType</a>(" + 48.63 - "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" + 48.64 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + 48.65 "=\"Field Annotation\"," + NL + 48.66 - " <a href=\"../pkg/AnnotationType.html#required()\">" + 48.67 + " <a href=\"../pkg/AnnotationType.html#required--\">" + 48.68 "required</a>=1994)" + NL + "public int field</pre>"}, 48.69 48.70 //CONSTRUCTOR 48.71 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 48.72 "<pre><a href=\"../pkg/AnnotationType.html\" " + 48.73 "title=\"annotation in pkg\">@AnnotationType</a>(" + 48.74 - "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" + 48.75 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + 48.76 "=\"Constructor Annotation\"," + NL + 48.77 - " <a href=\"../pkg/AnnotationType.html#required()\">" + 48.78 + " <a href=\"../pkg/AnnotationType.html#required--\">" + 48.79 "required</a>=1994)" + NL + "public AnnotationTypeUsage()</pre>"}, 48.80 48.81 //METHOD 48.82 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 48.83 "<pre><a href=\"../pkg/AnnotationType.html\" " + 48.84 "title=\"annotation in pkg\">@AnnotationType</a>(" + 48.85 - "<a href=\"../pkg/AnnotationType.html#optional()\">optional</a>" + 48.86 + "<a href=\"../pkg/AnnotationType.html#optional--\">optional</a>" + 48.87 "=\"Method Annotation\"," + NL + 48.88 - " <a href=\"../pkg/AnnotationType.html#required()\">" + 48.89 + " <a href=\"../pkg/AnnotationType.html#required--\">" + 48.90 "required</a>=1994)" + NL + "public void method()</pre>"}, 48.91 48.92 //METHOD PARAMS 48.93 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 48.94 "<pre>public void methodWithParams(" + 48.95 "<a href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" + 48.96 - "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">" + 48.97 + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" + 48.98 "optional</a>=\"Parameter Annotation\",<a " + 48.99 - "href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)" + NL + 48.100 + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)" + NL + 48.101 " int documented," + NL + 48.102 " int undocmented)</pre>"}, 48.103 48.104 @@ -242,9 +242,9 @@ 48.105 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 48.106 "<pre>public AnnotationTypeUsage(<a " + 48.107 "href=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">" + 48.108 - "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional()\">" + 48.109 + "@AnnotationType</a>(<a href=\"../pkg/AnnotationType.html#optional--\">" + 48.110 "optional</a>=\"Constructor Param Annotation\",<a " + 48.111 - "href=\"../pkg/AnnotationType.html#required()\">required</a>=1994)" + NL + 48.112 + "href=\"../pkg/AnnotationType.html#required--\">required</a>=1994)" + NL + 48.113 " int documented," + NL + 48.114 " int undocmented)</pre>"}, 48.115 48.116 @@ -254,43 +254,43 @@ 48.117 48.118 //Integer 48.119 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.120 - "<a href=\"../pkg1/A.html#d()\">d</a>=3.14,"}, 48.121 + "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"}, 48.122 48.123 //Double 48.124 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.125 - "<a href=\"../pkg1/A.html#d()\">d</a>=3.14,"}, 48.126 + "<a href=\"../pkg1/A.html#d--\">d</a>=3.14,"}, 48.127 48.128 //Boolean 48.129 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.130 - "<a href=\"../pkg1/A.html#b()\">b</a>=true,"}, 48.131 + "<a href=\"../pkg1/A.html#b--\">b</a>=true,"}, 48.132 48.133 //String 48.134 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.135 - "<a href=\"../pkg1/A.html#s()\">s</a>=\"sigh\","}, 48.136 + "<a href=\"../pkg1/A.html#s--\">s</a>=\"sigh\","}, 48.137 48.138 //Class 48.139 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.140 - "<a href=\"../pkg1/A.html#c()\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"}, 48.141 + "<a href=\"../pkg1/A.html#c--\">c</a>=<a href=\"../pkg2/Foo.html\" title=\"class in pkg2\">Foo.class</a>,"}, 48.142 48.143 //Bounded Class 48.144 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.145 - "<a href=\"../pkg1/A.html#w()\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"}, 48.146 + "<a href=\"../pkg1/A.html#w--\">w</a>=<a href=\"../pkg/TypeParameterSubClass.html\" title=\"class in pkg\">TypeParameterSubClass.class</a>,"}, 48.147 48.148 //Enum 48.149 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.150 - "<a href=\"../pkg1/A.html#e()\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"}, 48.151 + "<a href=\"../pkg1/A.html#e--\">e</a>=<a href=\"../pkg/Coin.html#Penny\">Penny</a>,"}, 48.152 48.153 //Annotation Type 48.154 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.155 - "<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),"}, 48.156 + "<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),"}, 48.157 48.158 //String Array 48.159 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.160 - "<a href=\"../pkg1/A.html#sa()\">sa</a>={\"up\",\"down\"},"}, 48.161 + "<a href=\"../pkg1/A.html#sa--\">sa</a>={\"up\",\"down\"},"}, 48.162 48.163 //Primitive 48.164 {BUG_ID + FS + "pkg1" + FS + "B.html", 48.165 - "<a href=\"../pkg1/A.html#primitiveClassTest()\">primitiveClassTest</a>=boolean.class,"}, 48.166 + "<a href=\"../pkg1/A.html#primitiveClassTest--\">primitiveClassTest</a>=boolean.class,"}, 48.167 48.168 //XXX: Add array test case after this if fixed: 48.169 //5020899: Incorrect internal representation of class-valued annotation elements 48.170 @@ -335,7 +335,7 @@ 48.171 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 48.172 "<td class=\"colLast\"><span class=\"strong\">ClassUseTest1." + 48.173 "</span><code><span class=\"strong\"><a href=\"../../pkg2/" + 48.174 - "ClassUseTest1.html#method(T)\">method</a></span>" + 48.175 + "ClassUseTest1.html#method-T-\">method</a></span>" + 48.176 "(T t)</code> </td>" 48.177 }, 48.178 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo.html", 48.179 @@ -388,7 +388,7 @@ 48.180 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo2.html", 48.181 "<td class=\"colLast\"><span class=\"strong\">" + 48.182 "ClassUseTest1.</span><code><span class=\"strong\"><a href=\"../../" + 48.183 - "pkg2/ClassUseTest1.html#method(T)\">method</a></span>" + 48.184 + "pkg2/ClassUseTest1.html#method-T-\">method</a></span>" + 48.185 "(T t)</code> </td>" 48.186 }, 48.187 48.188 @@ -417,7 +417,7 @@ 48.189 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 48.190 "<td class=\"colLast\"><span class=\"strong\">ClassUseTest2." + 48.191 "</span><code><span class=\"strong\"><a href=\"../../pkg2/" + 48.192 - "ClassUseTest2.html#method(T)\">method</a></span>" + 48.193 + "ClassUseTest2.html#method-T-\">method</a></span>" + 48.194 "(T t)</code> </td>" 48.195 }, 48.196 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest.html", 48.197 @@ -472,7 +472,7 @@ 48.198 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 48.199 "<td class=\"colLast\"><span class=\"strong\">ClassUseTest2." + 48.200 "</span><code><span class=\"strong\"><a href=\"../../pkg2/" + 48.201 - "ClassUseTest2.html#method(T)\">method</a></span>" + 48.202 + "ClassUseTest2.html#method-T-\">method</a></span>" + 48.203 "(T t)</code> </td>" 48.204 }, 48.205 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo3.html", 48.206 @@ -517,7 +517,7 @@ 48.207 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 48.208 "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3" + 48.209 ".</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." + 48.210 - "html#method(T)\">method</a></span>(T t)</code> </td>" 48.211 + "html#method-T-\">method</a></span>(T t)</code> </td>" 48.212 }, 48.213 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "ParamTest2.html", 48.214 "<td class=\"colFirst\"><code><T extends <a href=\"../" + 48.215 @@ -554,7 +554,7 @@ 48.216 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 48.217 "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3." + 48.218 "</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." + 48.219 - "html#method(T)\">method</a></span>(T t)</code>" + 48.220 + "html#method-T-\">method</a></span>(T t)</code>" + 48.221 " </td>" 48.222 }, 48.223 {BUG_ID + FS + "pkg2" + FS + "class-use" + FS + "Foo4.html", 48.224 @@ -588,7 +588,7 @@ 48.225 "<td class=\"colFirst\"><code>void</code></td>" + NL + 48.226 "<td class=\"colLast\"><span class=\"strong\">ClassUseTest3." + 48.227 "</span><code><span class=\"strong\"><a href=\"../../pkg2/ClassUseTest3." + 48.228 - "html#method(java.util.Set)\">method</a></span>(java." + 48.229 + "html#method-java.util.Set-\">method</a></span>(java." + 48.230 "util.Set<<a href=\"../../pkg2/Foo4.html\" title=\"" + 48.231 "class in pkg2\">Foo4</a>> p)</code> </td>" + NL + 48.232 "</tr>" + NL + "</tbody>" 48.233 @@ -663,14 +663,14 @@ 48.234 // TYPE PARAMETER IN INDEX 48.235 //================================= 48.236 {BUG_ID + FS + "index-all.html", 48.237 - "<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">" + 48.238 + "<span class=\"strong\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" + 48.239 "method(Vector<Object>)</a></span>" 48.240 }, 48.241 //================================= 48.242 // TYPE PARAMETER IN INDEX 48.243 //================================= 48.244 {BUG_ID + FS + "index-all.html", 48.245 - "<span class=\"strong\"><a href=\"pkg2/Foo.html#method(java.util.Vector)\">" + 48.246 + "<span class=\"strong\"><a href=\"pkg2/Foo.html#method-java.util.Vector-\">" + 48.247 "method(Vector<Object>)</a></span>" 48.248 }, 48.249 };
49.1 --- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java Thu Oct 10 13:41:08 2013 -0700 49.2 +++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenMethodDocCopy.java Thu Oct 10 20:57:27 2013 -0700 49.3 @@ -23,7 +23,7 @@ 49.4 49.5 /* 49.6 * @test 49.7 - * @bug 4368820 49.8 + * @bug 4368820 8025633 49.9 * @summary Inherited comment should link directly to member, not just 49.10 * class 49.11 * @author jamieh 49.12 @@ -47,7 +47,7 @@ 49.13 private static final String[][] TEST = { 49.14 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 49.15 "<span class=\"strong\">Description copied from class: <code>" + 49.16 - "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy()\">" + 49.17 + "<a href=\"../pkg1/BaseClass.html#overridenMethodWithDocsToCopy--\">" + 49.18 "BaseClass</a></code></span>" 49.19 } 49.20 };
50.1 --- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Thu Oct 10 13:41:08 2013 -0700 50.2 +++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Thu Oct 10 20:57:27 2013 -0700 50.3 @@ -23,7 +23,7 @@ 50.4 50.5 /* 50.6 * @test 50.7 - * @bug 4634891 50.8 + * @bug 4634891 8025633 50.9 * @summary Determine if overriden methods are properly documented when 50.10 * -protected (default) visibility flag is used. 50.11 * @author jamieh 50.12 @@ -41,14 +41,14 @@ 50.13 //The public method should be overriden 50.14 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 50.15 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 50.16 - "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" + 50.17 + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" + 50.18 "publicMethod</a></code> in class <code>" + 50.19 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}, 50.20 50.21 //The public method in different package should be overriden 50.22 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 50.23 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 50.24 - "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod()\">" + 50.25 + "<dd><code><a href=\"../pkg1/BaseClass.html#publicMethod--\">" + 50.26 "publicMethod</a></code> in class <code>" + 50.27 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"}, 50.28 50.29 @@ -56,7 +56,7 @@ 50.30 //package. 50.31 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 50.32 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 50.33 - "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod()\">" + 50.34 + "<dd><code><a href=\"../pkg1/BaseClass.html#packagePrivateMethod--\">" + 50.35 "packagePrivateMethod</a></code> in class <code>" + 50.36 "<a href=\"../pkg1/BaseClass.html\" title=\"class in pkg1\">BaseClass</a></code></dd>"} 50.37 };
51.1 --- a/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Thu Oct 10 13:41:08 2013 -0700 51.2 +++ b/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Thu Oct 10 20:57:27 2013 -0700 51.3 @@ -23,7 +23,7 @@ 51.4 51.5 /* 51.6 * @test 51.7 - * @bug 4780441 4874845 4978816 8014017 8016328 51.8 + * @bug 4780441 4874845 4978816 8014017 8016328 8025633 51.9 * @summary Make sure that when the -private flag is not used, members 51.10 * inherited from package private class are documented in the child. 51.11 * 51.12 @@ -66,7 +66,7 @@ 51.13 51.14 // Method inheritence from non-public superclass. 51.15 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 51.16 - "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent(int)\">" + 51.17 + "<a href=\"../pkg/PublicChild.html#methodInheritedFromParent-int-\">" + 51.18 "methodInheritedFromParent</a>" 51.19 }, 51.20 51.21 @@ -78,7 +78,7 @@ 51.22 51.23 // Method inheritence from non-public superinterface. 51.24 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 51.25 - "<a href=\"../pkg/PublicInterface.html#methodInterface(int)\">" + 51.26 + "<a href=\"../pkg/PublicInterface.html#methodInterface-int-\">" + 51.27 "methodInterface</a>" 51.28 }, 51.29 51.30 @@ -139,7 +139,7 @@ 51.31 //Do not inherit private interface method with generic parameters. 51.32 //This method has been implemented. 51.33 {BUG_ID + "-1" + FS + "pkg2" + FS + "C.html", 51.34 - "<span class=\"strong\"><a href=\"../pkg2/I.html#hello(T)\">hello</a></span>"}, 51.35 + "<span class=\"strong\"><a href=\"../pkg2/I.html#hello-T-\">hello</a></span>"}, 51.36 }; 51.37 51.38 // Test output when -private flag is used. 51.39 @@ -171,20 +171,20 @@ 51.40 "PrivateParent</a>" 51.41 }, 51.42 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 51.43 - "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent(int)\">" + 51.44 + "<a href=\"../pkg/PrivateParent.html#methodInheritedFromParent-int-\">" + 51.45 "methodInheritedFromParent</a>" 51.46 }, 51.47 // Should document that a method overrides method from private class. 51.48 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 51.49 "<dt><span class=\"strong\">Overrides:</span></dt>" + NL + 51.50 - "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[],%20int,%20T,%20V,%20java.util.List)\">" + 51.51 + "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent-char:A-int-T-V-java.util.List-\">" + 51.52 "methodOverridenFromParent</a></code> in class <code>" + 51.53 "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + 51.54 "PrivateParent</a></code></dd>"}, 51.55 // Should document that a method is specified by private interface. 51.56 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 51.57 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 51.58 - "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" + 51.59 + "<dd><code><a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" + 51.60 "methodInterface</a></code> in interface <code>" + 51.61 "<a href=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + 51.62 "PrivateInterface</a></code></dd>"}, 51.63 @@ -195,7 +195,7 @@ 51.64 "PrivateInterface</a>" 51.65 }, 51.66 {BUG_ID + "-2" + FS + "pkg" + FS + "PrivateInterface.html", 51.67 - "<a href=\"../pkg/PrivateInterface.html#methodInterface(int)\">" + 51.68 + "<a href=\"../pkg/PrivateInterface.html#methodInterface-int-\">" + 51.69 "methodInterface</a>" 51.70 }, 51.71 // Should mention that any documentation was copied. 51.72 @@ -228,11 +228,11 @@ 51.73 //with generic parameters has been implemented. 51.74 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 51.75 "<span class=\"strong\">Description copied from interface: <code>" + 51.76 - "<a href=\"../pkg2/I.html#hello(T)\">I</a></code></span>"}, 51.77 + "<a href=\"../pkg2/I.html#hello-T-\">I</a></code></span>"}, 51.78 51.79 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 51.80 "<dt><span class=\"strong\">Specified by:</span></dt>" + NL + 51.81 - "<dd><code><a href=\"../pkg2/I.html#hello(T)\">hello</a></code>" + 51.82 + "<dd><code><a href=\"../pkg2/I.html#hello-T-\">hello</a></code>" + 51.83 " in interface <code>" + 51.84 "<a href=\"../pkg2/I.html\" title=\"interface in pkg2\">I</a>" + 51.85 "<java.lang.String></code></dd>"},
52.1 --- a/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java Thu Oct 10 13:41:08 2013 -0700 52.2 +++ b/test/com/sun/javadoc/testRepeatedAnnotations/TestRepeatedAnnotations.java Thu Oct 10 20:57:27 2013 -0700 52.3 @@ -1,5 +1,5 @@ 52.4 /* 52.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved. 52.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved. 52.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 52.8 * 52.9 * This code is free software; you can redistribute it and/or modify it 52.10 @@ -56,7 +56,7 @@ 52.11 {BUG_ID + FS + "pkg" + FS + "C.html", 52.12 "<a href=\"../pkg/RegContainerDoc.html\" " + 52.13 "title=\"annotation in pkg\">@RegContainerDoc</a>" + 52.14 - "(<a href=\"../pkg/RegContainerDoc.html#value()\">value</a>={" + 52.15 + "(<a href=\"../pkg/RegContainerDoc.html#value--\">value</a>={" + 52.16 "<a href=\"../pkg/RegContaineeNotDoc.html\" " + 52.17 "title=\"annotation in pkg\">@RegContaineeNotDoc</a>," + 52.18 "<a href=\"../pkg/RegContaineeNotDoc.html\" " + 52.19 @@ -71,7 +71,7 @@ 52.20 {BUG_ID + FS + "pkg" + FS + "C.html", 52.21 "<a href=\"../pkg/ContainerSynthDoc.html\" " + 52.22 "title=\"annotation in pkg\">@ContainerSynthDoc</a>(" + 52.23 - "<a href=\"../pkg/ContainerSynthDoc.html#value()\">value</a>=" + 52.24 + "<a href=\"../pkg/ContainerSynthDoc.html#value--\">value</a>=" + 52.25 "<a href=\"../pkg/ContaineeSynthDoc.html\" " + 52.26 "title=\"annotation in pkg\">@ContaineeSynthDoc</a>)"}, 52.27 {BUG_ID + FS + "pkg" + FS + "C.html", 52.28 @@ -82,37 +82,37 @@ 52.29 52.30 {BUG_ID + FS + "pkg" + FS + "D.html", 52.31 "<a href=\"../pkg/RegDoc.html\" title=\"annotation in pkg\">@RegDoc</a>" + 52.32 - "(<a href=\"../pkg/RegDoc.html#x()\">x</a>=1)"}, 52.33 + "(<a href=\"../pkg/RegDoc.html#x--\">x</a>=1)"}, 52.34 {BUG_ID + FS + "pkg" + FS + "D.html", 52.35 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" + 52.36 - "(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>=1)"}, 52.37 + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>=1)"}, 52.38 {BUG_ID + FS + "pkg" + FS + "D.html", 52.39 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>" + 52.40 - "(<a href=\"../pkg/RegArryDoc.html#y()\">y</a>={1,2})"}, 52.41 + "(<a href=\"../pkg/RegArryDoc.html#y--\">y</a>={1,2})"}, 52.42 {BUG_ID + FS + "pkg" + FS + "D.html", 52.43 "<a href=\"../pkg/NonSynthDocContainer.html\" " + 52.44 "title=\"annotation in pkg\">@NonSynthDocContainer</a>" + 52.45 - "(<a href=\"../pkg/NonSynthDocContainer.html#value()\">value</a>=" + 52.46 + "(<a href=\"../pkg/NonSynthDocContainer.html#value--\">value</a>=" + 52.47 "<a href=\"../pkg/RegArryDoc.html\" title=\"annotation in pkg\">@RegArryDoc</a>)"}, 52.48 52.49 {BUG_ID + FS + "pkg1" + FS + "C.html", 52.50 "<a href=\"../pkg1/RegContainerValDoc.html\" " + 52.51 "title=\"annotation in pkg1\">@RegContainerValDoc</a>" + 52.52 - "(<a href=\"../pkg1/RegContainerValDoc.html#value()\">value</a>={" + 52.53 + "(<a href=\"../pkg1/RegContainerValDoc.html#value--\">value</a>={" + 52.54 "<a href=\"../pkg1/RegContaineeNotDoc.html\" " + 52.55 "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>," + 52.56 "<a href=\"../pkg1/RegContaineeNotDoc.html\" " + 52.57 "title=\"annotation in pkg1\">@RegContaineeNotDoc</a>}," + 52.58 - "<a href=\"../pkg1/RegContainerValDoc.html#y()\">y</a>=3)"}, 52.59 + "<a href=\"../pkg1/RegContainerValDoc.html#y--\">y</a>=3)"}, 52.60 {BUG_ID + FS + "pkg1" + FS + "C.html", 52.61 "<a href=\"../pkg1/ContainerValDoc.html\" " + 52.62 "title=\"annotation in pkg1\">@ContainerValDoc</a>" + 52.63 - "(<a href=\"../pkg1/ContainerValDoc.html#value()\">value</a>={" + 52.64 + "(<a href=\"../pkg1/ContainerValDoc.html#value--\">value</a>={" + 52.65 "<a href=\"../pkg1/ContaineeNotDoc.html\" " + 52.66 "title=\"annotation in pkg1\">@ContaineeNotDoc</a>," + 52.67 "<a href=\"../pkg1/ContaineeNotDoc.html\" " + 52.68 "title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," + 52.69 - "<a href=\"../pkg1/ContainerValDoc.html#x()\">x</a>=1)"} 52.70 + "<a href=\"../pkg1/ContainerValDoc.html#x--\">x</a>=1)"} 52.71 }; 52.72 52.73 private static final String[][] NEGATED_TEST = { 52.74 @@ -124,7 +124,7 @@ 52.75 {BUG_ID + FS + "pkg" + FS + "C.html", 52.76 "<a href=\"../pkg/RegContainerNotDoc.html\" " + 52.77 "title=\"annotation in pkg\">@RegContainerNotDoc</a>" + 52.78 - "(<a href=\"../pkg/RegContainerNotDoc.html#value()\">value</a>={" + 52.79 + "(<a href=\"../pkg/RegContainerNotDoc.html#value--\">value</a>={" + 52.80 "<a href=\"../pkg/RegContaineeNotDoc.html\" " + 52.81 "title=\"annotation in pkg\">@RegContaineeNotDoc</a>," + 52.82 "<a href=\"../pkg/RegContaineeNotDoc.html\" " + 52.83 @@ -138,25 +138,25 @@ 52.84 {BUG_ID + FS + "pkg1" + FS + "C.html", 52.85 "<a href=\"../pkg1/RegContainerValNotDoc.html\" " + 52.86 "title=\"annotation in pkg1\">@RegContainerValNotDoc</a>" + 52.87 - "(<a href=\"../pkg1/RegContainerValNotDoc.html#value()\">value</a>={" + 52.88 + "(<a href=\"../pkg1/RegContainerValNotDoc.html#value--\">value</a>={" + 52.89 "<a href=\"../pkg1/RegContaineeDoc.html\" " + 52.90 "title=\"annotation in pkg1\">@RegContaineeDoc</a>," + 52.91 "<a href=\"../pkg1/RegContaineeDoc.html\" " + 52.92 "title=\"annotation in pkg1\">@RegContaineeDoc</a>}," + 52.93 - "<a href=\"../pkg1/RegContainerValNotDoc.html#y()\">y</a>=4)"}, 52.94 + "<a href=\"../pkg1/RegContainerValNotDoc.html#y--\">y</a>=4)"}, 52.95 {BUG_ID + FS + "pkg1" + FS + "C.html", 52.96 "<a href=\"../pkg1/ContainerValNotDoc.html\" " + 52.97 "title=\"annotation in pkg1\">@ContainerValNotDoc</a>" + 52.98 - "(<a href=\"../pkg1/ContainerValNotDoc.html#value()\">value</a>={" + 52.99 + "(<a href=\"../pkg1/ContainerValNotDoc.html#value--\">value</a>={" + 52.100 "<a href=\"../pkg1/ContaineeNotDoc.html\" " + 52.101 "title=\"annotation in pkg1\">@ContaineeNotDoc</a>," + 52.102 "<a href=\"../pkg1/ContaineeNotDoc.html\" " + 52.103 "title=\"annotation in pkg1\">@ContaineeNotDoc</a>}," + 52.104 - "<a href=\"../pkg1/ContainerValNotDoc.html#x()\">x</a>=2)"}, 52.105 + "<a href=\"../pkg1/ContainerValNotDoc.html#x--\">x</a>=2)"}, 52.106 {BUG_ID + FS + "pkg1" + FS + "C.html", 52.107 "<a href=\"../pkg1/ContainerSynthNotDoc.html\" " + 52.108 "title=\"annotation in pkg1\">@ContainerSynthNotDoc</a>(" + 52.109 - "<a href=\"../pkg1/ContainerSynthNotDoc.html#value()\">value</a>=" + 52.110 + "<a href=\"../pkg1/ContainerSynthNotDoc.html#value--\">value</a>=" + 52.111 "<a href=\"../pkg1/ContaineeSynthDoc.html\" " + 52.112 "title=\"annotation in pkg1\">@ContaineeSynthDoc</a>)"} 52.113 };
53.1 --- a/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Thu Oct 10 13:41:08 2013 -0700 53.2 +++ b/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Thu Oct 10 20:57:27 2013 -0700 53.3 @@ -25,7 +25,7 @@ 53.4 53.5 /* 53.6 * @test 53.7 - * @bug 6802694 53.8 + * @bug 6802694 8025633 53.9 * @summary This test verifies deprecation info in serialized-form.html. 53.10 * @author Bhavesh Patel 53.11 * @library ../lib/ 53.12 @@ -44,21 +44,21 @@ 53.13 {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + 53.14 "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" + 53.15 "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"strong\">See Also:</span>" + 53.16 - "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 53.17 + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 53.18 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 53.19 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + 53.20 " <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 53.21 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 53.22 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 53.23 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + 53.24 "<div class=\"block\">This field indicates whether the C1 " + 53.25 "is undecorated.</div>" + NL + " " + NL + 53.26 "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + 53.27 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" + 53.28 - "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 53.29 + "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 53.30 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"}, 53.31 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" + 53.32 " <span class=\"italic\">As of JDK version 1.5, replaced by" + NL + 53.33 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 53.34 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 53.35 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + 53.36 "<div class=\"block\">Reads the object stream.</div>" + NL + 53.37 "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code><code>" + 53.38 @@ -75,12 +75,12 @@ 53.39 {BUG_ID + FS + "serialized-form.html", "<pre>boolean undecorated</pre>" + NL + 53.40 "<div class=\"block\"><span class=\"strong\">Deprecated.</span> <span class=\"italic\">" + 53.41 "As of JDK version 1.5, replaced by" + NL + 53.42 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\"><code>" + 53.43 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\"><code>" + 53.44 "setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}, 53.45 {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">" + 53.46 "Deprecated.</span> <span class=\"italic\">As of JDK version" + 53.47 " 1.5, replaced by" + NL + 53.48 - " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" + 53.49 + " <a href=\"pkg1/C1.html#setUndecorated-boolean-\">" + 53.50 "<code>setUndecorated(boolean)</code></a>.</span></div>" + NL + "</li>"}}; 53.51 53.52 // Test with -nodeprecated option. The serialized-form.html should
54.1 --- a/test/com/sun/javadoc/testTaglets/TestTaglets.java Thu Oct 10 13:41:08 2013 -0700 54.2 +++ b/test/com/sun/javadoc/testTaglets/TestTaglets.java Thu Oct 10 20:57:27 2013 -0700 54.3 @@ -1,5 +1,5 @@ 54.4 /* 54.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved. 54.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved. 54.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 54.8 * 54.9 * This code is free software; you can redistribute it and/or modify it 54.10 @@ -23,7 +23,7 @@ 54.11 54.12 /* 54.13 * @test 54.14 - * @bug 4654308 4767038 54.15 + * @bug 4654308 4767038 8025633 54.16 * @summary Use a Taglet and include some inline tags such as {@link}. The 54.17 * inline tags should be interpreted properly. 54.18 * Run Javadoc on some sample source that uses {@inheritDoc}. Make 54.19 @@ -56,7 +56,7 @@ 54.20 //Input for string search tests. 54.21 private static final String[][] TEST_4654308 = new String[][] { 54.22 {"4654308" + FS + "C.html", "<span class=\"strong\">Foo:</span></dt>" + 54.23 - "<dd>my only method is <a href=\"C.html#method()\"><code>here" + 54.24 + "<dd>my only method is <a href=\"C.html#method--\"><code>here" + 54.25 "</code></a></dd></dl>"} 54.26 }; 54.27 private static final String[][] NEGATED_TEST_4654308 = NO_TEST;
55.1 --- a/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java Thu Oct 10 13:41:08 2013 -0700 55.2 +++ b/test/com/sun/javadoc/testTypeAnnotations/TestTypeAnnotations.java Thu Oct 10 20:57:27 2013 -0700 55.3 @@ -23,7 +23,7 @@ 55.4 55.5 /* 55.6 * @test 55.7 - * @bug 8005091 8009686 55.8 + * @bug 8005091 8009686 8025633 55.9 * @summary Make sure that type annotations are displayed correctly 55.10 * @author Bhavesh Patel 55.11 * @library ../lib/ 55.12 @@ -272,13 +272,13 @@ 55.13 "<pre>void oneException()" + NL + 55.14 " throws <a href=\"../typeannos/ThrB.html\" title=\"" + 55.15 "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" + 55.16 - "ThrB.html#value()\">value</a>=\"m\") java.lang.Exception</pre>" 55.17 + "ThrB.html#value--\">value</a>=\"m\") java.lang.Exception</pre>" 55.18 }, 55.19 {BUG_ID + FS + "typeannos" + FS + "ThrWithValue.html", 55.20 "<pre>void twoExceptions()" + NL + 55.21 " throws <a href=\"../typeannos/ThrB.html\" title=\"" + 55.22 "annotation in typeannos\">@ThrB</a>(<a href=\"../typeannos/" + 55.23 - "ThrB.html#value()\">value</a>=\"m\") java.lang.RuntimeException," + NL + 55.24 + "ThrB.html#value--\">value</a>=\"m\") java.lang.RuntimeException," + NL + 55.25 " <a href=\"../typeannos/ThrA.html\" title=\"" + 55.26 "annotation in typeannos\">@ThrA</a> java.lang.Exception</pre>" 55.27 }, 55.28 @@ -307,14 +307,14 @@ 55.29 "<pre>void wcSuper(<a href=\"../typeannos/MyList.html\" title=\"" + 55.30 "class in typeannos\">MyList</a><? super <a href=\"../typeannos/" + 55.31 "WldB.html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"" + 55.32 - "../typeannos/WldB.html#value()\">value</a>=\"m\") java.lang." + 55.33 + "../typeannos/WldB.html#value--\">value</a>=\"m\") java.lang." + 55.34 "String> l)</pre>" 55.35 }, 55.36 {BUG_ID + FS + "typeannos" + FS + "BoundWithValue.html", 55.37 "<pre><a href=\"../typeannos/MyList.html\" title=\"class in " + 55.38 "typeannos\">MyList</a><? extends <a href=\"../typeannos/WldB." + 55.39 "html\" title=\"annotation in typeannos\">@WldB</a>(<a href=\"../" + 55.40 - "typeannos/WldB.html#value()\">value</a>=\"m\") java.lang.String" + 55.41 + "typeannos/WldB.html#value--\">value</a>=\"m\") java.lang.String" + 55.42 "> returnWcExtends()</pre>" 55.43 }, 55.44 55.45 @@ -329,7 +329,7 @@ 55.46 "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrA." + 55.47 "html\" title=\"annotation in typeannos\">@RcvrA</a> <a href=\"../" + 55.48 "typeannos/RcvrB.html\" title=\"annotation in typeannos\">@RcvrB" + 55.49 - "</a>(<a href=\"../typeannos/RcvrB.html#value()\">value</a>=\"m\")" + 55.50 + "</a>(<a href=\"../typeannos/RcvrB.html#value--\">value</a>=\"m\")" + 55.51 " DefaultUnmodified this)</pre>" 55.52 }, 55.53 {BUG_ID + FS + "typeannos" + FS + "DefaultUnmodified.html", 55.54 @@ -354,7 +354,7 @@ 55.55 {BUG_ID + FS + "typeannos" + FS + "WithValue.html", 55.56 "<pre><T extends java.lang.Runnable> void accept(" + 55.57 "<a href=\"../typeannos/RcvrB.html\" title=\"annotation in " + 55.58 - "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value()\">" + 55.59 + "typeannos\">@RcvrB</a>(<a href=\"../typeannos/RcvrB.html#value--\">" + 55.60 "value</a>=\"m\") WithValue this," + NL + 55.61 " T r)" + NL + 55.62 " throws java.lang.Exception</pre>" 55.63 @@ -362,7 +362,7 @@ 55.64 {BUG_ID + FS + "typeannos" + FS + "WithFinal.html", 55.65 "<pre>java.lang.String nonVoid(<a href=\"../typeannos/RcvrB." + 55.66 "html\" title=\"annotation in typeannos\">@RcvrB</a>(<a href=\"../" + 55.67 - "typeannos/RcvrB.html#value()\">value</a>=\"m\") WithFinal" + 55.68 + "typeannos/RcvrB.html#value--\">value</a>=\"m\") WithFinal" + 55.69 " this)</pre>" 55.70 }, 55.71 {BUG_ID + FS + "typeannos" + FS + "WithBody.html",
56.1 --- a/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Thu Oct 10 13:41:08 2013 -0700 56.2 +++ b/test/com/sun/javadoc/testTypeParams/TestTypeParameters.java Thu Oct 10 20:57:27 2013 -0700 56.3 @@ -23,7 +23,7 @@ 56.4 56.5 /* 56.6 * @test 56.7 - * @bug 4927167 4974929 7010344 56.8 + * @bug 4927167 4974929 7010344 8025633 56.9 * @summary When the type parameters are more than 10 characters in length, 56.10 * make sure there is a line break between type params and return type 56.11 * in member summary. Also, test for type parameter links in package-summary and 56.12 @@ -71,7 +71,7 @@ 56.13 }, 56.14 //Nested type parameters 56.15 {BUG_ID + FS + "pkg" + FS + "C.html", 56.16 - "<a name=\"formatDetails(java.util.Collection, java.util.Collection)\">" + NL + 56.17 + "<a name=\"formatDetails-java.util.Collection-java.util.Collection-\">" + NL + 56.18 "<!-- -->" + NL + 56.19 "</a>" 56.20 },
57.1 --- a/test/com/sun/javadoc/testWarnings/TestWarnings.java Thu Oct 10 13:41:08 2013 -0700 57.2 +++ b/test/com/sun/javadoc/testWarnings/TestWarnings.java Thu Oct 10 20:57:27 2013 -0700 57.3 @@ -23,7 +23,7 @@ 57.4 57.5 /* 57.6 * @test 57.7 - * @bug 4515705 4804296 4702454 4697036 57.8 + * @bug 4515705 4804296 4702454 4697036 8025633 57.9 * @summary Make sure that first sentence warning only appears once. 57.10 * Make sure that only warnings/errors are printed when quiet is used. 57.11 * Make sure that links to private/unincluded methods do not cause 57.12 @@ -65,8 +65,8 @@ 57.13 }; 57.14 57.15 private static final String[][] TEST2 = { 57.16 - {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#m()\"><code>m()</code></a><br/>"}, 57.17 - {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#X()\"><code>X()</code></a><br/>"}, 57.18 + {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#m--\"><code>m()</code></a><br/>"}, 57.19 + {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#X--\"><code>X()</code></a><br/>"}, 57.20 {BUG_ID + FS + "pkg" + FS + "X.html", "<a href=\"../pkg/X.html#f\"><code>f</code></a><br/>"}, 57.21 }; 57.22
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 58.2 +++ b/test/tools/javac/annotations/typeAnnotations/classfile/TestAnonInnerClasses.java Thu Oct 10 20:57:27 2013 -0700 58.3 @@ -0,0 +1,439 @@ 58.4 +/* 58.5 + * Copyright (c) 2013 Oracle and/or its affiliates. All rights reserved. 58.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 58.7 + * 58.8 + * This code is free software; you can redistribute it and/or modify it 58.9 + * under the terms of the GNU General Public License version 2 only, as 58.10 + * published by the Free Software Foundation. 58.11 + * 58.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 58.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 58.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 58.15 + * version 2 for more details (a copy is included in the LICENSE file that 58.16 + * accompanied this code). 58.17 + * 58.18 + * You should have received a copy of the GNU General Public License version 58.19 + * 2 along with this work; if not, write to the Free Software Foundation, 58.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 58.21 + * 58.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 58.23 + * or visit www.oracle.com if you need additional information or have any 58.24 + * questions. 58.25 + */ 58.26 + 58.27 +/* 58.28 + * @test 58.29 + * @bug 8005085 8008762 8008751 8013065 8015323 8015257 58.30 + * @summary Type annotations on anonymous and inner class. 58.31 + * Six TYPE_USE annotations are repeated(or not); Four combinations create 58.32 + * four test files, and each results in the test class and 2 anonymous classes. 58.33 + * Each element of these three classes is checked for expected number of the 58.34 + * four annotation Attributes. Expected annotation counts depend on type of 58.35 + * annotation place on type of element (a FIELD&TYPE_USE element on a field 58.36 + * results in 2). Elements with no annotations expect 0. 58.37 + * Source template is read in from testanoninner.template 58.38 + * 58.39 + */ 58.40 +import java.lang.annotation.*; 58.41 +import java.io.*; 58.42 +import java.util.List; 58.43 +import java.util.LinkedList; 58.44 +import com.sun.tools.classfile.*; 58.45 +import java.nio.file.Files; 58.46 +import java.nio.charset.*; 58.47 +import java.io.File; 58.48 +import java.io.IOException; 58.49 + 58.50 + 58.51 +import java.lang.annotation.*; 58.52 +import static java.lang.annotation.RetentionPolicy.*; 58.53 +import static java.lang.annotation.ElementType.*; 58.54 + 58.55 +/* 58.56 + * A source template is read in and testname and annotations are inserted 58.57 + * via replace(). 58.58 + */ 58.59 +public class TestAnonInnerClasses extends ClassfileTestHelper { 58.60 + // tally errors and test cases 58.61 + int errors = 0; 58.62 + int checks = 0; 58.63 + //Note expected test count in case of skips due to bugs. 58.64 + int tc = 0, xtc = 180; // 45 x 4 variations of repeated annotations. 58.65 + File testSrc = new File(System.getProperty("test.src")); 58.66 + 58.67 + String[] AnnoAttributes = { 58.68 + Attribute.RuntimeVisibleTypeAnnotations, 58.69 + Attribute.RuntimeInvisibleTypeAnnotations, 58.70 + Attribute.RuntimeVisibleAnnotations, 58.71 + Attribute.RuntimeInvisibleAnnotations 58.72 + }; 58.73 + 58.74 + // template for source files 58.75 + String srcTemplate = "testanoninner.template"; 58.76 + 58.77 + // Four test files generated based on combinations of repeating annotations. 58.78 + Boolean As= false, Bs=true, Cs=false, Ds=false, TAs=false,TBs=false; 58.79 + Boolean[][] bRepeat = new Boolean[][]{ 58.80 + /* no repeats */ {false, false, false, false, false, false}, 58.81 + /* repeat A,C,TA */ {true, false, true, false, true, false}, 58.82 + /* repeat B,D,TB */ {false, true, false, true, false, true}, 58.83 + /* repeat all */ {true, true, true, true, true, true} 58.84 + }; 58.85 + // Save descriptions of failed test case; does not terminate upon a failure. 58.86 + List<String> failed = new LinkedList<>(); 58.87 + 58.88 + public static void main(String[] args) throws Exception { 58.89 + new TestAnonInnerClasses().run(); 58.90 + } 58.91 + 58.92 + // Check annotation counts and make reports sufficiently descriptive to 58.93 + // easily diagnose. 58.94 + void check(String testcase, int vtaX, int itaX, int vaX, int iaX, 58.95 + int vtaA, int itaA, int vaA, int iaA) { 58.96 + 58.97 + String descr = " checking " + testcase+" _TYPE_, expected: " + 58.98 + vtaX + ", " + itaX + ", " + vaX + ", " + iaX + "; actual: " + 58.99 + vtaA + ", " + itaA + ", " + vaA + ", " + iaA; 58.100 + String description; 58.101 + description=descr.replace("_TYPE_","RuntimeVisibleTypeAnnotations"); 58.102 + if (vtaX != vtaA) { 58.103 + errors++; 58.104 + failed.add(++checks + " " + testcase + ": (vtaX) " + vtaX + 58.105 + " != " + vtaA + " (vtaA)"); 58.106 + println(checks + " FAIL: " + description); 58.107 + } else { 58.108 + println(++checks + " PASS: " + description); 58.109 + } 58.110 + description=descr.replace("_TYPE_","RuntimeInvisibleTypeAnnotations"); 58.111 + if (itaX != itaA) { 58.112 + errors++; 58.113 + failed.add(++checks + " " + testcase + ": (itaX) " + itaX + " != " + 58.114 + itaA + " (itaA)"); 58.115 + println(checks + " FAIL: " + description); 58.116 + } else { 58.117 + println(++checks + " PASS: " + description); 58.118 + } 58.119 + description=descr.replace("_TYPE_","RuntimeVisibleAnnotations"); 58.120 + if (vaX != vaA) { 58.121 + errors++; 58.122 + failed.add(++checks + " " + testcase + ": (vaX) " + vaX + " != " + 58.123 + vaA + " (vaA)"); 58.124 + println(checks + " FAIL: " + description); 58.125 + } else { 58.126 + println(++checks + " PASS: " + description); 58.127 + } 58.128 + description=descr.replace("_TYPE_","RuntimeInvisibleAnnotations"); 58.129 + if (iaX != iaA) { 58.130 + errors++; 58.131 + failed.add(++checks + " " + testcase + ": (iaX) " + iaX + " != " + 58.132 + iaA + " (iaA)"); 58.133 + println(checks + " FAIL: " + description); 58.134 + } else { 58.135 + println(++checks + " PASS: " + description); 58.136 + } 58.137 + println(""); 58.138 + } 58.139 + 58.140 + // Print failed cases (if any) and throw exception for fail. 58.141 + void report() { 58.142 + if (errors!=0) { 58.143 + System.err.println("Failed tests: " + errors + 58.144 + "\nfailed test cases:\n"); 58.145 + for (String t: failed) System.err.println(" " + t); 58.146 + throw new RuntimeException("FAIL: There were test failures."); 58.147 + } else 58.148 + System.out.println("PASSED all tests."); 58.149 + } 58.150 + 58.151 + void test(String ttype, ClassFile cf, Method m, Field f, boolean visible) { 58.152 + int vtaActual = 0, 58.153 + itaActual = 0, 58.154 + vaActual = 0, 58.155 + iaActual = 0, 58.156 + vtaExp = 0, 58.157 + itaExp = 0, 58.158 + vaExp = 0, 58.159 + iaExp = 0, 58.160 + index = 0, 58.161 + index2 = 0; 58.162 + String memberName = null, 58.163 + testcase = "undefined", 58.164 + testClassName = null; 58.165 + Attribute attr = null, 58.166 + cattr = null; 58.167 + Code_attribute CAttr = null; 58.168 + // Get counts of 4 annotation Attributes on element being checked. 58.169 + for (String AnnoType : AnnoAttributes) { 58.170 + try { 58.171 + switch (ttype) { 58.172 + case "METHOD": 58.173 + index = m.attributes.getIndex(cf.constant_pool, 58.174 + AnnoType); 58.175 + memberName = m.getName(cf.constant_pool); 58.176 + if (index != -1) 58.177 + attr = m.attributes.get(index); 58.178 + //fetch index annotations from code attribute. 58.179 + index2 = m.attributes.getIndex(cf.constant_pool, 58.180 + Attribute.Code); 58.181 + if (index2 != -1) { 58.182 + cattr = m.attributes.get(index2); 58.183 + assert cattr instanceof Code_attribute; 58.184 + CAttr = (Code_attribute)cattr; 58.185 + index2 = CAttr.attributes.getIndex(cf.constant_pool, 58.186 + AnnoType); 58.187 + if (index2 != -1) 58.188 + cattr = CAttr.attributes.get(index2); 58.189 + } 58.190 + break; 58.191 + case "FIELD": 58.192 + index = f.attributes.getIndex(cf.constant_pool, 58.193 + AnnoType); 58.194 + memberName = f.getName(cf.constant_pool); 58.195 + if (index != -1) 58.196 + attr = f.attributes.get(index); 58.197 + //fetch index annotations from code attribute. 58.198 + index2 = cf.attributes.getIndex(cf.constant_pool, 58.199 + Attribute.Code); 58.200 + if (index2!= -1) { 58.201 + cattr = cf.attributes.get(index2); 58.202 + assert cattr instanceof Code_attribute; 58.203 + CAttr = (Code_attribute)cattr; 58.204 + index2 = CAttr.attributes.getIndex(cf.constant_pool, 58.205 + AnnoType); 58.206 + if (index2!= -1) 58.207 + cattr = CAttr.attributes.get(index2); 58.208 + } 58.209 + break; 58.210 + 58.211 + default: 58.212 + memberName = cf.getName(); 58.213 + index = cf.attributes.getIndex(cf.constant_pool, 58.214 + AnnoType); 58.215 + if (index!= -1) attr = cf.attributes.get(index); 58.216 + break; 58.217 + } 58.218 + } 58.219 + catch (ConstantPoolException cpe) { cpe.printStackTrace(); } 58.220 + try { 58.221 + testClassName=cf.getName(); 58.222 + testcase = ttype + ": " + testClassName + ": " + 58.223 + memberName + ", "; 58.224 + } 58.225 + catch (ConstantPoolException cpe) { cpe.printStackTrace(); } 58.226 + if (index != -1) { 58.227 + switch (AnnoType) { 58.228 + case Attribute.RuntimeVisibleTypeAnnotations: 58.229 + //count RuntimeVisibleTypeAnnotations 58.230 + RuntimeVisibleTypeAnnotations_attribute RVTAa = 58.231 + (RuntimeVisibleTypeAnnotations_attribute)attr; 58.232 + vtaActual += RVTAa.annotations.length; 58.233 + break; 58.234 + case Attribute.RuntimeVisibleAnnotations: 58.235 + //count RuntimeVisibleAnnotations 58.236 + RuntimeVisibleAnnotations_attribute RVAa = 58.237 + (RuntimeVisibleAnnotations_attribute)attr; 58.238 + vaActual += RVAa.annotations.length; 58.239 + break; 58.240 + case Attribute.RuntimeInvisibleTypeAnnotations: 58.241 + //count RuntimeInvisibleTypeAnnotations 58.242 + RuntimeInvisibleTypeAnnotations_attribute RITAa = 58.243 + (RuntimeInvisibleTypeAnnotations_attribute)attr; 58.244 + itaActual += RITAa.annotations.length; 58.245 + break; 58.246 + case Attribute.RuntimeInvisibleAnnotations: 58.247 + //count RuntimeInvisibleAnnotations 58.248 + RuntimeInvisibleAnnotations_attribute RIAa = 58.249 + (RuntimeInvisibleAnnotations_attribute)attr; 58.250 + iaActual += RIAa.annotations.length; 58.251 + break; 58.252 + } 58.253 + } 58.254 + // annotations from code attribute. 58.255 + if (index2 != -1) { 58.256 + switch (AnnoType) { 58.257 + case Attribute.RuntimeVisibleTypeAnnotations: 58.258 + //count RuntimeVisibleTypeAnnotations 58.259 + RuntimeVisibleTypeAnnotations_attribute RVTAa = 58.260 + (RuntimeVisibleTypeAnnotations_attribute)cattr; 58.261 + vtaActual += RVTAa.annotations.length; 58.262 + break; 58.263 + case Attribute.RuntimeVisibleAnnotations: 58.264 + //count RuntimeVisibleAnnotations 58.265 + RuntimeVisibleAnnotations_attribute RVAa = 58.266 + (RuntimeVisibleAnnotations_attribute)cattr; 58.267 + vaActual += RVAa.annotations.length; 58.268 + break; 58.269 + case Attribute.RuntimeInvisibleTypeAnnotations: 58.270 + //count RuntimeInvisibleTypeAnnotations 58.271 + RuntimeInvisibleTypeAnnotations_attribute RITAa = 58.272 + (RuntimeInvisibleTypeAnnotations_attribute)cattr; 58.273 + itaActual += RITAa.annotations.length; 58.274 + break; 58.275 + case Attribute.RuntimeInvisibleAnnotations: 58.276 + //count RuntimeInvisibleAnnotations 58.277 + RuntimeInvisibleAnnotations_attribute RIAa = 58.278 + (RuntimeInvisibleAnnotations_attribute)cattr; 58.279 + iaActual += RIAa.annotations.length; 58.280 + break; 58.281 + } 58.282 + } 58.283 + } 58.284 + 58.285 + switch (memberName) { 58.286 + //METHODs 58.287 + case "test" : vtaExp=4; itaExp=4; vaExp=0; iaExp=0; tc++; break; 58.288 + case "mtest": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.289 + case "m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.290 + case "m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.291 + case "m3": vtaExp=10; itaExp=10; vaExp=1; iaExp=1; tc++; break; 58.292 + case "tm": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.293 + //inner class 58.294 + case "i_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.295 + case "i_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.296 + case "i_um": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.297 + //local class 58.298 + case "l_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.299 + case "l_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.300 + case "l_um": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.301 + //anon class 58.302 + case "mm_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.303 + case "mm_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.304 + case "mm_m3": vtaExp=10; itaExp=10;vaExp=1; iaExp=1; tc++; break; 58.305 + case "mm_tm": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.306 + //InnerAnon class 58.307 + case "ia_m1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.308 + case "ia_m2": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.309 + case "ia_um": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.310 + //FIELDs 58.311 + case "data": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.312 + case "odata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.313 + case "pdata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.314 + case "tdata": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.315 + case "sa1": vtaExp = 6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.316 + //inner class 58.317 + case "i_odata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.318 + case "i_pdata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.319 + case "i_udata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.320 + case "i_sa1": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.321 + case "i_tdata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.322 + //local class 58.323 + case "l_odata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.324 + case "l_pdata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.325 + case "l_udata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.326 + case "l_sa1": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.327 + case "l_tdata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.328 + //anon class 58.329 + case "mm_odata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.330 + case "mm_pdata1": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.331 + case "mm_sa1": vtaExp = 6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.332 + case "mm_tdata": vtaExp = 2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.333 + // InnerAnon class 58.334 + case "ia_odata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.335 + case "ia_pdata1": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.336 + case "ia_udata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.337 + case "ia_sa1": vtaExp=6; itaExp=6; vaExp=1; iaExp=1; tc++; break; 58.338 + case "ia_tdata": vtaExp=2; itaExp=2; vaExp=1; iaExp=1; tc++; break; 58.339 + case "IA": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.340 + case "IN": vtaExp=4; itaExp=4; vaExp=1; iaExp=1; tc++; break; 58.341 + // default cases are <init>, this$0, this$1, mmtest, atest 58.342 + default: vtaExp = 0; itaExp=0; vaExp=0; iaExp=0; break; 58.343 + } 58.344 + check(testcase,vtaExp, itaExp, vaExp, iaExp, 58.345 + vtaActual,itaActual,vaActual,iaActual); 58.346 + } 58.347 + 58.348 + public void run() { 58.349 + ClassFile cf = null; 58.350 + InputStream in = null; 58.351 + int testcount = 1; 58.352 + File testFile = null; 58.353 + // Generate source, check methods and fields for each combination. 58.354 + for (Boolean[] bCombo : bRepeat) { 58.355 + As=bCombo[0]; Bs=bCombo[1]; Cs=bCombo[2]; 58.356 + Ds=bCombo[3]; TAs=bCombo[4]; TBs=bCombo[5]; 58.357 + String testname = "Test" + testcount++; 58.358 + println("Combinations: " + As + ", " + Bs + ", " + Cs + ", " + Ds + 58.359 + ", " + TAs + ", " + TBs + 58.360 + "; see " + testname + ".java"); 58.361 + String[] classes = {testname + ".class", 58.362 + testname + "$Inner.class", 58.363 + testname + "$1Local1.class", 58.364 + testname + "$1.class", 58.365 + testname + "$1$1.class", 58.366 + testname + "$1$InnerAnon.class" 58.367 + }; 58.368 + // Create test source, create and compile File. 58.369 + String sourceString = getSource(srcTemplate, testname, 58.370 + As, Bs, Cs, Ds, TAs, TBs); 58.371 + System.out.println(sourceString); 58.372 + try { 58.373 + testFile = writeTestFile(testname+".java", sourceString); 58.374 + } 58.375 + catch (IOException ioe) { ioe.printStackTrace(); } 58.376 + // Compile test source and read classfile. 58.377 + File classFile = null; 58.378 + try { 58.379 + classFile = compile(testFile); 58.380 + } 58.381 + catch (Error err) { 58.382 + System.err.println("FAILED compile. Source:\n" + sourceString); 58.383 + throw err; 58.384 + } 58.385 + String testloc = classFile.getAbsolutePath().substring( 58.386 + 0,classFile.getAbsolutePath().indexOf(classFile.getPath())); 58.387 + for (String clazz : classes) { 58.388 + try { 58.389 + cf = ClassFile.read(new File(testloc+clazz)); 58.390 + } 58.391 + catch (Exception e) { e.printStackTrace(); } 58.392 + // Test for all methods and fields 58.393 + for (Method m: cf.methods) { 58.394 + test("METHOD", cf, m, null, true); 58.395 + } 58.396 + for (Field f: cf.fields) { 58.397 + test("FIELD", cf, null, f, true); 58.398 + } 58.399 + } 58.400 + } 58.401 + report(); 58.402 + if (tc!=xtc) System.out.println("Test Count: " + tc + " != " + 58.403 + "expected: " + xtc); 58.404 + } 58.405 + 58.406 + 58.407 + String getSrcTemplate(String sTemplate) { 58.408 + List<String> tmpl = null; 58.409 + String sTmpl = ""; 58.410 + try { 58.411 + tmpl = Files.readAllLines(new File(testSrc,sTemplate).toPath(), 58.412 + Charset.defaultCharset()); 58.413 + } 58.414 + catch (IOException ioe) { 58.415 + String error = "FAILED: Test failed to read template" + sTemplate; 58.416 + ioe.printStackTrace(); 58.417 + throw new RuntimeException(error); 58.418 + } 58.419 + for (String l : tmpl) 58.420 + sTmpl=sTmpl.concat(l).concat("\n"); 58.421 + return sTmpl; 58.422 + } 58.423 + 58.424 + // test class template 58.425 + String getSource(String templateName, String testname, 58.426 + Boolean Arepeats, Boolean Brepeats, 58.427 + Boolean Crepeats, Boolean Drepeats, 58.428 + Boolean TArepeats, Boolean TBrepeats) { 58.429 + String As = Arepeats ? "@A @A":"@A", 58.430 + Bs = Brepeats ? "@B @B":"@B", 58.431 + Cs = Crepeats ? "@C @C":"@C", 58.432 + Ds = Drepeats ? "@D @D":"@D", 58.433 + TAs = TArepeats ? "@TA @TA":"@TA", 58.434 + TBs = TBrepeats ? "@TB @TB":"@TB"; 58.435 + 58.436 + // split up replace() lines for readability 58.437 + String testsource = getSrcTemplate(templateName).replace("testname",testname); 58.438 + testsource = testsource.replace("_As",As).replace("_Bs",Bs).replace("_Cs",Cs); 58.439 + testsource = testsource.replace("_Ds",Ds).replace("_TAs",TAs).replace("_TBs",TBs); 58.440 + return testsource; 58.441 + } 58.442 +}
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 59.2 +++ b/test/tools/javac/annotations/typeAnnotations/classfile/testanoninner.template Thu Oct 10 20:57:27 2013 -0700 59.3 @@ -0,0 +1,108 @@ 59.4 +import java.lang.annotation.*; 59.5 +import static java.lang.annotation.RetentionPolicy.*; 59.6 +import static java.lang.annotation.ElementType.*; 59.7 +import java.util.List; 59.8 + 59.9 +class testname <T> { // TestN.class 59.10 + _As _Bs _Cs _Ds String data = "test"; 59.11 + _As _Bs _Cs _Ds Object mtest( _As _Bs _Cs _Ds testname <T> t){ return null; } 59.12 + Object mmtest( testname<T> t){ return null; } 59.13 + 59.14 + class Inner<U> { // TestN$1$Inner.class 59.15 + _As _Bs _Cs _Ds String i_odata1 = "test"; 59.16 + _As _Bs _Cs _Ds int i_pdata1 = 0; 59.17 + _As _Bs _Cs _Ds U i_udata = null; 59.18 +//8015257 59.19 + _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds [] i_sa1 = null; 59.20 + _As _Bs _Cs _Ds T i_tdata = null; 59.21 + _As _Bs _Cs _Ds String i_m1(){ return null; }; 59.22 + _As _Bs _Cs _Ds int i_m2( _As _Bs _Cs _Ds Object o){return 0;} 59.23 + _As _Bs _Cs _Ds 59.24 + <_TAs _TBs _Cs _Ds U> Object i_um( _As _Bs _Cs _Ds U u) { return null; } 59.25 + } 59.26 +//8015323 59.27 + _As _Bs _Cs _Ds Inner< _As _Bs _Cs _Ds String> IN = new Inner< String>(); 59.28 + 59.29 + public void test() { 59.30 + 59.31 + class Local1<U> { // TestN$Local1.class 59.32 + _As _Bs _Cs _Ds String l_odata1 = "test"; 59.33 + _As _Bs _Cs _Ds int l_pdata1 = 0; 59.34 + _As _Bs _Cs _Ds U l_udata = null; 59.35 +//8015257 59.36 + _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] l_sa1 = null; 59.37 + _TAs _TBs _Cs _Ds T l_tdata = null; 59.38 + _As _Bs _Cs _Ds String l_m1(){ return null; }; 59.39 + _As _Bs _Cs _Ds int l_m2(_As _Bs _Cs _Ds Object o){return 0;} 59.40 + _As _Bs _Cs _Ds 59.41 + <_TAs _TBs _Cs _Ds U> Object l_um(_As _Bs _Cs _Ds U u) { return null; } 59.42 + } 59.43 + // The below, as a local variable, will show up on test() 59.44 + _As _Bs _Cs _Ds Local1<_As _Bs _Cs _Ds String> LC = new Local1<String>(); 59.45 + 59.46 + mtest( new testname<T>() { // TestN$1 59.47 + class InnerAnon<U> { // TestN$1$InnerAnon.class 59.48 + _As _Bs _Cs _Ds String ia_odata1 = "test"; 59.49 + _As _Bs _Cs _Ds int ia_pdata1 = 0; 59.50 + _As _Bs _Cs _Ds U ia_udata = null; 59.51 +//8015257 59.52 + _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] ia_sa1 = null; 59.53 + _TAs _TBs _Cs _Ds T ia_tdata = null; 59.54 + _As _Bs _Cs _Ds String ia_m1(){ return null; }; 59.55 + _As _Bs _Cs _Ds int ia_m2(_As _Bs _Cs _Ds Object o){return 0;} 59.56 + _As _Bs _Cs _Ds 59.57 + <_TAs _TBs _Cs _Ds U> Object ia_um(_As _Bs _Cs _Ds U u) { return null; } 59.58 + } 59.59 +//8015257 59.60 + _As _Bs _Cs _Ds InnerAnon<_As _Bs _Cs _Ds String> IA = new InnerAnon< String>(); 59.61 + 59.62 + _As _Bs _Cs _Ds String odata1 = "test"; 59.63 + _As _Bs _Cs _Ds int pdata1 = 0; 59.64 +//8015257 59.65 + _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa1 = null; 59.66 + _As _Bs _Cs _Ds T tdata = null; 59.67 + 59.68 + _As _Bs _Cs _Ds String m1(){ return null; }; 59.69 + _As _Bs _Cs _Ds int m2(_As _Bs _Cs _Ds Object o){return 0;} 59.70 + 59.71 + _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds [] 59.72 + m3(String _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa){ return null; } 59.73 + 59.74 + _As _Bs _Cs _Ds 59.75 + <_TAs _TBs _Cs _Ds T> Object tm(_As _Bs _Cs _Ds T t) { return null; } 59.76 + 59.77 + public void atest( testname<T> t){ 59.78 + t.mmtest( new testname<T>() { // TestN$1$1.class 59.79 + _As _Bs _Cs _Ds String mm_odata1 = "test"; 59.80 + _As _Bs _Cs _Ds int mm_pdata1 = 0; 59.81 +//8015257 59.82 + _As _Bs _Cs _Ds Object _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] mm_sa1 = null; 59.83 + _TAs _TBs _Cs _Ds T mm_tdata = null; 59.84 + 59.85 + _As _Bs _Cs _Ds String mm_m1(){ return null; }; 59.86 + _As _Bs _Cs _Ds int mm_m2(_As _Bs _Cs _Ds Object o){return 0;} 59.87 + 59.88 + _As _Bs _Cs _Ds String _As _Bs _Cs _Ds [] _As _Bs _Cs _Ds [] 59.89 + mm_m3(String _As _Bs _Cs _Ds []_As _Bs _Cs _Ds [] sa){ return null; } 59.90 + 59.91 + _As _Bs _Cs _Ds 59.92 + <_TAs _TBs _Cs _Ds T> Object mm_tm(_As _Bs _Cs _Ds T t) { return null; } 59.93 + }); 59.94 + } 59.95 + }); 59.96 + } 59.97 +} 59.98 +@Retention(RUNTIME) @Target({TYPE_USE,FIELD}) @Repeatable( AC.class ) @interface A { } 59.99 +@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @Repeatable( BC.class ) @interface B { } 59.100 +@Retention(RUNTIME) @Target({TYPE_USE,FIELD}) @interface AC { A[] value(); } 59.101 +@Retention(RUNTIME) @Target({TYPE_USE,METHOD}) @interface BC { B[] value(); } 59.102 + 59.103 +@Retention(CLASS) @Target({TYPE_USE,FIELD}) @Repeatable( CC.class ) @interface C { } 59.104 +@Retention(CLASS) @Target({TYPE_USE,METHOD}) @Repeatable( DC.class ) @interface D { } 59.105 +@Retention(CLASS) @Target({TYPE_USE,FIELD}) @interface CC { C[] value(); } 59.106 +@Retention(CLASS) @Target({TYPE_USE,METHOD}) @interface DC { D[] value(); } 59.107 + 59.108 +@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,FIELD}) @Repeatable( TAC.class ) @interface TA { } 59.109 +@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,METHOD}) @Repeatable( TBC.class ) @interface TB { } 59.110 +@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,FIELD}) @interface TAC { TA[] value(); } 59.111 +@Retention(RUNTIME) @Target({TYPE_USE,TYPE_PARAMETER,METHOD}) @interface TBC { TB[] value(); }
60.1 --- a/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.java Thu Oct 10 13:41:08 2013 -0700 60.2 +++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.java Thu Oct 10 20:57:27 2013 -0700 60.3 @@ -1,7 +1,7 @@ 60.4 /* 60.5 * @test /nodynamiccopyright/ 60.6 * @bug 8006733 8006775 60.7 - * @ignore 8013409: test failures for type annotations 60.8 + 60.9 * @summary A static outer class cannot be annotated. 60.10 * @author Werner Dietl 60.11 * @compile/fail/ref=CantAnnotateStaticClass.out -XDrawDiagnostics CantAnnotateStaticClass.java
61.1 --- a/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out Thu Oct 10 13:41:08 2013 -0700 61.2 +++ b/test/tools/javac/annotations/typeAnnotations/failures/CantAnnotateStaticClass.out Thu Oct 10 20:57:27 2013 -0700 61.3 @@ -1,1 +1,10 @@ 61.4 -dummy 61.5 \ No newline at end of file 61.6 +CantAnnotateStaticClass.java:22:20: compiler.err.cant.annotate.static.class 61.7 +CantAnnotateStaticClass.java:23:13: compiler.err.cant.annotate.static.class 61.8 +CantAnnotateStaticClass.java:24:29: compiler.err.cant.annotate.static.class 61.9 +CantAnnotateStaticClass.java:26:29: compiler.err.cant.annotate.static.class 61.10 +CantAnnotateStaticClass.java:29:26: compiler.err.cant.annotate.static.class 61.11 +CantAnnotateStaticClass.java:30:9: compiler.err.cant.annotate.static.class 61.12 +CantAnnotateStaticClass.java:31:35: compiler.err.cant.annotate.static.class 61.13 +- compiler.note.unchecked.filename: CantAnnotateStaticClass.java 61.14 +- compiler.note.unchecked.recompile 61.15 +7 errors
62.1 --- a/test/tools/javac/annotations/typeAnnotations/newlocations/MultiCatch.java Thu Oct 10 13:41:08 2013 -0700 62.2 +++ b/test/tools/javac/annotations/typeAnnotations/newlocations/MultiCatch.java Thu Oct 10 20:57:27 2013 -0700 62.3 @@ -25,6 +25,7 @@ 62.4 62.5 /* 62.6 * @test 62.7 + * @ignore 8008762 Type annotations failures 62.8 * @bug 8006775 62.9 * @summary new type annotation location: multicatch 62.10 * @author Werner Dietl
63.1 --- a/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java Thu Oct 10 13:41:08 2013 -0700 63.2 +++ b/test/tools/javac/annotations/typeAnnotations/referenceinfos/MultiCatch.java Thu Oct 10 20:57:27 2013 -0700 63.3 @@ -25,6 +25,7 @@ 63.4 63.5 /* 63.6 * @test 63.7 + * @ignore 8008762 Type annotation failures 63.8 * @bug 8006732 8006775 63.9 * @summary Test population of reference info for multicatch exception parameters 63.10 * @author Werner Dietl
64.1 --- a/test/tools/javac/diags/examples/DuplicateAnnotation.java Thu Oct 10 13:41:08 2013 -0700 64.2 +++ /dev/null Thu Jan 01 00:00:00 1970 +0000 64.3 @@ -1,32 +0,0 @@ 64.4 -/* 64.5 - * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 64.6 - * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 64.7 - * 64.8 - * This code is free software; you can redistribute it and/or modify it 64.9 - * under the terms of the GNU General Public License version 2 only, as 64.10 - * published by the Free Software Foundation. 64.11 - * 64.12 - * This code is distributed in the hope that it will be useful, but WITHOUT 64.13 - * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 64.14 - * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 64.15 - * version 2 for more details (a copy is included in the LICENSE file that 64.16 - * accompanied this code). 64.17 - * 64.18 - * You should have received a copy of the GNU General Public License version 64.19 - * 2 along with this work; if not, write to the Free Software Foundation, 64.20 - * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 64.21 - * 64.22 - * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 64.23 - * or visit www.oracle.com if you need additional information or have any 64.24 - * questions. 64.25 - */ 64.26 - 64.27 -// key: compiler.err.duplicate.annotation 64.28 -// key: compiler.warn.source.no.bootclasspath 64.29 -// options: -source 7 64.30 - 64.31 -@interface Anno { } 64.32 - 64.33 -@Anno 64.34 -@Anno 64.35 -class DuplicateAnnotation { }
65.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 65.2 +++ b/test/tools/javac/diags/examples/InterfaceOrArrayExpected.java Thu Oct 10 20:57:27 2013 -0700 65.3 @@ -0,0 +1,28 @@ 65.4 +/* 65.5 + * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved. 65.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 65.7 + * 65.8 + * This code is free software; you can redistribute it and/or modify it 65.9 + * under the terms of the GNU General Public License version 2 only, as 65.10 + * published by the Free Software Foundation. 65.11 + * 65.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 65.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 65.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 65.15 + * version 2 for more details (a copy is included in the LICENSE file that 65.16 + * accompanied this code). 65.17 + * 65.18 + * You should have received a copy of the GNU General Public License version 65.19 + * 2 along with this work; if not, write to the Free Software Foundation, 65.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 65.21 + * 65.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 65.23 + * or visit www.oracle.com if you need additional information or have any 65.24 + * questions. 65.25 + */ 65.26 + 65.27 +// key: compiler.err.intf.or.array.expected.here 65.28 + 65.29 +import java.util.List; 65.30 + 65.31 +class InterfaceExpected<T extends List & String> { }
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 66.2 +++ b/test/tools/javac/diags/examples/RepeatableAnnotationsNotSupported.java Thu Oct 10 20:57:27 2013 -0700 66.3 @@ -0,0 +1,32 @@ 66.4 +/* 66.5 + * Copyright (c) 2010, 2012, Oracle and/or its affiliates. All rights reserved. 66.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 66.7 + * 66.8 + * This code is free software; you can redistribute it and/or modify it 66.9 + * under the terms of the GNU General Public License version 2 only, as 66.10 + * published by the Free Software Foundation. 66.11 + * 66.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 66.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 66.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 66.15 + * version 2 for more details (a copy is included in the LICENSE file that 66.16 + * accompanied this code). 66.17 + * 66.18 + * You should have received a copy of the GNU General Public License version 66.19 + * 2 along with this work; if not, write to the Free Software Foundation, 66.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 66.21 + * 66.22 + * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA 66.23 + * or visit www.oracle.com if you need additional information or have any 66.24 + * questions. 66.25 + */ 66.26 + 66.27 +// key: compiler.err.repeatable.annotations.not.supported.in.source 66.28 +// key: compiler.warn.source.no.bootclasspath 66.29 +// options: -source 7 66.30 + 66.31 +@interface Anno { } 66.32 + 66.33 +@Anno 66.34 +@Anno 66.35 +class RepeatableAnnotationsNotSupported { }