Mon, 09 Mar 2009 23:53:41 -0700
Merge
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Mon Mar 09 13:34:19 2009 -0700 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractIndexWriter.java Mon Mar 09 23:53:41 2009 -0700 1.3 @@ -25,11 +25,11 @@ 1.4 1.5 package com.sun.tools.doclets.formats.html; 1.6 1.7 -import com.sun.tools.doclets.internal.toolkit.util.*; 1.8 +import java.io.*; 1.9 +import java.util.*; 1.10 1.11 import com.sun.javadoc.*; 1.12 -import java.io.*; 1.13 -import java.util.*; 1.14 +import com.sun.tools.doclets.internal.toolkit.util.*; 1.15 1.16 /** 1.17 * Generate Index for all the Member Names with Indexing in 1.18 @@ -100,18 +100,22 @@ 1.19 h2(); 1.20 strong(unicode.toString()); 1.21 h2End(); 1.22 - dl(); 1.23 - for (int i = 0; i < memberlist.size(); i++) { 1.24 - Doc element = memberlist.get(i); 1.25 - if (element instanceof MemberDoc) { 1.26 - printDescription((MemberDoc)element); 1.27 - } else if (element instanceof ClassDoc) { 1.28 - printDescription((ClassDoc)element); 1.29 - } else if (element instanceof PackageDoc) { 1.30 - printDescription((PackageDoc)element); 1.31 + int memberListSize = memberlist.size(); 1.32 + // Display the list only if there are elements to be displayed. 1.33 + if (memberListSize > 0) { 1.34 + dl(); 1.35 + for (int i = 0; i < memberListSize; i++) { 1.36 + Doc element = memberlist.get(i); 1.37 + if (element instanceof MemberDoc) { 1.38 + printDescription((MemberDoc)element); 1.39 + } else if (element instanceof ClassDoc) { 1.40 + printDescription((ClassDoc)element); 1.41 + } else if (element instanceof PackageDoc) { 1.42 + printDescription((PackageDoc)element); 1.43 + } 1.44 } 1.45 + dlEnd(); 1.46 } 1.47 - dlEnd(); 1.48 hr(); 1.49 } 1.50 1.51 @@ -126,8 +130,10 @@ 1.52 printPackageLink(pkg, Util.getPackageName(pkg), true); 1.53 print(" - "); 1.54 print(configuration.getText("doclet.package") + " " + pkg.name()); 1.55 + dtEnd(); 1.56 dd(); 1.57 printSummaryComment(pkg); 1.58 + ddEnd(); 1.59 } 1.60 1.61 /** 1.62 @@ -140,8 +146,10 @@ 1.63 printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_INDEX, cd, true)); 1.64 print(" - "); 1.65 printClassInfo(cd); 1.66 + dtEnd(); 1.67 dd(); 1.68 printComment(cd); 1.69 + ddEnd(); 1.70 } 1.71 1.72 /** 1.73 @@ -178,8 +186,10 @@ 1.74 println(" - "); 1.75 printMemberDesc(member); 1.76 println(); 1.77 + dtEnd(); 1.78 dd(); 1.79 printComment(member); 1.80 + ddEnd(); 1.81 println(); 1.82 } 1.83
2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Mon Mar 09 13:34:19 2009 -0700 2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java Mon Mar 09 23:53:41 2009 -0700 2.3 @@ -25,19 +25,20 @@ 2.4 2.5 package com.sun.tools.doclets.formats.html; 2.6 2.7 +import java.lang.reflect.Modifier; 2.8 +import java.util.*; 2.9 + 2.10 +import com.sun.javadoc.*; 2.11 import com.sun.tools.doclets.internal.toolkit.util.*; 2.12 import com.sun.tools.doclets.internal.toolkit.taglets.*; 2.13 2.14 -import com.sun.javadoc.*; 2.15 -import java.util.*; 2.16 -import java.lang.reflect.Modifier; 2.17 - 2.18 /** 2.19 * The base class for member writers. 2.20 * 2.21 * @author Robert Field 2.22 * @author Atul M Dambalkar 2.23 * @author Jamie Ho (Re-write) 2.24 + * @author Bhavesh Patel (Modified) 2.25 */ 2.26 public abstract class AbstractMemberWriter { 2.27 2.28 @@ -232,10 +233,26 @@ 2.29 } 2.30 } 2.31 2.32 + /** 2.33 + * Print the deprecated output for the given member. 2.34 + * 2.35 + * @param member the member being documented. 2.36 + */ 2.37 + protected void printDeprecated(ProgramElementDoc member) { 2.38 + String output = (new DeprecatedTaglet()).getTagletOutput(member, 2.39 + writer.getTagletWriterInstance(false)).toString().trim(); 2.40 + if (!output.isEmpty()) { 2.41 + writer.printMemberDetailsListStartTag(); 2.42 + writer.print(output); 2.43 + } 2.44 + } 2.45 + 2.46 protected void printComment(ProgramElementDoc member) { 2.47 if (member.inlineTags().length > 0) { 2.48 + writer.printMemberDetailsListStartTag(); 2.49 writer.dd(); 2.50 writer.printInlineComment(member); 2.51 + writer.ddEnd(); 2.52 } 2.53 } 2.54 2.55 @@ -267,6 +284,14 @@ 2.56 } 2.57 2.58 /** 2.59 + * Write the member footer. 2.60 + */ 2.61 + protected void printMemberFooter() { 2.62 + writer.printMemberDetailsListEndTag(); 2.63 + assert !writer.getMemberDetailsListPrinted(); 2.64 + } 2.65 + 2.66 + /** 2.67 * Forward to containing writer 2.68 */ 2.69 public void printSummaryHeader(ClassDoc cd) {
3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeOptionalMemberWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 3.3 @@ -25,10 +25,10 @@ 3.4 3.5 package com.sun.tools.doclets.formats.html; 3.6 3.7 +import java.io.*; 3.8 + 3.9 +import com.sun.javadoc.*; 3.10 import com.sun.tools.doclets.internal.toolkit.*; 3.11 -import com.sun.javadoc.*; 3.12 - 3.13 -import java.io.*; 3.14 3.15 /** 3.16 * Writes annotation type optional member documentation in HTML format. 3.17 @@ -63,14 +63,20 @@ 3.18 * {@inheritDoc} 3.19 */ 3.20 public void writeDefaultValueInfo(MemberDoc member) { 3.21 - writer.dl(); 3.22 - writer.dt(); 3.23 - writer.strong(ConfigurationImpl.getInstance(). 3.24 - getText("doclet.Default")); 3.25 - writer.dd(); 3.26 - writer.print(((AnnotationTypeElementDoc) member).defaultValue()); 3.27 - writer.ddEnd(); 3.28 - writer.dlEnd(); 3.29 + if (((AnnotationTypeElementDoc) member).defaultValue() != null) { 3.30 + writer.printMemberDetailsListStartTag(); 3.31 + writer.dd(); 3.32 + writer.dl(); 3.33 + writer.dt(); 3.34 + writer.strong(ConfigurationImpl.getInstance(). 3.35 + getText("doclet.Default")); 3.36 + writer.dtEnd(); 3.37 + writer.dd(); 3.38 + writer.print(((AnnotationTypeElementDoc) member).defaultValue()); 3.39 + writer.ddEnd(); 3.40 + writer.dlEnd(); 3.41 + writer.ddEnd(); 3.42 + } 3.43 } 3.44 3.45 /**
4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeRequiredMemberWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 4.3 @@ -25,11 +25,10 @@ 4.4 4.5 package com.sun.tools.doclets.formats.html; 4.6 4.7 +import java.io.*; 4.8 + 4.9 +import com.sun.javadoc.*; 4.10 import com.sun.tools.doclets.internal.toolkit.*; 4.11 -import com.sun.tools.doclets.internal.toolkit.taglets.*; 4.12 -import com.sun.javadoc.*; 4.13 - 4.14 -import java.io.*; 4.15 4.16 /** 4.17 * Writes annotation type required member documentation in HTML format. 4.18 @@ -134,17 +133,14 @@ 4.19 strong(member.name()); 4.20 } 4.21 writer.preEnd(); 4.22 - writer.dl(); 4.23 + assert !writer.getMemberDetailsListPrinted(); 4.24 } 4.25 4.26 /** 4.27 * {@inheritDoc} 4.28 */ 4.29 public void writeComments(MemberDoc member) { 4.30 - if (member.inlineTags().length > 0) { 4.31 - writer.dd(); 4.32 - writer.printInlineComment(member); 4.33 - } 4.34 + printComment(member); 4.35 } 4.36 4.37 /** 4.38 @@ -160,7 +156,7 @@ 4.39 * Write the annotation type member footer. 4.40 */ 4.41 public void writeMemberFooter() { 4.42 - writer.dlEnd(); 4.43 + printMemberFooter(); 4.44 } 4.45 4.46 /** 4.47 @@ -267,9 +263,7 @@ 4.48 * {@inheritDoc} 4.49 */ 4.50 public void writeDeprecated(MemberDoc member) { 4.51 - print(((TagletOutputImpl) 4.52 - (new DeprecatedTaglet()).getTagletOutput(member, 4.53 - writer.getTagletWriterInstance(false))).toString()); 4.54 + printDeprecated(member); 4.55 } 4.56 4.57 private Type getType(MemberDoc member) {
5.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/AnnotationTypeWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 5.3 @@ -25,10 +25,10 @@ 5.4 5.5 package com.sun.tools.doclets.formats.html; 5.6 5.7 +import com.sun.javadoc.*; 5.8 import com.sun.tools.doclets.internal.toolkit.*; 5.9 import com.sun.tools.doclets.internal.toolkit.util.*; 5.10 import com.sun.tools.doclets.internal.toolkit.builders.*; 5.11 -import com.sun.javadoc.*; 5.12 5.13 /** 5.14 * Generate the Class Information Page. 5.15 @@ -165,8 +165,6 @@ 5.16 * {@inheritDoc} 5.17 */ 5.18 public void writeAnnotationTypeSignature(String modifiers) { 5.19 - dl(); 5.20 - dt(); 5.21 preNoNewLine(); 5.22 writeAnnotationInfo(annotationType); 5.23 print(modifiers); 5.24 @@ -178,7 +176,6 @@ 5.25 } else { 5.26 strong(name); 5.27 } 5.28 - dlEnd(); 5.29 preEnd(); 5.30 p(); 5.31 } 5.32 @@ -334,6 +331,7 @@ 5.33 } else { 5.34 strongText("doclet.Enclosing_Class"); 5.35 } 5.36 + dtEnd(); 5.37 dd(); 5.38 printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass, 5.39 false));
6.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 6.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 6.3 @@ -25,12 +25,12 @@ 6.4 6.5 package com.sun.tools.doclets.formats.html; 6.6 6.7 +import java.util.*; 6.8 + 6.9 +import com.sun.javadoc.*; 6.10 import com.sun.tools.doclets.internal.toolkit.*; 6.11 import com.sun.tools.doclets.internal.toolkit.util.*; 6.12 import com.sun.tools.doclets.internal.toolkit.builders.*; 6.13 -import com.sun.javadoc.*; 6.14 - 6.15 -import java.util.*; 6.16 import com.sun.tools.doclets.internal.toolkit.taglets.*; 6.17 6.18 /** 6.19 @@ -171,8 +171,6 @@ 6.20 */ 6.21 public void writeClassSignature(String modifiers) { 6.22 boolean isInterface = classDoc.isInterface(); 6.23 - dl(); 6.24 - dt(); 6.25 preNoNewLine(); 6.26 writeAnnotationInfo(classDoc); 6.27 print(modifiers); 6.28 @@ -191,7 +189,7 @@ 6.29 Type superclass = Util.getFirstVisibleSuperClass(classDoc, 6.30 configuration()); 6.31 if (superclass != null) { 6.32 - dt(); 6.33 + println(); 6.34 print("extends "); 6.35 printLink(new LinkInfoImpl( 6.36 LinkInfoImpl.CONTEXT_CLASS_SIGNATURE_PARENT_NAME, 6.37 @@ -208,7 +206,7 @@ 6.38 continue; 6.39 } 6.40 if (counter == 0) { 6.41 - dt(); 6.42 + println(); 6.43 print(isInterface? "extends " : "implements "); 6.44 } else { 6.45 print(", "); 6.46 @@ -219,7 +217,6 @@ 6.47 counter++; 6.48 } 6.49 } 6.50 - dlEnd(); 6.51 preEnd(); 6.52 p(); 6.53 } 6.54 @@ -342,6 +339,7 @@ 6.55 TagletOutput output = (new ParamTaglet()).getTagletOutput(classDoc, 6.56 getTagletWriterInstance(false)); 6.57 print(output.toString()); 6.58 + dtEnd(); 6.59 dlEnd(); 6.60 } 6.61 } 6.62 @@ -360,8 +358,10 @@ 6.63 dl(); 6.64 dt(); 6.65 strongText("doclet.Subclasses"); 6.66 + dtEnd(); 6.67 writeClassLinks(LinkInfoImpl.CONTEXT_SUBCLASSES, 6.68 subclasses); 6.69 + dlEnd(); 6.70 } 6.71 } 6.72 } 6.73 @@ -376,8 +376,10 @@ 6.74 dl(); 6.75 dt(); 6.76 strongText("doclet.Subinterfaces"); 6.77 + dtEnd(); 6.78 writeClassLinks(LinkInfoImpl.CONTEXT_SUBINTERFACES, 6.79 subInterfaces); 6.80 + dlEnd(); 6.81 } 6.82 } 6.83 } 6.84 @@ -398,8 +400,10 @@ 6.85 dl(); 6.86 dt(); 6.87 strongText("doclet.Implementing_Classes"); 6.88 + dtEnd(); 6.89 writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_CLASSES, 6.90 implcl); 6.91 + dlEnd(); 6.92 } 6.93 } 6.94 6.95 @@ -414,8 +418,10 @@ 6.96 dl(); 6.97 dt(); 6.98 strongText("doclet.All_Implemented_Interfaces"); 6.99 + dtEnd(); 6.100 writeClassLinks(LinkInfoImpl.CONTEXT_IMPLEMENTED_INTERFACES, 6.101 interfaceArray); 6.102 + dlEnd(); 6.103 } 6.104 } 6.105 6.106 @@ -430,8 +436,10 @@ 6.107 dl(); 6.108 dt(); 6.109 strongText("doclet.All_Superinterfaces"); 6.110 + dtEnd(); 6.111 writeClassLinks(LinkInfoImpl.CONTEXT_SUPER_INTERFACES, 6.112 interfaceArray); 6.113 + dlEnd(); 6.114 } 6.115 } 6.116 6.117 @@ -455,7 +463,6 @@ 6.118 } 6.119 } 6.120 ddEnd(); 6.121 - dlEnd(); 6.122 } 6.123 6.124 protected void navLinkTree() { 6.125 @@ -574,6 +581,7 @@ 6.126 } else { 6.127 strongText("doclet.Enclosing_Class"); 6.128 } 6.129 + dtEnd(); 6.130 dd(); 6.131 printLink(new LinkInfoImpl(LinkInfoImpl.CONTEXT_CLASS, outerClass, 6.132 false));
7.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 7.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConstructorWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 7.3 @@ -25,12 +25,12 @@ 7.4 7.5 package com.sun.tools.doclets.formats.html; 7.6 7.7 +import java.io.*; 7.8 +import java.util.*; 7.9 + 7.10 +import com.sun.javadoc.*; 7.11 import com.sun.tools.doclets.internal.toolkit.*; 7.12 import com.sun.tools.doclets.internal.toolkit.util.*; 7.13 -import com.sun.tools.doclets.internal.toolkit.taglets.*; 7.14 -import com.sun.javadoc.*; 7.15 -import java.util.*; 7.16 -import java.io.*; 7.17 7.18 /** 7.19 * Writes constructor documentation. 7.20 @@ -149,7 +149,7 @@ 7.21 writeParameters(constructor); 7.22 writeExceptions(constructor); 7.23 writer.preEnd(); 7.24 - writer.dl(); 7.25 + assert !writer.getMemberDetailsListPrinted(); 7.26 } 7.27 7.28 /** 7.29 @@ -158,12 +158,7 @@ 7.30 * @param constructor the constructor being documented. 7.31 */ 7.32 public void writeDeprecated(ConstructorDoc constructor) { 7.33 - String output = ((TagletOutputImpl) 7.34 - (new DeprecatedTaglet()).getTagletOutput(constructor, 7.35 - writer.getTagletWriterInstance(false))).toString(); 7.36 - if (output != null && output.trim().length() > 0) { 7.37 - writer.print(output); 7.38 - } 7.39 + printDeprecated(constructor); 7.40 } 7.41 7.42 /** 7.43 @@ -172,10 +167,7 @@ 7.44 * @param constructor the constructor being documented. 7.45 */ 7.46 public void writeComments(ConstructorDoc constructor) { 7.47 - if (constructor.inlineTags().length > 0) { 7.48 - writer.dd(); 7.49 - writer.printInlineComment(constructor); 7.50 - } 7.51 + printComment(constructor); 7.52 } 7.53 7.54 /** 7.55 @@ -191,7 +183,7 @@ 7.56 * Write the constructor footer. 7.57 */ 7.58 public void writeConstructorFooter() { 7.59 - writer.dlEnd(); 7.60 + printMemberFooter(); 7.61 } 7.62 7.63 /**
8.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 8.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/EnumConstantWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 8.3 @@ -25,12 +25,11 @@ 8.4 8.5 package com.sun.tools.doclets.formats.html; 8.6 8.7 +import java.io.*; 8.8 + 8.9 +import com.sun.javadoc.*; 8.10 import com.sun.tools.doclets.internal.toolkit.*; 8.11 -import com.sun.tools.doclets.internal.toolkit.taglets.*; 8.12 import com.sun.tools.doclets.internal.toolkit.util.*; 8.13 -import com.sun.javadoc.*; 8.14 - 8.15 -import java.io.*; 8.16 8.17 /** 8.18 * Writes enum constant documentation in HTML format. 8.19 @@ -146,26 +145,21 @@ 8.20 strong(enumConstant.name()); 8.21 } 8.22 writer.preEnd(); 8.23 - writer.dl(); 8.24 + assert !writer.getMemberDetailsListPrinted(); 8.25 } 8.26 8.27 /** 8.28 * {@inheritDoc} 8.29 */ 8.30 public void writeDeprecated(FieldDoc enumConstant) { 8.31 - print(((TagletOutputImpl) 8.32 - (new DeprecatedTaglet()).getTagletOutput(enumConstant, 8.33 - writer.getTagletWriterInstance(false))).toString()); 8.34 + printDeprecated(enumConstant); 8.35 } 8.36 8.37 /** 8.38 * {@inheritDoc} 8.39 */ 8.40 public void writeComments(FieldDoc enumConstant) { 8.41 - if (enumConstant.inlineTags().length > 0) { 8.42 - writer.dd(); 8.43 - writer.printInlineComment(enumConstant); 8.44 - } 8.45 + printComment(enumConstant); 8.46 } 8.47 8.48 /** 8.49 @@ -179,7 +173,7 @@ 8.50 * {@inheritDoc} 8.51 */ 8.52 public void writeEnumConstantFooter() { 8.53 - writer.dlEnd(); 8.54 + printMemberFooter(); 8.55 } 8.56 8.57 /**
9.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 9.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/FieldWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 9.3 @@ -25,12 +25,11 @@ 9.4 9.5 package com.sun.tools.doclets.formats.html; 9.6 9.7 +import java.io.*; 9.8 + 9.9 +import com.sun.javadoc.*; 9.10 import com.sun.tools.doclets.internal.toolkit.*; 9.11 -import com.sun.tools.doclets.internal.toolkit.taglets.*; 9.12 import com.sun.tools.doclets.internal.toolkit.util.*; 9.13 -import com.sun.javadoc.*; 9.14 - 9.15 -import java.io.*; 9.16 9.17 /** 9.18 * Writes field documentation in HTML format. 9.19 @@ -156,7 +155,7 @@ 9.20 strong(field.name()); 9.21 } 9.22 writer.preEnd(); 9.23 - writer.dl(); 9.24 + assert !writer.getMemberDetailsListPrinted(); 9.25 } 9.26 9.27 /** 9.28 @@ -165,9 +164,7 @@ 9.29 * @param field the field being documented. 9.30 */ 9.31 public void writeDeprecated(FieldDoc field) { 9.32 - print(((TagletOutputImpl) 9.33 - (new DeprecatedTaglet()).getTagletOutput(field, 9.34 - writer.getTagletWriterInstance(false))).toString()); 9.35 + printDeprecated(field); 9.36 } 9.37 9.38 /** 9.39 @@ -178,10 +175,12 @@ 9.40 public void writeComments(FieldDoc field) { 9.41 ClassDoc holder = field.containingClass(); 9.42 if (field.inlineTags().length > 0) { 9.43 + writer.printMemberDetailsListStartTag(); 9.44 if (holder.equals(classdoc) || 9.45 (! (holder.isPublic() || Util.isLinkable(holder, configuration())))) { 9.46 writer.dd(); 9.47 writer.printInlineComment(field); 9.48 + writer.ddEnd(); 9.49 } else { 9.50 String classlink = writer.codeText( 9.51 writer.getDocLink(LinkInfoImpl.CONTEXT_FIELD_DOC_COPY, 9.52 @@ -196,6 +195,7 @@ 9.53 writer.ddEnd(); 9.54 writer.dd(); 9.55 writer.printInlineComment(field); 9.56 + writer.ddEnd(); 9.57 } 9.58 } 9.59 } 9.60 @@ -213,7 +213,7 @@ 9.61 * Write the field footer. 9.62 */ 9.63 public void writeFieldFooter() { 9.64 - writer.dlEnd(); 9.65 + printMemberFooter(); 9.66 } 9.67 9.68 /**
10.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Mar 09 13:34:19 2009 -0700 10.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Mar 09 23:53:41 2009 -0700 10.3 @@ -24,17 +24,16 @@ 10.4 */ 10.5 10.6 package com.sun.tools.doclets.formats.html; 10.7 -import com.sun.tools.doclets.formats.html.markup.*; 10.8 10.9 -import com.sun.tools.doclets.internal.toolkit.*; 10.10 -import com.sun.tools.doclets.internal.toolkit.util.*; 10.11 -import com.sun.tools.doclets.internal.toolkit.taglets.*; 10.12 - 10.13 -import com.sun.javadoc.*; 10.14 import java.io.*; 10.15 import java.text.SimpleDateFormat; 10.16 import java.util.*; 10.17 10.18 +import com.sun.javadoc.*; 10.19 +import com.sun.tools.doclets.formats.html.markup.*; 10.20 +import com.sun.tools.doclets.internal.toolkit.*; 10.21 +import com.sun.tools.doclets.internal.toolkit.util.*; 10.22 +import com.sun.tools.doclets.internal.toolkit.taglets.*; 10.23 10.24 /** 10.25 * Class for the Html Format Code Generation specific to JavaDoc. 10.26 @@ -44,6 +43,7 @@ 10.27 * @since 1.2 10.28 * @author Atul M Dambalkar 10.29 * @author Robert Field 10.30 + * @author Bhavesh Patel (Modified) 10.31 */ 10.32 public class HtmlDocletWriter extends HtmlDocWriter { 10.33 10.34 @@ -205,7 +205,13 @@ 10.35 private void printMethodInfo(MethodDoc method) { 10.36 ClassDoc[] intfacs = method.containingClass().interfaces(); 10.37 MethodDoc overriddenMethod = method.overriddenMethod(); 10.38 - if (intfacs.length > 0 || overriddenMethod != null) { 10.39 + // Check whether there is any implementation or overridden info to be 10.40 + // printed. If no overridden or implementation info needs to be 10.41 + // printed, do not print this section. 10.42 + if ((intfacs.length > 0 && 10.43 + new ImplementedMethods(method, this.configuration).build().length > 0) || 10.44 + overriddenMethod != null) { 10.45 + printMemberDetailsListStartTag(); 10.46 dd(); 10.47 printTagsInfoHeader(); 10.48 MethodWriterImpl.printImplementsInfo(this, method); 10.49 @@ -216,7 +222,6 @@ 10.50 printTagsInfoFooter(); 10.51 ddEnd(); 10.52 } 10.53 - dd(); 10.54 } 10.55 10.56 protected void printTags(Doc doc) { 10.57 @@ -230,41 +235,35 @@ 10.58 TagletWriter.genTagOuput(configuration.tagletManager, doc, 10.59 configuration.tagletManager.getCustomTags(doc), 10.60 getTagletWriterInstance(false), output); 10.61 - if (output.toString().trim().length() > 0) { 10.62 + String outputString = output.toString().trim(); 10.63 + // For RootDoc and ClassDoc, this section is not the definition description 10.64 + // but the start of definition list. 10.65 + if (!outputString.isEmpty()) { 10.66 + if (!(doc instanceof RootDoc || doc instanceof ClassDoc)) { 10.67 + printMemberDetailsListStartTag(); 10.68 + dd(); 10.69 + } 10.70 printTagsInfoHeader(); 10.71 - print(output.toString()); 10.72 + print(outputString); 10.73 printTagsInfoFooter(); 10.74 - } else if (! (doc instanceof ConstructorDoc || 10.75 - doc instanceof RootDoc || doc instanceof ClassDoc)) { 10.76 - //To be consistent with 1.4.2 output. 10.77 - //I hate to do this but we have to pass the diff test to prove 10.78 - //nothing has broken. 10.79 - printTagsInfoHeader(); 10.80 - printTagsInfoFooter(); 10.81 + if (!(doc instanceof RootDoc || doc instanceof ClassDoc)) 10.82 + ddEnd(); 10.83 } 10.84 } 10.85 10.86 /** 10.87 - * Check whether there are any tags to be printed. 10.88 + * Check whether there are any tags for Serialization Overview 10.89 + * section to be printed. 10.90 * 10.91 - * @param doc the Doc object to check for tags. 10.92 + * @param field the FieldDoc object to check for tags. 10.93 * @return true if there are tags to be printed else return false. 10.94 */ 10.95 - protected boolean hasTagsToPrint(Doc doc) { 10.96 - if (doc instanceof MethodDoc) { 10.97 - ClassDoc[] intfacs = ((MethodDoc)doc).containingClass().interfaces(); 10.98 - MethodDoc overriddenMethod = ((MethodDoc)doc).overriddenMethod(); 10.99 - if ((intfacs.length > 0 && 10.100 - new ImplementedMethods((MethodDoc)doc, this.configuration).build().length > 0) || 10.101 - overriddenMethod != null) { 10.102 - return true; 10.103 - } 10.104 - } 10.105 + protected boolean hasSerializationOverviewTags(FieldDoc field) { 10.106 TagletOutputImpl output = new TagletOutputImpl(""); 10.107 - TagletWriter.genTagOuput(configuration.tagletManager, doc, 10.108 - configuration.tagletManager.getCustomTags(doc), 10.109 + TagletWriter.genTagOuput(configuration.tagletManager, field, 10.110 + configuration.tagletManager.getCustomTags(field), 10.111 getTagletWriterInstance(false), output); 10.112 - return (output.toString().trim().isEmpty()); 10.113 + return (!output.toString().trim().isEmpty()); 10.114 } 10.115 10.116 /**
11.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Mon Mar 09 13:34:19 2009 -0700 11.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java Mon Mar 09 23:53:41 2009 -0700 11.3 @@ -25,11 +25,12 @@ 11.4 11.5 package com.sun.tools.doclets.formats.html; 11.6 11.7 +import java.util.*; 11.8 + 11.9 +import com.sun.javadoc.*; 11.10 import com.sun.tools.doclets.internal.toolkit.*; 11.11 import com.sun.tools.doclets.internal.toolkit.taglets.*; 11.12 import com.sun.tools.doclets.internal.toolkit.util.*; 11.13 -import com.sun.javadoc.*; 11.14 -import java.util.*; 11.15 11.16 /** 11.17 * Generate serialized form for serializable fields. 11.18 @@ -37,6 +38,7 @@ 11.19 * <code>serialField</code> is processed. 11.20 * 11.21 * @author Joe Fialli 11.22 + * @author Bhavesh Patel (Modified) 11.23 */ 11.24 public class HtmlSerialFieldWriter extends FieldWriterImpl 11.25 implements SerializedFormWriter.SerialFieldWriter { 11.26 @@ -75,7 +77,7 @@ 11.27 writer.println(); 11.28 if (heading.equals( 11.29 configuration().getText("doclet.Serialized_Form_class"))) { 11.30 - writer.dl(); 11.31 + assert !writer.getMemberDetailsListPrinted(); 11.32 } 11.33 } else { 11.34 writer.printTableHeadingBackground(heading); 11.35 @@ -102,7 +104,7 @@ 11.36 print(fieldDimensions + ' '); 11.37 strong(fieldName); 11.38 writer.preEnd(); 11.39 - writer.dl(); 11.40 + assert !writer.getMemberDetailsListPrinted(); 11.41 } 11.42 11.43 /** 11.44 @@ -111,9 +113,7 @@ 11.45 * @param field the field to document. 11.46 */ 11.47 public void writeMemberDeprecatedInfo(FieldDoc field) { 11.48 - print(((TagletOutputImpl) 11.49 - (new DeprecatedTaglet()).getTagletOutput(field, 11.50 - writer.getTagletWriterInstance(false))).toString()); 11.51 + printDeprecated(field); 11.52 } 11.53 11.54 /** 11.55 @@ -123,14 +123,17 @@ 11.56 */ 11.57 public void writeMemberDescription(FieldDoc field) { 11.58 if (field.inlineTags().length > 0) { 11.59 + writer.printMemberDetailsListStartTag(); 11.60 writer.dd(); 11.61 writer.printInlineComment(field); 11.62 + writer.ddEnd(); 11.63 } 11.64 Tag[] tags = field.tags("serial"); 11.65 if (tags.length > 0) { 11.66 - writer.dt(); 11.67 + writer.printMemberDetailsListStartTag(); 11.68 writer.dd(); 11.69 writer.printInlineComment(field, tags[0]); 11.70 + writer.ddEnd(); 11.71 } 11.72 } 11.73 11.74 @@ -140,9 +143,14 @@ 11.75 * @param serialFieldTag the field to document (represented by tag). 11.76 */ 11.77 public void writeMemberDescription(SerialFieldTag serialFieldTag) { 11.78 - writer.dd(); 11.79 - writer.print(serialFieldTag.description()); 11.80 - writer.dlEnd(); 11.81 + String serialFieldTagDesc = serialFieldTag.description().trim(); 11.82 + if (!serialFieldTagDesc.isEmpty()) { 11.83 + writer.dl(); 11.84 + writer.dd(); 11.85 + writer.print(serialFieldTagDesc); 11.86 + writer.ddEnd(); 11.87 + writer.dlEnd(); 11.88 + } 11.89 } 11.90 11.91 /** 11.92 @@ -151,33 +159,57 @@ 11.93 * @param field the field to document. 11.94 */ 11.95 public void writeMemberTags(FieldDoc field) { 11.96 - writer.dl(); 11.97 TagletOutputImpl output = new TagletOutputImpl(""); 11.98 TagletWriter.genTagOuput(configuration().tagletManager, field, 11.99 configuration().tagletManager.getCustomTags(field), 11.100 writer.getTagletWriterInstance(false), output); 11.101 - if (output.toString().length() > 0) { 11.102 - print(output.toString()); 11.103 + String outputString = output.toString().trim(); 11.104 + if (!outputString.isEmpty()) { 11.105 + writer.printMemberDetailsListStartTag(); 11.106 + writer.dd(); 11.107 + writer.dl(); 11.108 + print(outputString); 11.109 + writer.dlEnd(); 11.110 + writer.ddEnd(); 11.111 } 11.112 - writer.dlEnd(); 11.113 - } 11.114 - public void writeMemberFooter(FieldDoc member) { 11.115 - writer.dlEnd(); 11.116 } 11.117 11.118 /** 11.119 - * Check to see if member details should be printed. If 11.120 + * Check to see if overview details should be printed. If 11.121 * nocomment option set or if there is no text to be printed 11.122 - * for deprecation info, inline comment, no serial tag or inline tags, 11.123 - * do not print member details. 11.124 + * for deprecation info, comment or tags, do not print overview details. 11.125 + * 11.126 + * @param field the field to check overview details for. 11.127 + * @return true if overview details need to be printed 11.128 */ 11.129 - public boolean shouldPrintMemberDetails(FieldDoc field) { 11.130 - if (!configuration().nocomment) 11.131 - if((field.inlineTags().length > 0) || 11.132 - (field.tags("serial").length > 0) || (writer.hasTagsToPrint(field))) 11.133 + public boolean shouldPrintOverview(FieldDoc field) { 11.134 + if (!configuration().nocomment) { 11.135 + if(!field.commentText().isEmpty() || 11.136 + writer.hasSerializationOverviewTags(field)) 11.137 return true; 11.138 - if (!Util.isDeprecated(field)) 11.139 + } 11.140 + if (field.tags("deprecated").length > 0) 11.141 return true; 11.142 return false; 11.143 } 11.144 + 11.145 + public void writeMemberFooter() { 11.146 + printMemberFooter(); 11.147 + } 11.148 + 11.149 + /** 11.150 + * Write the footer information. If the serilization overview section was 11.151 + * printed, check for definition list and close list tag. 11.152 + * 11.153 + * @param heading the heading that was written. 11.154 + */ 11.155 + public void writeFooter(String heading) { 11.156 + if (printedOverallAnchor) { 11.157 + if (heading.equals( 11.158 + configuration().getText("doclet.Serialized_Form_class"))) { 11.159 + writer.printMemberDetailsListEndTag(); 11.160 + assert !writer.getMemberDetailsListPrinted(); 11.161 + } 11.162 + } 11.163 + } 11.164 }
12.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Mon Mar 09 13:34:19 2009 -0700 12.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java Mon Mar 09 23:53:41 2009 -0700 12.3 @@ -25,9 +25,9 @@ 12.4 12.5 package com.sun.tools.doclets.formats.html; 12.6 12.7 +import com.sun.javadoc.*; 12.8 import com.sun.tools.doclets.internal.toolkit.*; 12.9 import com.sun.tools.doclets.internal.toolkit.taglets.*; 12.10 -import com.sun.javadoc.*; 12.11 12.12 /** 12.13 * Generate serialized form for Serializable/Externalizable methods. 12.14 @@ -66,14 +66,12 @@ 12.15 writeSignature(member); 12.16 } 12.17 12.18 - public void writeMemberFooter(MethodDoc member) { 12.19 - writer.dlEnd(); 12.20 + public void writeMemberFooter() { 12.21 + printMemberFooter(); 12.22 } 12.23 12.24 public void writeDeprecatedMemberInfo(MethodDoc member) { 12.25 - print(((TagletOutputImpl) 12.26 - (new DeprecatedTaglet()).getTagletOutput(member, 12.27 - writer.getTagletWriterInstance(false))).toString()); 12.28 + printDeprecated(member); 12.29 } 12.30 12.31 public void writeMemberDescription(MethodDoc member) { 12.32 @@ -81,23 +79,27 @@ 12.33 } 12.34 12.35 public void writeMemberTags(MethodDoc member) { 12.36 - writer.dd(); 12.37 - writer.dl(); 12.38 TagletOutputImpl output = new TagletOutputImpl(""); 12.39 TagletManager tagletManager = 12.40 ConfigurationImpl.getInstance().tagletManager; 12.41 TagletWriter.genTagOuput(tagletManager, member, 12.42 tagletManager.getSerializedFormTags(), 12.43 writer.getTagletWriterInstance(false), output); 12.44 - print(output.toString()); 12.45 + String outputString = output.toString().trim(); 12.46 + if (!outputString.isEmpty()) { 12.47 + writer.printMemberDetailsListStartTag(); 12.48 + writer.dd(); 12.49 + writer.dl(); 12.50 + print(outputString); 12.51 + writer.dlEnd(); 12.52 + writer.ddEnd(); 12.53 + } 12.54 MethodDoc method = member; 12.55 if (method.name().compareTo("writeExternal") == 0 12.56 && method.tags("serialData").length == 0) { 12.57 serialWarning(member.position(), "doclet.MissingSerialDataTag", 12.58 method.containingClass().qualifiedName(), method.name()); 12.59 } 12.60 - writer.ddEnd(); 12.61 - writer.dlEnd(); 12.62 } 12.63 12.64 protected void printTypeLinkNoDimension(Type type) {
13.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 13.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/MethodWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 13.3 @@ -25,13 +25,13 @@ 13.4 13.5 package com.sun.tools.doclets.formats.html; 13.6 13.7 +import java.io.*; 13.8 + 13.9 +import com.sun.javadoc.*; 13.10 import com.sun.tools.doclets.internal.toolkit.*; 13.11 import com.sun.tools.doclets.internal.toolkit.util.*; 13.12 import com.sun.tools.doclets.internal.toolkit.taglets.*; 13.13 13.14 -import java.io.*; 13.15 -import com.sun.javadoc.*; 13.16 - 13.17 /** 13.18 * Writes method documentation in HTML format. 13.19 * 13.20 @@ -172,7 +172,7 @@ 13.21 writeParameters(method); 13.22 writeExceptions(method); 13.23 writer.preEnd(); 13.24 - writer.dl(); 13.25 + assert !writer.getMemberDetailsListPrinted(); 13.26 } 13.27 13.28 /** 13.29 @@ -181,12 +181,7 @@ 13.30 * @param method the method being documented. 13.31 */ 13.32 public void writeDeprecated(MethodDoc method) { 13.33 - String output = ((TagletOutputImpl) 13.34 - (new DeprecatedTaglet()).getTagletOutput(method, 13.35 - writer.getTagletWriterInstance(false))).toString(); 13.36 - if (output != null && output.trim().length() > 0) { 13.37 - writer.print(output); 13.38 - } 13.39 + printDeprecated(method); 13.40 } 13.41 13.42 /** 13.43 @@ -197,11 +192,13 @@ 13.44 public void writeComments(Type holder, MethodDoc method) { 13.45 ClassDoc holderClassDoc = holder.asClassDoc(); 13.46 if (method.inlineTags().length > 0) { 13.47 + writer.printMemberDetailsListStartTag(); 13.48 if (holder.asClassDoc().equals(classdoc) || 13.49 (! (holderClassDoc.isPublic() || 13.50 Util.isLinkable(holderClassDoc, configuration())))) { 13.51 writer.dd(); 13.52 writer.printInlineComment(method); 13.53 + writer.ddEnd(); 13.54 } else { 13.55 String classlink = writer.codeText( 13.56 writer.getDocLink(LinkInfoImpl.CONTEXT_METHOD_DOC_COPY, 13.57 @@ -217,6 +214,7 @@ 13.58 writer.ddEnd(); 13.59 writer.dd(); 13.60 writer.printInlineComment(method); 13.61 + writer.ddEnd(); 13.62 } 13.63 } 13.64 } 13.65 @@ -234,8 +232,7 @@ 13.66 * Write the method footer. 13.67 */ 13.68 public void writeMethodFooter() { 13.69 - writer.ddEnd(); 13.70 - writer.dlEnd(); 13.71 + printMemberFooter(); 13.72 } 13.73 13.74 /** 13.75 @@ -318,6 +315,7 @@ 13.76 String name = method.name(); 13.77 writer.dt(); 13.78 writer.strongText(label); 13.79 + writer.dtEnd(); 13.80 writer.dd(); 13.81 String methLink = writer.codeText( 13.82 writer.getLink( 13.83 @@ -326,6 +324,7 @@ 13.84 writer.getAnchor(method), name, false) 13.85 )); 13.86 writer.printText("doclet.in_class", methLink, overriddenTypeLink); 13.87 + writer.ddEnd(); 13.88 } 13.89 } 13.90 13.91 @@ -364,11 +363,13 @@ 13.92 LinkInfoImpl.CONTEXT_METHOD_SPECIFIED_BY, intfac))); 13.93 writer.dt(); 13.94 writer.strongText("doclet.Specified_By"); 13.95 + writer.dtEnd(); 13.96 writer.dd(); 13.97 methlink = writer.codeText(writer.getDocLink( 13.98 LinkInfoImpl.CONTEXT_MEMBER, implementedMeth, 13.99 implementedMeth.name(), false)); 13.100 writer.printText("doclet.in_interface", methlink, intfaclink); 13.101 + writer.ddEnd(); 13.102 } 13.103 13.104 }
14.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 14.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/NestedClassWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 14.3 @@ -25,11 +25,11 @@ 14.4 14.5 package com.sun.tools.doclets.formats.html; 14.6 14.7 +import java.io.*; 14.8 + 14.9 +import com.sun.javadoc.*; 14.10 import com.sun.tools.doclets.internal.toolkit.*; 14.11 import com.sun.tools.doclets.internal.toolkit.util.*; 14.12 -import com.sun.javadoc.*; 14.13 - 14.14 -import java.io.*; 14.15 14.16 /** 14.17 * Writes nested class documentation in HTML format. 14.18 @@ -129,7 +129,6 @@ 14.19 writer.println(""); 14.20 } 14.21 writer.anchor(nestedClass.name()); 14.22 - writer.dl(); 14.23 writer.h3(); 14.24 writer.print(nestedClass.name()); 14.25 writer.h3End();
15.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java Mon Mar 09 13:34:19 2009 -0700 15.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/PackageTreeWriter.java Mon Mar 09 23:53:41 2009 -0700 15.3 @@ -25,9 +25,10 @@ 15.4 15.5 package com.sun.tools.doclets.formats.html; 15.6 15.7 +import java.io.*; 15.8 + 15.9 +import com.sun.javadoc.*; 15.10 import com.sun.tools.doclets.internal.toolkit.util.*; 15.11 -import com.sun.javadoc.*; 15.12 -import java.io.*; 15.13 15.14 /** 15.15 * Class to generate Tree page for a package. The name of the file generated is 15.16 @@ -145,8 +146,10 @@ 15.17 dl(); 15.18 dt(); 15.19 strongText("doclet.Package_Hierarchies"); 15.20 + dtEnd(); 15.21 dd(); 15.22 navLinkMainTree(configuration.getText("doclet.All_Packages")); 15.23 + ddEnd(); 15.24 dlEnd(); 15.25 hr(); 15.26 }
16.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Mon Mar 09 13:34:19 2009 -0700 16.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java Mon Mar 09 23:53:41 2009 -0700 16.3 @@ -25,17 +25,18 @@ 16.4 16.5 package com.sun.tools.doclets.formats.html; 16.6 16.7 +import com.sun.javadoc.*; 16.8 import com.sun.tools.doclets.internal.toolkit.*; 16.9 import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder; 16.10 import com.sun.tools.doclets.internal.toolkit.taglets.*; 16.11 import com.sun.tools.doclets.internal.toolkit.util.*; 16.12 -import com.sun.javadoc.*; 16.13 16.14 /** 16.15 * The taglet writer that writes HTML. 16.16 * 16.17 * @since 1.5 16.18 * @author Jamie Ho 16.19 + * @author Bhavesh Patel (Modified) 16.20 */ 16.21 16.22 public class TagletWriterImpl extends TagletWriter { 16.23 @@ -99,11 +100,12 @@ 16.24 output.append(DocletConstants.NL + "<P>" + 16.25 DocletConstants.NL); 16.26 } 16.27 + output.append("</DD>"); 16.28 } else { 16.29 if (Util.isDeprecated(member.containingClass())) { 16.30 output.append("<DD><STRONG>" + 16.31 ConfigurationImpl.getInstance(). 16.32 - getText("doclet.Deprecated") + "</STRONG> "); 16.33 + getText("doclet.Deprecated") + "</STRONG> </DD>"); 16.34 } 16.35 } 16.36 } 16.37 @@ -123,7 +125,7 @@ 16.38 public TagletOutput getParamHeader(String header) { 16.39 StringBuffer result = new StringBuffer(); 16.40 result.append("<DT>"); 16.41 - result.append("<STRONG>" + header + "</STRONG>"); 16.42 + result.append("<STRONG>" + header + "</STRONG></DT>"); 16.43 return new TagletOutputImpl(result.toString()); 16.44 } 16.45 16.46 @@ -132,7 +134,7 @@ 16.47 */ 16.48 public TagletOutput paramTagOutput(ParamTag paramTag, String paramName) { 16.49 TagletOutput result = new TagletOutputImpl("<DD><CODE>" + paramName + "</CODE>" 16.50 - + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false)); 16.51 + + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false) + "</DD>"); 16.52 return result; 16.53 } 16.54 16.55 @@ -142,9 +144,9 @@ 16.56 public TagletOutput returnTagOutput(Tag returnTag) { 16.57 TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<DT>" + 16.58 "<STRONG>" + htmlWriter.configuration.getText("doclet.Returns") + 16.59 - "</STRONG>" + "<DD>" + 16.60 + "</STRONG>" + "</DT>" + "<DD>" + 16.61 htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(), 16.62 - false)); 16.63 + false) + "</DD>"); 16.64 return result; 16.65 } 16.66 16.67 @@ -174,22 +176,21 @@ 16.68 } 16.69 if (holder.isClass() && ((ClassDoc)holder).isSerializable()) { 16.70 //Automatically add link to serialized form page for serializable classes. 16.71 - if (!(SerializedFormBuilder.serialInclude(holder) && 16.72 + if ((SerializedFormBuilder.serialInclude(holder) && 16.73 SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) { 16.74 - return result.equals("") ? null : new TagletOutputImpl(result); 16.75 + result = addSeeHeader(result); 16.76 + result += htmlWriter.getHyperLink(htmlWriter.relativePath + "serialized-form.html", 16.77 + ((ClassDoc)holder).qualifiedName(), htmlWriter.configuration.getText("doclet.Serialized_Form"), false); 16.78 } 16.79 - result = addSeeHeader(result); 16.80 - result += htmlWriter.getHyperLink(htmlWriter.relativePath + "serialized-form.html", 16.81 - ((ClassDoc)holder).qualifiedName(), htmlWriter.configuration.getText("doclet.Serialized_Form"), false); 16.82 } 16.83 - return result.equals("") ? null : new TagletOutputImpl(result); 16.84 + return result.equals("") ? null : new TagletOutputImpl(result + "</DD>"); 16.85 } 16.86 16.87 private String addSeeHeader(String result) { 16.88 if (result != null && result.length() > 0) { 16.89 return result + ", " + DocletConstants.NL; 16.90 } else { 16.91 - return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG><DD>"; 16.92 + return "<DT><STRONG>" + htmlWriter.configuration().getText("doclet.See_Also") + "</STRONG></DT><DD>"; 16.93 } 16.94 } 16.95 16.96 @@ -205,7 +206,8 @@ 16.97 } 16.98 result += htmlWriter.commentTagsToString(simpleTags[i], null, simpleTags[i].inlineTags(), false); 16.99 } 16.100 - return new TagletOutputImpl(result + "</DD>" + DocletConstants.NL); 16.101 + result += "</DD>" + DocletConstants.NL; 16.102 + return new TagletOutputImpl(result); 16.103 } 16.104 16.105 /** 16.106 @@ -222,7 +224,7 @@ 16.107 */ 16.108 public TagletOutput getThrowsHeader() { 16.109 return new TagletOutputImpl(DocletConstants.NL + "<DT>" + "<STRONG>" + 16.110 - htmlWriter.configuration().getText("doclet.Throws") + "</STRONG>"); 16.111 + htmlWriter.configuration().getText("doclet.Throws") + "</STRONG></DT>"); 16.112 } 16.113 16.114 /** 16.115 @@ -241,6 +243,7 @@ 16.116 if (text != null && text.toString().length() > 0) { 16.117 result += " - " + text; 16.118 } 16.119 + result += "</DD>"; 16.120 return new TagletOutputImpl(result); 16.121 } 16.122 16.123 @@ -250,7 +253,7 @@ 16.124 public TagletOutput throwsTagOutput(Type throwsType) { 16.125 return new TagletOutputImpl(DocletConstants.NL + "<DD>" + 16.126 htmlWriter.codeText(htmlWriter.getLink( 16.127 - new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER, throwsType)))); 16.128 + new LinkInfoImpl(LinkInfoImpl.CONTEXT_MEMBER, throwsType))) + "</DD>"); 16.129 } 16.130 16.131 /**
17.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java Mon Mar 09 13:34:19 2009 -0700 17.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/TreeWriter.java Mon Mar 09 23:53:41 2009 -0700 17.3 @@ -25,9 +25,11 @@ 17.4 17.5 package com.sun.tools.doclets.formats.html; 17.6 17.7 +import java.io.*; 17.8 + 17.9 +import com.sun.javadoc.*; 17.10 import com.sun.tools.doclets.internal.toolkit.util.*; 17.11 -import com.sun.javadoc.*; 17.12 -import java.io.*; 17.13 + 17.14 /** 17.15 * Generate Class Hierarchy page for all the Classes in this run. Use 17.16 * ClassTree for building the Tree. The name of 17.17 @@ -120,6 +122,7 @@ 17.18 dl(); 17.19 dt(); 17.20 strongText("doclet.Package_Hierarchies"); 17.21 + dtEnd(); 17.22 dd(); 17.23 for (int i = 0; i < packages.length; i++) { 17.24 if (packages[i].name().length() == 0) { 17.25 @@ -131,6 +134,7 @@ 17.26 print(", "); 17.27 } 17.28 } 17.29 + ddEnd(); 17.30 dlEnd(); 17.31 hr(); 17.32 }
18.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Mon Mar 09 13:34:19 2009 -0700 18.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Mon Mar 09 23:53:41 2009 -0700 18.3 @@ -245,6 +245,31 @@ 18.4 } 18.5 18.6 /** 18.7 + * Keep track of member details list. Print the definition list start tag 18.8 + * if it is not printed yet. 18.9 + */ 18.10 + public void printMemberDetailsListStartTag () { 18.11 + if (!getMemberDetailsListPrinted()) { 18.12 + dl(); 18.13 + memberDetailsListPrinted = true; 18.14 + } 18.15 + } 18.16 + 18.17 + /** 18.18 + * Print the definition list end tag if the list start tag was printed. 18.19 + */ 18.20 + public void printMemberDetailsListEndTag () { 18.21 + if (getMemberDetailsListPrinted()) { 18.22 + dlEnd(); 18.23 + memberDetailsListPrinted = false; 18.24 + } 18.25 + } 18.26 + 18.27 + public boolean getMemberDetailsListPrinted() { 18.28 + return memberDetailsListPrinted; 18.29 + } 18.30 + 18.31 + /** 18.32 * Print the frameset version of the Html file header. 18.33 * Called only when generating an HTML frameset file. 18.34 *
19.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Mon Mar 09 13:34:19 2009 -0700 19.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Mon Mar 09 23:53:41 2009 -0700 19.3 @@ -25,9 +25,10 @@ 19.4 19.5 package com.sun.tools.doclets.formats.html.markup; 19.6 19.7 +import java.io.*; 19.8 + 19.9 import com.sun.tools.doclets.internal.toolkit.*; 19.10 import com.sun.tools.doclets.internal.toolkit.util.*; 19.11 -import java.io.*; 19.12 19.13 /** 19.14 * Class for the Html format code generation. 19.15 @@ -61,6 +62,11 @@ 19.16 protected Configuration configuration; 19.17 19.18 /** 19.19 + * The flag to indicate whether a member details list is printed or not. 19.20 + */ 19.21 + protected boolean memberDetailsListPrinted; 19.22 + 19.23 + /** 19.24 * Constructor. 19.25 * 19.26 * @param path The directory path to be created for this file 19.27 @@ -79,6 +85,7 @@ 19.28 super(Util.genWriter(configuration, path, filename, docencoding)); 19.29 this.configuration = configuration; 19.30 htmlFilename = filename; 19.31 + this.memberDetailsListPrinted = false; 19.32 } 19.33 19.34 /** 19.35 @@ -529,7 +536,14 @@ 19.36 } 19.37 19.38 /** 19.39 - * Print <DT> tag. 19.40 + * Print </DT> tag. 19.41 + */ 19.42 + public void dtEnd() { 19.43 + print("</DT>"); 19.44 + } 19.45 + 19.46 + /** 19.47 + * Print <DD> tag. 19.48 */ 19.49 public void dd() { 19.50 print("<DD>");
20.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java Mon Mar 09 13:34:19 2009 -0700 20.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/SerializedFormWriter.java Mon Mar 09 23:53:41 2009 -0700 20.3 @@ -25,8 +25,9 @@ 20.4 20.5 package com.sun.tools.doclets.internal.toolkit; 20.6 20.7 +import java.io.*; 20.8 + 20.9 import com.sun.javadoc.*; 20.10 -import java.io.*; 20.11 20.12 /** 20.13 * The interface for writing serialized form output. 20.14 @@ -147,22 +148,27 @@ 20.15 String fieldDimensions, String fieldName); 20.16 20.17 /** 20.18 + * Write the member footer. 20.19 + */ 20.20 + public void writeMemberFooter(); 20.21 + 20.22 + /** 20.23 + * Check to see if overview details should be printed. If 20.24 + * nocomment option set or if there is no text to be printed 20.25 + * for deprecation info, inline comment or tags, 20.26 + * do not print overview details. 20.27 + * 20.28 + * @param field the field to check overview details for. 20.29 + * @return true if overview details need to be printed 20.30 + */ 20.31 + public boolean shouldPrintOverview(FieldDoc field); 20.32 + 20.33 + /** 20.34 * Write the footer. 20.35 * 20.36 - * @param member the member to write the header for. 20.37 + * @param heading the heading that was written. 20.38 */ 20.39 - public void writeMemberFooter(FieldDoc member); 20.40 - 20.41 - /** 20.42 - * Check to see if member details should be printed. If 20.43 - * nocomment option set or if there is no text to be printed 20.44 - * for deprecation info, inline comment, no serial tag or inline tags, 20.45 - * do not print member details. 20.46 - * 20.47 - * @param member the member to check details for. 20.48 - * @return true if details need to be printed 20.49 - */ 20.50 - public boolean shouldPrintMemberDetails(FieldDoc member); 20.51 + public void writeFooter (String heading); 20.52 } 20.53 20.54 /** 20.55 @@ -193,10 +199,8 @@ 20.56 20.57 /** 20.58 * Write the footer. 20.59 - * 20.60 - * @param member the member to write the header for. 20.61 */ 20.62 - public void writeMemberFooter(MethodDoc member); 20.63 + public void writeMemberFooter(); 20.64 20.65 /** 20.66 * Write the deprecated information for this member.
21.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java Mon Mar 09 13:34:19 2009 -0700 21.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/builders/SerializedFormBuilder.java Mon Mar 09 23:53:41 2009 -0700 21.3 @@ -25,13 +25,14 @@ 21.4 21.5 package com.sun.tools.doclets.internal.toolkit.builders; 21.6 21.7 -import com.sun.tools.doclets.internal.toolkit.util.*; 21.8 -import com.sun.tools.doclets.internal.toolkit.*; 21.9 -import com.sun.javadoc.*; 21.10 import java.io.*; 21.11 import java.lang.reflect.*; 21.12 import java.util.*; 21.13 21.14 +import com.sun.javadoc.*; 21.15 +import com.sun.tools.doclets.internal.toolkit.util.*; 21.16 +import com.sun.tools.doclets.internal.toolkit.*; 21.17 + 21.18 /** 21.19 * Builds the serialized form. 21.20 * 21.21 @@ -40,6 +41,7 @@ 21.22 * Do not use it as an API 21.23 * 21.24 * @author Jamie Ho 21.25 + * @author Bhavesh Patel (Modified) 21.26 * @since 1.5 21.27 */ 21.28 public class SerializedFormBuilder extends AbstractBuilder { 21.29 @@ -379,7 +381,7 @@ 21.30 * Build the method footer. 21.31 */ 21.32 public void buildMethodFooter() { 21.33 - methodWriter.writeMemberFooter((MethodDoc) currentMember); 21.34 + methodWriter.writeMemberFooter(); 21.35 } 21.36 21.37 /** 21.38 @@ -405,15 +407,18 @@ 21.39 Util.asList(classDoc.serializableFields()).get(0); 21.40 // Check to see if there are inline comments, tags or deprecation 21.41 // information to be printed. 21.42 - if (fieldWriter.shouldPrintMemberDetails(serialPersistentField)) { 21.43 + if (fieldWriter.shouldPrintOverview(serialPersistentField)) { 21.44 fieldWriter.writeHeader( 21.45 - configuration.getText("doclet.Serialized_Form_class")); 21.46 + configuration.getText("doclet.Serialized_Form_class")); 21.47 fieldWriter.writeMemberDeprecatedInfo(serialPersistentField); 21.48 if (!configuration.nocomment) { 21.49 fieldWriter.writeMemberDescription(serialPersistentField); 21.50 fieldWriter.writeMemberTags(serialPersistentField); 21.51 } 21.52 - fieldWriter.writeMemberFooter(serialPersistentField); 21.53 + // Footer required to close the definition list tag 21.54 + // for serialization overview. 21.55 + fieldWriter.writeFooter( 21.56 + configuration.getText("doclet.Serialized_Form_class")); 21.57 } 21.58 } 21.59 } 21.60 @@ -476,11 +481,11 @@ 21.61 } 21.62 21.63 /** 21.64 - * Build the field footer. 21.65 + * Build the field sub footer. 21.66 */ 21.67 - public void buildFieldFooter() { 21.68 + public void buildFieldSubFooter() { 21.69 if (! currentClass.definesSerializableFields()) { 21.70 - fieldWriter.writeMemberFooter((FieldDoc) currentMember); 21.71 + fieldWriter.writeMemberFooter(); 21.72 } 21.73 } 21.74
22.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml Mon Mar 09 13:34:19 2009 -0700 22.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/resources/doclet.xml Mon Mar 09 23:53:41 2009 -0700 22.3 @@ -1,205 +1,205 @@ 22.4 -<?xml version='1.0' encoding='utf-8'?> 22.5 - 22.6 -<!-- 22.7 +<?xml version='1.0' encoding='utf-8'?> 22.8 + 22.9 +<!-- 22.10 Copyright 2003-2009 Sun Microsystems, Inc. All Rights Reserved. 22.11 - DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.12 - 22.13 - This code is free software; you can redistribute it and/or modify it 22.14 - under the terms of the GNU General Public License version 2 only, as 22.15 - published by the Free Software Foundation. Sun designates this 22.16 - particular file as subject to the "Classpath" exception as provided 22.17 - by Sun in the LICENSE file that accompanied this code. 22.18 - 22.19 - This code is distributed in the hope that it will be useful, but WITHOUT 22.20 - ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 22.21 - FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 22.22 - version 2 for more details (a copy is included in the LICENSE file that 22.23 - accompanied this code). 22.24 - 22.25 - You should have received a copy of the GNU General Public License version 22.26 - 2 along with this work; if not, write to the Free Software Foundation, 22.27 - Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 22.28 - 22.29 - Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 22.30 - CA 95054 USA or visit www.sun.com if you need additional information or 22.31 - have any questions. 22.32 ---> 22.33 - 22.34 - 22.35 -<Doclet> 22.36 - 22.37 - <PackageDoc> 22.38 - <PackageHeader/> 22.39 - <Summary> 22.40 - <SummaryHeader/> 22.41 - <InterfaceSummary/> 22.42 - <ClassSummary/> 22.43 - <EnumSummary/> 22.44 - <ExceptionSummary/> 22.45 - <ErrorSummary/> 22.46 - <AnnotationTypeSummary/> 22.47 - <SummaryFooter/> 22.48 - </Summary> 22.49 - <PackageDescription/> 22.50 - <PackageTags/> 22.51 - <PackageFooter/> 22.52 - </PackageDoc> 22.53 - 22.54 - <AnnotationTypeDoc> 22.55 - <AnnotationTypeHeader/> 22.56 - <DeprecationInfo/> 22.57 - <AnnotationTypeSignature/> 22.58 - <AnnotationTypeDescription/> 22.59 - <AnnotationTypeTagInfo/> 22.60 - <MemberSummary> 22.61 - <AnnotationTypeRequiredMemberSummary/> 22.62 - <AnnotationTypeOptionalMemberSummary/> 22.63 - </MemberSummary> 22.64 - <AnnotationTypeRequiredMemberDetails> 22.65 - <Header/> 22.66 - <AnnotationTypeRequiredMember> 22.67 - <MemberHeader/> 22.68 - <Signature/> 22.69 - <DeprecationInfo/> 22.70 - <MemberComments/> 22.71 - <TagInfo/> 22.72 - <MemberFooter/> 22.73 - </AnnotationTypeRequiredMember> 22.74 - </AnnotationTypeRequiredMemberDetails> 22.75 - <AnnotationTypeOptionalMemberDetails> 22.76 - <AnnotationTypeOptionalMember> 22.77 - <MemberHeader/> 22.78 - <Signature/> 22.79 - <DeprecationInfo/> 22.80 - <MemberComments/> 22.81 - <TagInfo/> 22.82 - <DefaultValueInfo/> 22.83 - <MemberFooter/> 22.84 - </AnnotationTypeOptionalMember> 22.85 - <Footer/> 22.86 - </AnnotationTypeOptionalMemberDetails> 22.87 - <AnnotationTypeFooter/> 22.88 - </AnnotationTypeDoc> 22.89 - 22.90 - <ClassDoc> 22.91 - <ClassHeader/> 22.92 - <ClassTree/> 22.93 - <TypeParamInfo/> 22.94 - <SuperInterfacesInfo/> 22.95 - <ImplementedInterfacesInfo/> 22.96 - <SubClassInfo/> 22.97 - <SubInterfacesInfo/> 22.98 - <InterfaceUsageInfo/> 22.99 - <NestedClassInfo/> 22.100 - <DeprecationInfo/> 22.101 - <ClassSignature/> 22.102 - <ClassDescription/> 22.103 - <ClassTagInfo/> 22.104 - <MemberSummary> 22.105 - <NestedClassesSummary/> 22.106 - <NestedClassesInheritedSummary/> 22.107 - <EnumConstantsSummary/> 22.108 - <FieldsSummary/> 22.109 - <FieldsInheritedSummary/> 22.110 - <ConstructorsSummary/> 22.111 - <MethodsSummary/> 22.112 - <MethodsInheritedSummary/> 22.113 - </MemberSummary> 22.114 - <EnumConstantsDetails> 22.115 - <Header/> 22.116 - <EnumConstant> 22.117 - <EnumConstantHeader/> 22.118 - <Signature/> 22.119 - <DeprecationInfo/> 22.120 - <EnumConstantComments/> 22.121 - <TagInfo/> 22.122 - <EnumConstantFooter/> 22.123 - </EnumConstant> 22.124 - <Footer/> 22.125 - </EnumConstantsDetails> 22.126 - <FieldDetails> 22.127 - <Header/> 22.128 - <FieldDoc> 22.129 - <FieldHeader/> 22.130 - <Signature/> 22.131 - <DeprecationInfo/> 22.132 - <FieldComments/> 22.133 - <TagInfo/> 22.134 - <FieldFooter/> 22.135 - </FieldDoc> 22.136 - <Footer/> 22.137 - </FieldDetails> 22.138 - <ConstructorDetails> 22.139 - <Header/> 22.140 - <ConstructorDoc> 22.141 - <ConstructorHeader/> 22.142 - <Signature/> 22.143 - <DeprecationInfo/> 22.144 - <ConstructorComments/> 22.145 - <TagInfo/> 22.146 - <ConstructorFooter/> 22.147 - </ConstructorDoc> 22.148 - <Footer/> 22.149 - </ConstructorDetails> 22.150 - <MethodDetails> 22.151 - <Header/> 22.152 - <MethodDoc> 22.153 - <MethodHeader/> 22.154 - <Signature/> 22.155 - <DeprecationInfo/> 22.156 - <MethodComments/> 22.157 - <TagInfo/> 22.158 - <MethodFooter/> 22.159 - </MethodDoc> 22.160 - <Footer/> 22.161 - </MethodDetails> 22.162 - <ClassFooter/> 22.163 - </ClassDoc> 22.164 - 22.165 - <ConstantSummary> 22.166 - <Header/> 22.167 - <Contents/> 22.168 - <ConstantSummaries> 22.169 - <PackageConstantSummary> 22.170 - <PackageHeader/> 22.171 - <ClassConstantSummary> 22.172 - <ClassHeader/> 22.173 - <ConstantMembers/> 22.174 - <ClassFooter/> 22.175 - </ClassConstantSummary> 22.176 - </PackageConstantSummary> 22.177 - </ConstantSummaries> 22.178 - <Footer/> 22.179 - </ConstantSummary> 22.180 - 22.181 - <SerializedForm> 22.182 - <Header/> 22.183 - <SerializedFormSummaries> 22.184 - <PackageSerializedForm> 22.185 - <PackageHeader/> 22.186 - <ClassSerializedForm> 22.187 - <ClassHeader/> 22.188 - <SerialUIDInfo/> 22.189 - <MethodHeader/> 22.190 - <SerializableMethods> 22.191 - <MethodSubHeader/> 22.192 - <DeprecatedMethodInfo/> 22.193 - <MethodInfo> 22.194 - <MethodDescription/> 22.195 - <MethodTags/> 22.196 - </MethodInfo> 22.197 - <MethodFooter/> 22.198 - </SerializableMethods> 22.199 - <FieldHeader/> 22.200 - <SerializableFields> 22.201 - <FieldSubHeader/> 22.202 - <FieldDeprecationInfo/> 22.203 - <FieldInfo/> 22.204 - <FieldFooter/> 22.205 - </SerializableFields> 22.206 - </ClassSerializedForm> 22.207 - </PackageSerializedForm> 22.208 - </SerializedFormSummaries> 22.209 - <Footer/> 22.210 - </SerializedForm> 22.211 -</Doclet> 22.212 + DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 22.213 + 22.214 + This code is free software; you can redistribute it and/or modify it 22.215 + under the terms of the GNU General Public License version 2 only, as 22.216 + published by the Free Software Foundation. Sun designates this 22.217 + particular file as subject to the "Classpath" exception as provided 22.218 + by Sun in the LICENSE file that accompanied this code. 22.219 + 22.220 + This code is distributed in the hope that it will be useful, but WITHOUT 22.221 + ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 22.222 + FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 22.223 + version 2 for more details (a copy is included in the LICENSE file that 22.224 + accompanied this code). 22.225 + 22.226 + You should have received a copy of the GNU General Public License version 22.227 + 2 along with this work; if not, write to the Free Software Foundation, 22.228 + Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 22.229 + 22.230 + Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 22.231 + CA 95054 USA or visit www.sun.com if you need additional information or 22.232 + have any questions. 22.233 +--> 22.234 + 22.235 + 22.236 +<Doclet> 22.237 + 22.238 + <PackageDoc> 22.239 + <PackageHeader/> 22.240 + <Summary> 22.241 + <SummaryHeader/> 22.242 + <InterfaceSummary/> 22.243 + <ClassSummary/> 22.244 + <EnumSummary/> 22.245 + <ExceptionSummary/> 22.246 + <ErrorSummary/> 22.247 + <AnnotationTypeSummary/> 22.248 + <SummaryFooter/> 22.249 + </Summary> 22.250 + <PackageDescription/> 22.251 + <PackageTags/> 22.252 + <PackageFooter/> 22.253 + </PackageDoc> 22.254 + 22.255 + <AnnotationTypeDoc> 22.256 + <AnnotationTypeHeader/> 22.257 + <DeprecationInfo/> 22.258 + <AnnotationTypeSignature/> 22.259 + <AnnotationTypeDescription/> 22.260 + <AnnotationTypeTagInfo/> 22.261 + <MemberSummary> 22.262 + <AnnotationTypeRequiredMemberSummary/> 22.263 + <AnnotationTypeOptionalMemberSummary/> 22.264 + </MemberSummary> 22.265 + <AnnotationTypeRequiredMemberDetails> 22.266 + <Header/> 22.267 + <AnnotationTypeRequiredMember> 22.268 + <MemberHeader/> 22.269 + <Signature/> 22.270 + <DeprecationInfo/> 22.271 + <MemberComments/> 22.272 + <TagInfo/> 22.273 + <MemberFooter/> 22.274 + </AnnotationTypeRequiredMember> 22.275 + </AnnotationTypeRequiredMemberDetails> 22.276 + <AnnotationTypeOptionalMemberDetails> 22.277 + <AnnotationTypeOptionalMember> 22.278 + <MemberHeader/> 22.279 + <Signature/> 22.280 + <DeprecationInfo/> 22.281 + <MemberComments/> 22.282 + <TagInfo/> 22.283 + <DefaultValueInfo/> 22.284 + <MemberFooter/> 22.285 + </AnnotationTypeOptionalMember> 22.286 + <Footer/> 22.287 + </AnnotationTypeOptionalMemberDetails> 22.288 + <AnnotationTypeFooter/> 22.289 + </AnnotationTypeDoc> 22.290 + 22.291 + <ClassDoc> 22.292 + <ClassHeader/> 22.293 + <ClassTree/> 22.294 + <TypeParamInfo/> 22.295 + <SuperInterfacesInfo/> 22.296 + <ImplementedInterfacesInfo/> 22.297 + <SubClassInfo/> 22.298 + <SubInterfacesInfo/> 22.299 + <InterfaceUsageInfo/> 22.300 + <NestedClassInfo/> 22.301 + <DeprecationInfo/> 22.302 + <ClassSignature/> 22.303 + <ClassDescription/> 22.304 + <ClassTagInfo/> 22.305 + <MemberSummary> 22.306 + <NestedClassesSummary/> 22.307 + <NestedClassesInheritedSummary/> 22.308 + <EnumConstantsSummary/> 22.309 + <FieldsSummary/> 22.310 + <FieldsInheritedSummary/> 22.311 + <ConstructorsSummary/> 22.312 + <MethodsSummary/> 22.313 + <MethodsInheritedSummary/> 22.314 + </MemberSummary> 22.315 + <EnumConstantsDetails> 22.316 + <Header/> 22.317 + <EnumConstant> 22.318 + <EnumConstantHeader/> 22.319 + <Signature/> 22.320 + <DeprecationInfo/> 22.321 + <EnumConstantComments/> 22.322 + <TagInfo/> 22.323 + <EnumConstantFooter/> 22.324 + </EnumConstant> 22.325 + <Footer/> 22.326 + </EnumConstantsDetails> 22.327 + <FieldDetails> 22.328 + <Header/> 22.329 + <FieldDoc> 22.330 + <FieldHeader/> 22.331 + <Signature/> 22.332 + <DeprecationInfo/> 22.333 + <FieldComments/> 22.334 + <TagInfo/> 22.335 + <FieldFooter/> 22.336 + </FieldDoc> 22.337 + <Footer/> 22.338 + </FieldDetails> 22.339 + <ConstructorDetails> 22.340 + <Header/> 22.341 + <ConstructorDoc> 22.342 + <ConstructorHeader/> 22.343 + <Signature/> 22.344 + <DeprecationInfo/> 22.345 + <ConstructorComments/> 22.346 + <TagInfo/> 22.347 + <ConstructorFooter/> 22.348 + </ConstructorDoc> 22.349 + <Footer/> 22.350 + </ConstructorDetails> 22.351 + <MethodDetails> 22.352 + <Header/> 22.353 + <MethodDoc> 22.354 + <MethodHeader/> 22.355 + <Signature/> 22.356 + <DeprecationInfo/> 22.357 + <MethodComments/> 22.358 + <TagInfo/> 22.359 + <MethodFooter/> 22.360 + </MethodDoc> 22.361 + <Footer/> 22.362 + </MethodDetails> 22.363 + <ClassFooter/> 22.364 + </ClassDoc> 22.365 + 22.366 + <ConstantSummary> 22.367 + <Header/> 22.368 + <Contents/> 22.369 + <ConstantSummaries> 22.370 + <PackageConstantSummary> 22.371 + <PackageHeader/> 22.372 + <ClassConstantSummary> 22.373 + <ClassHeader/> 22.374 + <ConstantMembers/> 22.375 + <ClassFooter/> 22.376 + </ClassConstantSummary> 22.377 + </PackageConstantSummary> 22.378 + </ConstantSummaries> 22.379 + <Footer/> 22.380 + </ConstantSummary> 22.381 + 22.382 + <SerializedForm> 22.383 + <Header/> 22.384 + <SerializedFormSummaries> 22.385 + <PackageSerializedForm> 22.386 + <PackageHeader/> 22.387 + <ClassSerializedForm> 22.388 + <ClassHeader/> 22.389 + <SerialUIDInfo/> 22.390 + <MethodHeader/> 22.391 + <SerializableMethods> 22.392 + <MethodSubHeader/> 22.393 + <DeprecatedMethodInfo/> 22.394 + <MethodInfo> 22.395 + <MethodDescription/> 22.396 + <MethodTags/> 22.397 + </MethodInfo> 22.398 + <MethodFooter/> 22.399 + </SerializableMethods> 22.400 + <FieldHeader/> 22.401 + <SerializableFields> 22.402 + <FieldSubHeader/> 22.403 + <FieldDeprecationInfo/> 22.404 + <FieldInfo/> 22.405 + <FieldSubFooter/> 22.406 + </SerializableFields> 22.407 + </ClassSerializedForm> 22.408 + </PackageSerializedForm> 22.409 + </SerializedFormSummaries> 22.410 + <Footer/> 22.411 + </SerializedForm> 22.412 +</Doclet>
23.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 23.2 +++ b/src/share/classes/com/sun/tools/javac/code/Printer.java Mon Mar 09 23:53:41 2009 -0700 23.3 @@ -0,0 +1,324 @@ 23.4 +/* 23.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 23.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 23.7 + * 23.8 + * This code is free software; you can redistribute it and/or modify it 23.9 + * under the terms of the GNU General Public License version 2 only, as 23.10 + * published by the Free Software Foundation. Sun designates this 23.11 + * particular file as subject to the "Classpath" exception as provided 23.12 + * by Sun in the LICENSE file that accompanied this code. 23.13 + * 23.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 23.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 23.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 23.17 + * version 2 for more details (a copy is included in the LICENSE file that 23.18 + * accompanied this code). 23.19 + * 23.20 + * You should have received a copy of the GNU General Public License version 23.21 + * 2 along with this work; if not, write to the Free Software Foundation, 23.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 23.23 + * 23.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 23.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 23.26 + * have any questions. 23.27 + */ 23.28 + 23.29 +package com.sun.tools.javac.code; 23.30 + 23.31 +import java.util.Locale; 23.32 + 23.33 +import com.sun.tools.javac.api.Messages; 23.34 +import com.sun.tools.javac.code.Type.*; 23.35 +import com.sun.tools.javac.code.Symbol.*; 23.36 +import com.sun.tools.javac.util.List; 23.37 +import com.sun.tools.javac.util.ListBuffer; 23.38 + 23.39 +import static com.sun.tools.javac.code.TypeTags.*; 23.40 +import static com.sun.tools.javac.code.BoundKind.*; 23.41 +import static com.sun.tools.javac.code.Flags.*; 23.42 + 23.43 +/** 23.44 + * A combined type/symbol visitor for generating non-trivial localized string 23.45 + * representation of types and symbols. 23.46 + */ 23.47 +public abstract class Printer implements Type.Visitor<String, Locale>, Symbol.Visitor<String, Locale> { 23.48 + 23.49 + /** 23.50 + * This method should be overriden in order to provide proper i18n support. 23.51 + * 23.52 + * @param locale the locale in which the string is to be rendered 23.53 + * @param key the key corresponding to the message to be displayed 23.54 + * @param args a list of optional arguments 23.55 + * @return localized string representation 23.56 + */ 23.57 + protected abstract String localize(Locale locale, String key, Object... args); 23.58 + 23.59 + /** 23.60 + * Create a printer with default i18n support provided my Messages. 23.61 + * @param messages Messages class to be used for i18n 23.62 + * @return printer visitor instance 23.63 + */ 23.64 + public static Printer createStandardPrinter(final Messages messages) { 23.65 + return new Printer() { 23.66 + @Override 23.67 + protected String localize(Locale locale, String key, Object... args) { 23.68 + return messages.getLocalizedString(locale, key, args); 23.69 + }}; 23.70 + } 23.71 + 23.72 + /** 23.73 + * Get a localized string representation for all the types in the input list. 23.74 + * 23.75 + * @param ts types to be displayed 23.76 + * @param locale the locale in which the string is to be rendered 23.77 + * @return localized string representation 23.78 + */ 23.79 + public String visitTypes(List<Type> ts, Locale locale) { 23.80 + ListBuffer<String> sbuf = ListBuffer.lb(); 23.81 + for (Type t : ts) { 23.82 + sbuf.append(visit(t, locale)); 23.83 + } 23.84 + return sbuf.toList().toString(); 23.85 + } 23.86 + 23.87 + /** 23.88 + * * Get a localized string represenation for all the symbols in the input list. 23.89 + * 23.90 + * @param ts symbols to be displayed 23.91 + * @param locale the locale in which the string is to be rendered 23.92 + * @return localized string representation 23.93 + */ 23.94 + public String visitSymbols(List<Symbol> ts, Locale locale) { 23.95 + ListBuffer<String> sbuf = ListBuffer.lb(); 23.96 + for (Symbol t : ts) { 23.97 + sbuf.append(visit(t, locale)); 23.98 + } 23.99 + return sbuf.toList().toString(); 23.100 + } 23.101 + 23.102 + /** 23.103 + * Get a localized string represenation for a given type. 23.104 + * 23.105 + * @param ts type to be displayed 23.106 + * @param locale the locale in which the string is to be rendered 23.107 + * @return localized string representation 23.108 + */ 23.109 + public String visit(Type t, Locale locale) { 23.110 + return t.accept(this, locale); 23.111 + } 23.112 + 23.113 + /** 23.114 + * Get a localized string represenation for a given symbol. 23.115 + * 23.116 + * @param ts symbol to be displayed 23.117 + * @param locale the locale in which the string is to be rendered 23.118 + * @return localized string representation 23.119 + */ 23.120 + public String visit(Symbol s, Locale locale) { 23.121 + return s.accept(this, locale); 23.122 + } 23.123 + 23.124 + @Override 23.125 + public String visitCapturedType(CapturedType t, Locale locale) { 23.126 + return localize(locale, "compiler.misc.type.captureof", 23.127 + (t.hashCode() & 0xFFFFFFFFL) % Type.CapturedType.PRIME, 23.128 + visit(t.wildcard, locale)); 23.129 + } 23.130 + 23.131 + @Override 23.132 + public String visitForAll(ForAll t, Locale locale) { 23.133 + return "<" + visitTypes(t.tvars, locale) + ">" + visit(t.qtype, locale); 23.134 + } 23.135 + 23.136 + @Override 23.137 + public String visitUndetVar(UndetVar t, Locale locale) { 23.138 + if (t.inst != null) { 23.139 + return visit(t.inst, locale); 23.140 + } else { 23.141 + return visit(t.qtype, locale) + "?"; 23.142 + } 23.143 + } 23.144 + 23.145 + @Override 23.146 + public String visitArrayType(ArrayType t, Locale locale) { 23.147 + return visit(t.elemtype, locale) + "[]"; 23.148 + } 23.149 + 23.150 + @Override 23.151 + public String visitClassType(ClassType t, Locale locale) { 23.152 + StringBuffer buf = new StringBuffer(); 23.153 + if (t.getEnclosingType().tag == CLASS && t.tsym.owner.kind == Kinds.TYP) { 23.154 + buf.append(visit(t.getEnclosingType(), locale)); 23.155 + buf.append("."); 23.156 + buf.append(className(t, false, locale)); 23.157 + } else { 23.158 + buf.append(className(t, true, locale)); 23.159 + } 23.160 + if (t.getTypeArguments().nonEmpty()) { 23.161 + buf.append('<'); 23.162 + buf.append(visitTypes(t.getTypeArguments(), locale)); 23.163 + buf.append(">"); 23.164 + } 23.165 + return buf.toString(); 23.166 + } 23.167 + 23.168 + @Override 23.169 + public String visitMethodType(MethodType t, Locale locale) { 23.170 + return "(" + printMethodArgs(t.argtypes, false, locale) + ")" + visit(t.restype, locale); 23.171 + } 23.172 + 23.173 + @Override 23.174 + public String visitPackageType(PackageType t, Locale locale) { 23.175 + return t.tsym.getQualifiedName().toString(); 23.176 + } 23.177 + 23.178 + @Override 23.179 + public String visitWildcardType(WildcardType t, Locale locale) { 23.180 + StringBuffer s = new StringBuffer(); 23.181 + s.append(t.kind); 23.182 + if (t.kind != UNBOUND) { 23.183 + s.append(visit(t.type, locale)); 23.184 + } 23.185 + return s.toString(); 23.186 + } 23.187 + 23.188 + @Override 23.189 + public String visitErrorType(ErrorType t, Locale locale) { 23.190 + return visitType(t, locale); 23.191 + } 23.192 + 23.193 + @Override 23.194 + public String visitTypeVar(TypeVar t, Locale locale) { 23.195 + return visitType(t, locale); 23.196 + } 23.197 + 23.198 + public String visitType(Type t, Locale locale) { 23.199 + String s = (t.tsym == null || t.tsym.name == null) 23.200 + ? localize(locale, "compiler.misc.type.none") 23.201 + : t.tsym.name.toString(); 23.202 + return s; 23.203 + } 23.204 + 23.205 + /** 23.206 + * Converts a class name into a (possibly localized) string. Anonymous 23.207 + * inner classes gets converted into a localized string. 23.208 + * 23.209 + * @param t the type of the class whose name is to be rendered 23.210 + * @param longform if set, the class' fullname is displayed - if unset the 23.211 + * short name is chosen (w/o package) 23.212 + * @param locale the locale in which the string is to be rendered 23.213 + * @return localized string representation 23.214 + */ 23.215 + protected String className(ClassType t, boolean longform, Locale locale) { 23.216 + Symbol sym = t.tsym; 23.217 + if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) { 23.218 + StringBuffer s = new StringBuffer(visit(t.supertype_field, locale)); 23.219 + for (List<Type> is = t.interfaces_field; is.nonEmpty(); is = is.tail) { 23.220 + s.append("&"); 23.221 + s.append(visit(is.head, locale)); 23.222 + } 23.223 + return s.toString(); 23.224 + } else if (sym.name.length() == 0) { 23.225 + String s; 23.226 + ClassType norm = (ClassType) t.tsym.type; 23.227 + if (norm == null) { 23.228 + s = localize(locale, "compiler.misc.anonymous.class", (Object) null); 23.229 + } else if (norm.interfaces_field.nonEmpty()) { 23.230 + s = localize(locale, "compiler.misc.anonymous.class", 23.231 + visit(norm.interfaces_field.head, locale)); 23.232 + } else { 23.233 + s = localize(locale, "compiler.misc.anonymous.class", 23.234 + visit(norm.supertype_field, locale)); 23.235 + } 23.236 + return s; 23.237 + } else if (longform) { 23.238 + return sym.getQualifiedName().toString(); 23.239 + } else { 23.240 + return sym.name.toString(); 23.241 + } 23.242 + } 23.243 + 23.244 + /** 23.245 + * Converts a set of method argument types into their corresponding 23.246 + * localized string representation. 23.247 + * 23.248 + * @param args arguments to be rendered 23.249 + * @param varArgs if true, the last method argument is regarded as a vararg 23.250 + * @param locale the locale in which the string is to be rendered 23.251 + * @return localized string representation 23.252 + */ 23.253 + protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) { 23.254 + if (!varArgs) { 23.255 + return visitTypes(args, locale); 23.256 + } else { 23.257 + StringBuffer buf = new StringBuffer(); 23.258 + while (args.tail.nonEmpty()) { 23.259 + buf.append(visit(args.head, locale)); 23.260 + args = args.tail; 23.261 + buf.append(','); 23.262 + } 23.263 + if (args.head.tag == ARRAY) { 23.264 + buf.append(visit(((ArrayType) args.head).elemtype, locale)); 23.265 + buf.append("..."); 23.266 + } else { 23.267 + buf.append(visit(args.head, locale)); 23.268 + } 23.269 + return buf.toString(); 23.270 + } 23.271 + } 23.272 + 23.273 + @Override 23.274 + public String visitClassSymbol(ClassSymbol sym, Locale locale) { 23.275 + return sym.name.isEmpty() 23.276 + ? localize(locale, "compiler.misc.anonymous.class", sym.flatname) 23.277 + : sym.fullname.toString(); 23.278 + } 23.279 + 23.280 + @Override 23.281 + public String visitMethodSymbol(MethodSymbol s, Locale locale) { 23.282 + if ((s.flags() & BLOCK) != 0) { 23.283 + return s.owner.name.toString(); 23.284 + } else { 23.285 + String ms = (s.name == s.name.table.names.init) 23.286 + ? s.owner.name.toString() 23.287 + : s.name.toString(); 23.288 + if (s.type != null) { 23.289 + if (s.type.tag == FORALL) { 23.290 + ms = "<" + visitTypes(s.type.getTypeArguments(), locale) + ">" + ms; 23.291 + } 23.292 + ms += "(" + printMethodArgs( 23.293 + s.type.getParameterTypes(), 23.294 + (s.flags() & VARARGS) != 0, 23.295 + locale) + ")"; 23.296 + } 23.297 + return ms; 23.298 + } 23.299 + } 23.300 + 23.301 + @Override 23.302 + public String visitOperatorSymbol(OperatorSymbol s, Locale locale) { 23.303 + return visitMethodSymbol(s, locale); 23.304 + } 23.305 + 23.306 + @Override 23.307 + public String visitPackageSymbol(PackageSymbol s, Locale locale) { 23.308 + return s.isUnnamed() 23.309 + ? localize(locale, "compiler.misc.unnamed.package") 23.310 + : s.fullname.toString(); 23.311 + } 23.312 + 23.313 + @Override 23.314 + public String visitTypeSymbol(TypeSymbol s, Locale locale) { 23.315 + return visitSymbol(s, locale); 23.316 + } 23.317 + 23.318 + @Override 23.319 + public String visitVarSymbol(VarSymbol s, Locale locale) { 23.320 + return visitSymbol(s, locale); 23.321 + } 23.322 + 23.323 + @Override 23.324 + public String visitSymbol(Symbol s, Locale locale) { 23.325 + return s.name.toString(); 23.326 + } 23.327 +}
24.1 --- a/src/share/classes/com/sun/tools/javac/code/Types.java Mon Mar 09 13:34:19 2009 -0700 24.2 +++ b/src/share/classes/com/sun/tools/javac/code/Types.java Mon Mar 09 23:53:41 2009 -0700 24.3 @@ -27,6 +27,8 @@ 24.4 24.5 import java.util.*; 24.6 24.7 +import com.sun.tools.javac.api.Messages; 24.8 + 24.9 import com.sun.tools.javac.util.*; 24.10 import com.sun.tools.javac.util.List; 24.11 24.12 @@ -1010,8 +1012,8 @@ 24.13 && !disjointTypes(aHigh.allparams(), lowSub.allparams()) 24.14 && !disjointTypes(aLow.allparams(), highSub.allparams()) 24.15 && !disjointTypes(aLow.allparams(), lowSub.allparams())) { 24.16 - if (upcast ? giveWarning(a, highSub) || giveWarning(a, lowSub) 24.17 - : giveWarning(highSub, a) || giveWarning(lowSub, a)) 24.18 + if (upcast ? giveWarning(a, b) : 24.19 + giveWarning(b, a)) 24.20 warnStack.head.warnUnchecked(); 24.21 return true; 24.22 } 24.23 @@ -2019,7 +2021,7 @@ 24.24 return t; 24.25 else 24.26 return visit(t); 24.27 - } 24.28 + } 24.29 24.30 List<Type> subst(List<Type> ts) { 24.31 if (from.tail == null) 24.32 @@ -2279,225 +2281,21 @@ 24.33 } 24.34 // </editor-fold> 24.35 24.36 - // <editor-fold defaultstate="collapsed" desc="printType"> 24.37 /** 24.38 - * Visitor for generating a string representation of a given type 24.39 + * Helper method for generating a string representation of a given type 24.40 * accordingly to a given locale 24.41 */ 24.42 public String toString(Type t, Locale locale) { 24.43 - return typePrinter.visit(t, locale); 24.44 + return Printer.createStandardPrinter(messages).visit(t, locale); 24.45 } 24.46 - // where 24.47 - private TypePrinter typePrinter = new TypePrinter(); 24.48 24.49 - public class TypePrinter extends DefaultTypeVisitor<String, Locale> { 24.50 - 24.51 - public String visit(List<Type> ts, Locale locale) { 24.52 - ListBuffer<String> sbuf = lb(); 24.53 - for (Type t : ts) { 24.54 - sbuf.append(visit(t, locale)); 24.55 - } 24.56 - return sbuf.toList().toString(); 24.57 - } 24.58 - 24.59 - @Override 24.60 - public String visitCapturedType(CapturedType t, Locale locale) { 24.61 - return messages.getLocalizedString("compiler.misc.type.captureof", 24.62 - (t.hashCode() & 0xFFFFFFFFL) % Type.CapturedType.PRIME, 24.63 - visit(t.wildcard, locale)); 24.64 - } 24.65 - 24.66 - @Override 24.67 - public String visitForAll(ForAll t, Locale locale) { 24.68 - return "<" + visit(t.tvars, locale) + ">" + visit(t.qtype, locale); 24.69 - } 24.70 - 24.71 - @Override 24.72 - public String visitUndetVar(UndetVar t, Locale locale) { 24.73 - if (t.inst != null) { 24.74 - return visit(t.inst, locale); 24.75 - } else { 24.76 - return visit(t.qtype, locale) + "?"; 24.77 - } 24.78 - } 24.79 - 24.80 - @Override 24.81 - public String visitArrayType(ArrayType t, Locale locale) { 24.82 - return visit(t.elemtype, locale) + "[]"; 24.83 - } 24.84 - 24.85 - @Override 24.86 - public String visitClassType(ClassType t, Locale locale) { 24.87 - StringBuffer buf = new StringBuffer(); 24.88 - if (t.getEnclosingType().tag == CLASS && t.tsym.owner.kind == Kinds.TYP) { 24.89 - buf.append(visit(t.getEnclosingType(), locale)); 24.90 - buf.append("."); 24.91 - buf.append(className(t, false, locale)); 24.92 - } else { 24.93 - buf.append(className(t, true, locale)); 24.94 - } 24.95 - if (t.getTypeArguments().nonEmpty()) { 24.96 - buf.append('<'); 24.97 - buf.append(visit(t.getTypeArguments(), locale)); 24.98 - buf.append(">"); 24.99 - } 24.100 - return buf.toString(); 24.101 - } 24.102 - 24.103 - @Override 24.104 - public String visitMethodType(MethodType t, Locale locale) { 24.105 - return "(" + printMethodArgs(t.argtypes, false, locale) + ")" + visit(t.restype, locale); 24.106 - } 24.107 - 24.108 - @Override 24.109 - public String visitPackageType(PackageType t, Locale locale) { 24.110 - return t.tsym.getQualifiedName().toString(); 24.111 - } 24.112 - 24.113 - @Override 24.114 - public String visitWildcardType(WildcardType t, Locale locale) { 24.115 - StringBuffer s = new StringBuffer(); 24.116 - s.append(t.kind); 24.117 - if (t.kind != UNBOUND) { 24.118 - s.append(visit(t.type, locale)); 24.119 - } 24.120 - return s.toString(); 24.121 - } 24.122 - 24.123 - 24.124 - public String visitType(Type t, Locale locale) { 24.125 - String s = (t.tsym == null || t.tsym.name == null) 24.126 - ? messages.getLocalizedString("compiler.misc.type.none") 24.127 - : t.tsym.name.toString(); 24.128 - return s; 24.129 - } 24.130 - 24.131 - protected String className(ClassType t, boolean longform, Locale locale) { 24.132 - Symbol sym = t.tsym; 24.133 - if (sym.name.length() == 0 && (sym.flags() & COMPOUND) != 0) { 24.134 - StringBuffer s = new StringBuffer(visit(supertype(t), locale)); 24.135 - for (List<Type> is = interfaces(t); is.nonEmpty(); is = is.tail) { 24.136 - s.append("&"); 24.137 - s.append(visit(is.head, locale)); 24.138 - } 24.139 - return s.toString(); 24.140 - } else if (sym.name.length() == 0) { 24.141 - String s; 24.142 - ClassType norm = (ClassType) t.tsym.type; 24.143 - if (norm == null) { 24.144 - s = getLocalizedString(locale, "compiler.misc.anonymous.class", (Object) null); 24.145 - } else if (interfaces(norm).nonEmpty()) { 24.146 - s = getLocalizedString(locale, "compiler.misc.anonymous.class", 24.147 - visit(interfaces(norm).head, locale)); 24.148 - } else { 24.149 - s = getLocalizedString(locale, "compiler.misc.anonymous.class", 24.150 - visit(supertype(norm), locale)); 24.151 - } 24.152 - return s; 24.153 - } else if (longform) { 24.154 - return sym.getQualifiedName().toString(); 24.155 - } else { 24.156 - return sym.name.toString(); 24.157 - } 24.158 - } 24.159 - 24.160 - protected String printMethodArgs(List<Type> args, boolean varArgs, Locale locale) { 24.161 - if (!varArgs) { 24.162 - return visit(args, locale); 24.163 - } else { 24.164 - StringBuffer buf = new StringBuffer(); 24.165 - while (args.tail.nonEmpty()) { 24.166 - buf.append(visit(args.head, locale)); 24.167 - args = args.tail; 24.168 - buf.append(','); 24.169 - } 24.170 - if (args.head.tag == ARRAY) { 24.171 - buf.append(visit(((ArrayType) args.head).elemtype, locale)); 24.172 - buf.append("..."); 24.173 - } else { 24.174 - buf.append(visit(args.head, locale)); 24.175 - } 24.176 - return buf.toString(); 24.177 - } 24.178 - } 24.179 - 24.180 - protected String getLocalizedString(Locale locale, String key, Object... args) { 24.181 - return messages.getLocalizedString(key, args); 24.182 - } 24.183 - }; 24.184 - // </editor-fold> 24.185 - 24.186 - // <editor-fold defaultstate="collapsed" desc="printSymbol"> 24.187 /** 24.188 - * Visitor for generating a string representation of a given symbol 24.189 + * Helper method for generating a string representation of a given type 24.190 * accordingly to a given locale 24.191 */ 24.192 public String toString(Symbol t, Locale locale) { 24.193 - return symbolPrinter.visit(t, locale); 24.194 + return Printer.createStandardPrinter(messages).visit(t, locale); 24.195 } 24.196 - // where 24.197 - private SymbolPrinter symbolPrinter = new SymbolPrinter(); 24.198 - 24.199 - public class SymbolPrinter extends DefaultSymbolVisitor<String, Locale> { 24.200 - 24.201 - @Override 24.202 - public String visitClassSymbol(ClassSymbol sym, Locale locale) { 24.203 - return sym.name.isEmpty() 24.204 - ? getLocalizedString(locale, "compiler.misc.anonymous.class", sym.flatname) 24.205 - : sym.fullname.toString(); 24.206 - } 24.207 - 24.208 - @Override 24.209 - public String visitMethodSymbol(MethodSymbol s, Locale locale) { 24.210 - if ((s.flags() & BLOCK) != 0) { 24.211 - return s.owner.name.toString(); 24.212 - } else { 24.213 - String ms = (s.name == names.init) 24.214 - ? s.owner.name.toString() 24.215 - : s.name.toString(); 24.216 - if (s.type != null) { 24.217 - if (s.type.tag == FORALL) { 24.218 - ms = "<" + typePrinter.visit(s.type.getTypeArguments(), locale) + ">" + ms; 24.219 - } 24.220 - ms += "(" + typePrinter.printMethodArgs( 24.221 - s.type.getParameterTypes(), 24.222 - (s.flags() & VARARGS) != 0, 24.223 - locale) + ")"; 24.224 - } 24.225 - return ms; 24.226 - } 24.227 - } 24.228 - 24.229 - @Override 24.230 - public String visitOperatorSymbol(OperatorSymbol s, Locale locale) { 24.231 - return visitMethodSymbol(s, locale); 24.232 - } 24.233 - 24.234 - @Override 24.235 - public String visitPackageSymbol(PackageSymbol s, Locale locale) { 24.236 - return s.name.isEmpty() 24.237 - ? getLocalizedString(locale, "compiler.misc.unnamed.package") 24.238 - : s.fullname.toString(); 24.239 - } 24.240 - 24.241 - @Override 24.242 - public String visitSymbol(Symbol s, Locale locale) { 24.243 - return s.name.toString(); 24.244 - } 24.245 - 24.246 - public String visit(List<Symbol> ts, Locale locale) { 24.247 - ListBuffer<String> sbuf = lb(); 24.248 - for (Symbol t : ts) { 24.249 - sbuf.append(visit(t, locale)); 24.250 - } 24.251 - return sbuf.toList().toString(); 24.252 - } 24.253 - 24.254 - protected String getLocalizedString(Locale locale, String key, Object... args) { 24.255 - return messages.getLocalizedString(key, args); 24.256 - } 24.257 - }; 24.258 - // </editor-fold> 24.259 24.260 // <editor-fold defaultstate="collapsed" desc="toString"> 24.261 /** 24.262 @@ -3128,7 +2926,7 @@ 24.263 return t; 24.264 } 24.265 // where 24.266 - private List<Type> freshTypeVariables(List<Type> types) { 24.267 + public List<Type> freshTypeVariables(List<Type> types) { 24.268 ListBuffer<Type> result = lb(); 24.269 for (Type t : types) { 24.270 if (t.tag == WILDCARD) { 24.271 @@ -3224,9 +3022,11 @@ 24.272 } 24.273 24.274 private boolean giveWarning(Type from, Type to) { 24.275 - // To and from are (possibly different) parameterizations 24.276 - // of the same class or interface 24.277 - return to.isParameterized() && !containsType(to.allparams(), from.allparams()); 24.278 + Type subFrom = asSub(from, to.tsym); 24.279 + return to.isParameterized() && 24.280 + (!(isUnbounded(to) || 24.281 + isSubtype(from, to) || 24.282 + ((subFrom != null) && isSameType(subFrom, to)))); 24.283 } 24.284 24.285 private List<Type> superClosure(Type t, Type s) {
25.1 --- a/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Mar 09 13:34:19 2009 -0700 25.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Check.java Mon Mar 09 23:53:41 2009 -0700 25.3 @@ -1545,10 +1545,10 @@ 25.4 25.5 25.6 void checkNonCyclic(DiagnosticPosition pos, TypeVar t) { 25.7 - checkNonCyclic1(pos, t, new HashSet<TypeVar>()); 25.8 + checkNonCyclic1(pos, t, List.<TypeVar>nil()); 25.9 } 25.10 25.11 - private void checkNonCyclic1(DiagnosticPosition pos, Type t, Set<TypeVar> seen) { 25.12 + private void checkNonCyclic1(DiagnosticPosition pos, Type t, List<TypeVar> seen) { 25.13 final TypeVar tv; 25.14 if (t.tag == TYPEVAR && (t.tsym.flags() & UNATTRIBUTED) != 0) 25.15 return; 25.16 @@ -1558,7 +1558,7 @@ 25.17 log.error(pos, "cyclic.inheritance", t); 25.18 } else if (t.tag == TYPEVAR) { 25.19 tv = (TypeVar)t; 25.20 - seen.add(tv); 25.21 + seen = seen.prepend(tv); 25.22 for (Type b : types.getBounds(tv)) 25.23 checkNonCyclic1(pos, b, seen); 25.24 }
26.1 --- a/src/share/classes/com/sun/tools/javac/comp/Lower.java Mon Mar 09 13:34:19 2009 -0700 26.2 +++ b/src/share/classes/com/sun/tools/javac/comp/Lower.java Mon Mar 09 23:53:41 2009 -0700 26.3 @@ -3012,6 +3012,7 @@ 26.4 vardefinit).setType(tree.var.type); 26.5 indexDef.sym = tree.var.sym; 26.6 JCBlock body = make.Block(0, List.of(indexDef, tree.body)); 26.7 + body.endpos = TreeInfo.endPos(tree.body); 26.8 result = translate(make. 26.9 ForLoop(List.of(init), 26.10 cond,
27.1 --- a/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java Mon Mar 09 13:34:19 2009 -0700 27.2 +++ b/src/share/classes/com/sun/tools/javac/processing/JavacRoundEnvironment.java Mon Mar 09 23:53:41 2009 -0700 27.3 @@ -1,5 +1,5 @@ 27.4 /* 27.5 - * Copyright 2005-2008 Sun Microsystems, Inc. All Rights Reserved. 27.6 + * Copyright 2005-2009 Sun Microsystems, Inc. All Rights Reserved. 27.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 27.8 * 27.9 * This code is free software; you can redistribute it and/or modify it 27.10 @@ -111,6 +111,7 @@ 27.11 */ 27.12 public Set<? extends Element> getElementsAnnotatedWith(TypeElement a) { 27.13 Set<Element> result = Collections.emptySet(); 27.14 + Types typeUtil = processingEnv.getTypeUtils(); 27.15 if (a.getKind() != ElementKind.ANNOTATION_TYPE) 27.16 throw new IllegalArgumentException(NOT_AN_ANNOTATION_TYPE + a); 27.17 27.18 @@ -122,7 +123,7 @@ 27.19 throw new AssertionError("Bad implementation type for " + tm); 27.20 27.21 ElementScanner6<Set<Element>, DeclaredType> scanner = 27.22 - new AnnotationSetScanner(result); 27.23 + new AnnotationSetScanner(result, typeUtil); 27.24 27.25 for (Element element : rootElements) 27.26 result = scanner.scan(element, annotationTypeElement); 27.27 @@ -135,9 +136,11 @@ 27.28 ElementScanner6<Set<Element>, DeclaredType> { 27.29 // Insertion-order preserving set 27.30 Set<Element> annotatedElements = new LinkedHashSet<Element>(); 27.31 + Types typeUtil; 27.32 27.33 - AnnotationSetScanner(Set<Element> defaultSet) { 27.34 + AnnotationSetScanner(Set<Element> defaultSet, Types typeUtil) { 27.35 super(defaultSet); 27.36 + this.typeUtil = typeUtil; 27.37 } 27.38 27.39 @Override 27.40 @@ -145,7 +148,7 @@ 27.41 java.util.List<? extends AnnotationMirror> annotationMirrors = 27.42 processingEnv.getElementUtils().getAllAnnotationMirrors(e); 27.43 for (AnnotationMirror annotationMirror : annotationMirrors) { 27.44 - if (annotationMirror.getAnnotationType().equals(p)) 27.45 + if (typeUtil.isSameType(annotationMirror.getAnnotationType(), p)) 27.46 annotatedElements.add(e); 27.47 } 27.48 e.accept(this, p);
28.1 --- a/src/share/classes/com/sun/tools/javac/resources/compiler.properties Mon Mar 09 13:34:19 2009 -0700 28.2 +++ b/src/share/classes/com/sun/tools/javac/resources/compiler.properties Mon Mar 09 23:53:41 2009 -0700 28.3 @@ -836,6 +836,9 @@ 28.4 compiler.misc.type.captureof=\ 28.5 capture#{0} of {1} 28.6 28.7 +compiler.misc.type.captureof.1=\ 28.8 + capture#{0} 28.9 + 28.10 compiler.misc.type.none=\ 28.11 <none> 28.12
29.1 --- a/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java Mon Mar 09 13:34:19 2009 -0700 29.2 +++ b/src/share/classes/com/sun/tools/javac/util/AbstractDiagnosticFormatter.java Mon Mar 09 23:53:41 2009 -0700 29.3 @@ -38,6 +38,10 @@ 29.4 import com.sun.tools.javac.api.DiagnosticFormatter.Configuration.MultilineLimit; 29.5 import com.sun.tools.javac.api.DiagnosticFormatter.PositionKind; 29.6 import com.sun.tools.javac.api.Formattable; 29.7 +import com.sun.tools.javac.code.Printer; 29.8 +import com.sun.tools.javac.code.Symbol; 29.9 +import com.sun.tools.javac.code.Type; 29.10 +import com.sun.tools.javac.code.Type.CapturedType; 29.11 import com.sun.tools.javac.file.JavacFileManager; 29.12 29.13 import static com.sun.tools.javac.util.JCDiagnostic.DiagnosticType.*; 29.14 @@ -60,16 +64,31 @@ 29.15 * JavacMessages object used by this formatter for i18n. 29.16 */ 29.17 protected JavacMessages messages; 29.18 + 29.19 + /** 29.20 + * Configuration object used by this formatter 29.21 + */ 29.22 private SimpleConfiguration config; 29.23 + 29.24 + /** 29.25 + * Current depth level of the disgnostic being formatted 29.26 + * (!= 0 for subdiagnostics) 29.27 + */ 29.28 protected int depth = 0; 29.29 29.30 /** 29.31 + * Printer instance to be used for formatting types/symbol 29.32 + */ 29.33 + protected Printer printer; 29.34 + 29.35 + /** 29.36 * Initialize an AbstractDiagnosticFormatter by setting its JavacMessages object. 29.37 * @param messages 29.38 */ 29.39 protected AbstractDiagnosticFormatter(JavacMessages messages, SimpleConfiguration config) { 29.40 this.messages = messages; 29.41 this.config = config; 29.42 + this.printer = new FormatterPrinter(); 29.43 } 29.44 29.45 public String formatKind(JCDiagnostic d, Locale l) { 29.46 @@ -83,6 +102,14 @@ 29.47 } 29.48 } 29.49 29.50 + @Override 29.51 + public String format(JCDiagnostic d, Locale locale) { 29.52 + printer = new FormatterPrinter(); 29.53 + return formatDiagnostic(d, locale); 29.54 + } 29.55 + 29.56 + abstract String formatDiagnostic(JCDiagnostic d, Locale locale); 29.57 + 29.58 public String formatPosition(JCDiagnostic d, PositionKind pk,Locale l) { 29.59 assert (d.getPosition() != Position.NOPOS); 29.60 return String.valueOf(getPosition(d, pk)); 29.61 @@ -143,12 +170,21 @@ 29.62 else if (arg instanceof Iterable<?>) { 29.63 return formatIterable(d, (Iterable<?>)arg, l); 29.64 } 29.65 - else if (arg instanceof JavaFileObject) 29.66 + else if (arg instanceof Type) { 29.67 + return printer.visit((Type)arg, l); 29.68 + } 29.69 + else if (arg instanceof Symbol) { 29.70 + return printer.visit((Symbol)arg, l); 29.71 + } 29.72 + else if (arg instanceof JavaFileObject) { 29.73 return JavacFileManager.getJavacBaseFileName((JavaFileObject)arg); 29.74 - else if (arg instanceof Formattable) 29.75 + } 29.76 + else if (arg instanceof Formattable) { 29.77 return ((Formattable)arg).toString(l, messages); 29.78 - else 29.79 + } 29.80 + else { 29.81 return String.valueOf(arg); 29.82 + } 29.83 } 29.84 29.85 /** 29.86 @@ -404,4 +440,43 @@ 29.87 return caretEnabled; 29.88 } 29.89 } 29.90 + 29.91 + /** 29.92 + * An enhanced printer for formatting types/symbols used by 29.93 + * AbstractDiagnosticFormatter. Provides alternate numbering of captured 29.94 + * types (they are numbered starting from 1 on each new diagnostic, instead 29.95 + * of relying on the underlying hashcode() method which generates unstable 29.96 + * output). Also detects cycles in wildcard messages (e.g. if the wildcard 29.97 + * type referred by a given captured type C contains C itself) which might 29.98 + * lead to infinite loops. 29.99 + */ 29.100 + protected class FormatterPrinter extends Printer { 29.101 + 29.102 + List<Type> allCaptured = List.nil(); 29.103 + List<Type> seenCaptured = List.nil(); 29.104 + 29.105 + @Override 29.106 + protected String localize(Locale locale, String key, Object... args) { 29.107 + return AbstractDiagnosticFormatter.this.localize(locale, key, args); 29.108 + } 29.109 + 29.110 + @Override 29.111 + public String visitCapturedType(CapturedType t, Locale locale) { 29.112 + if (seenCaptured.contains(t)) 29.113 + return localize(locale, "compiler.misc.type.captureof.1", 29.114 + allCaptured.indexOf(t) + 1); 29.115 + else { 29.116 + try { 29.117 + seenCaptured = seenCaptured.prepend(t); 29.118 + allCaptured = allCaptured.append(t); 29.119 + return localize(locale, "compiler.misc.type.captureof", 29.120 + allCaptured.indexOf(t) + 1, 29.121 + visit(t.wildcard, locale)); 29.122 + } 29.123 + finally { 29.124 + seenCaptured = seenCaptured.tail; 29.125 + } 29.126 + } 29.127 + } 29.128 + } 29.129 }
30.1 --- a/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java Mon Mar 09 13:34:19 2009 -0700 30.2 +++ b/src/share/classes/com/sun/tools/javac/util/BasicDiagnosticFormatter.java Mon Mar 09 23:53:41 2009 -0700 30.3 @@ -82,7 +82,7 @@ 30.4 super(msgs, new BasicConfiguration()); 30.5 } 30.6 30.7 - public String format(JCDiagnostic d, Locale l) { 30.8 + public String formatDiagnostic(JCDiagnostic d, Locale l) { 30.9 if (l == null) 30.10 l = messages.getCurrentLocale(); 30.11 String format = selectFormat(d);
31.1 --- a/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java Mon Mar 09 13:34:19 2009 -0700 31.2 +++ b/src/share/classes/com/sun/tools/javac/util/RawDiagnosticFormatter.java Mon Mar 09 23:53:41 2009 -0700 31.3 @@ -54,7 +54,7 @@ 31.4 } 31.5 31.6 //provide common default formats 31.7 - public String format(JCDiagnostic d, Locale l) { 31.8 + public String formatDiagnostic(JCDiagnostic d, Locale l) { 31.9 try { 31.10 StringBuffer buf = new StringBuffer(); 31.11 if (d.getPosition() != Position.NOPOS) { 31.12 @@ -82,17 +82,11 @@ 31.13 public String formatMessage(JCDiagnostic d, Locale l) { 31.14 StringBuilder buf = new StringBuilder(); 31.15 Collection<String> args = formatArguments(d, l); 31.16 - buf.append(d.getCode()); 31.17 - String sep = ": "; 31.18 - for (Object o : args) { 31.19 - buf.append(sep); 31.20 - buf.append(o); 31.21 - sep = ", "; 31.22 - } 31.23 + buf.append(localize(null, d.getCode(), args.toArray())); 31.24 if (d.isMultiline() && getConfiguration().getVisible().contains(DiagnosticPart.SUBDIAGNOSTICS)) { 31.25 List<String> subDiags = formatSubdiagnostics(d, null); 31.26 if (subDiags.nonEmpty()) { 31.27 - sep = ""; 31.28 + String sep = ""; 31.29 buf.append(",{"); 31.30 for (String sub : formatSubdiagnostics(d, null)) { 31.31 buf.append(sep); 31.32 @@ -117,4 +111,17 @@ 31.33 else 31.34 return s; 31.35 } 31.36 + 31.37 + @Override 31.38 + protected String localize(Locale l, String key, Object... args) { 31.39 + StringBuilder buf = new StringBuilder(); 31.40 + buf.append(key); 31.41 + String sep = ": "; 31.42 + for (Object o : args) { 31.43 + buf.append(sep); 31.44 + buf.append(o); 31.45 + sep = ", "; 31.46 + } 31.47 + return buf.toString(); 31.48 + } 31.49 }
32.1 --- a/src/share/classes/javax/annotation/processing/Filer.java Mon Mar 09 13:34:19 2009 -0700 32.2 +++ b/src/share/classes/javax/annotation/processing/Filer.java Mon Mar 09 23:53:41 2009 -0700 32.3 @@ -35,9 +35,11 @@ 32.4 * processor. Files created in this way will be known to the 32.5 * annotation processing tool implementing this interface, better 32.6 * enabling the tool to manage them. Source and class files so 32.7 - * created will be considered for processing by the tool after the 32.8 - * {@code close} method has been called on the {@code Writer} or 32.9 - * {@code OutputStream} used to write the contents of the file. 32.10 + * created will be {@linkplain RoundEnvironment#getRootElements 32.11 + * considered for processing} by the tool in a subsequent {@linkplain 32.12 + * RoundEnvironment round of processing} after the {@code close} 32.13 + * method has been called on the {@code Writer} or {@code 32.14 + * OutputStream} used to write the contents of the file. 32.15 * 32.16 * Three kinds of files are distinguished: source files, class files, 32.17 * and auxiliary resource files.
33.1 --- a/test/com/sun/javadoc/AuthorDD/AuthorDD.java Mon Mar 09 13:34:19 2009 -0700 33.2 +++ b/test/com/sun/javadoc/AuthorDD/AuthorDD.java Mon Mar 09 23:53:41 2009 -0700 33.3 @@ -91,7 +91,7 @@ 33.4 33.5 // Test multiple @author tags: 33.6 33.7 - { "<DT><STRONG>Author:</STRONG></DT>"+NL+" <DD>Doug Kramer, Jamie, Neal</DD>"+NL, 33.8 + { "<DT><STRONG>Author:</STRONG></DT>"+NL+" <DD>Doug Kramer, Jamie, Neal</DD>", 33.9 BUGID + FS + "p1" + FS + "C1.html" }, 33.10 33.11 };
34.1 --- a/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Mon Mar 09 13:34:19 2009 -0700 34.2 +++ b/test/com/sun/javadoc/testClassCrossReferences/TestClassCrossReferences.java Mon Mar 09 23:53:41 2009 -0700 34.3 @@ -48,7 +48,7 @@ 34.4 "<A HREF=\"http://java.sun.com/j2se/1.4/docs/api/java/math/BigInteger.html?is-external=true#gcd(java.math.BigInteger)\" " + 34.5 "title=\"class or interface in java.math\"><CODE>Link to external member gcd</CODE></A>"}, 34.6 {BUG_ID + FS + "C.html", 34.7 - "<STRONG>Overrides:</STRONG><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE>"} 34.8 + "<STRONG>Overrides:</STRONG></DT><DD><CODE>toString</CODE> in class <CODE>java.lang.Object</CODE>"} 34.9 }; 34.10 private static final String[][] NEGATED_TEST = NO_TEST; 34.11 private static final String[] ARGS =
35.1 --- a/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java Mon Mar 09 13:34:19 2009 -0700 35.2 +++ b/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java Mon Mar 09 23:53:41 2009 -0700 35.3 @@ -45,9 +45,10 @@ 35.4 35.5 //Input for string search tests. 35.6 private static final String[][] TEST = { 35.7 - {BUG_ID + FS + "C.html", "<DL>"+NL+"<DD>This is just a simple constructor."+ NL + 35.8 - "<P>"+NL+"<DL>"+NL+"<DT><STRONG>Parameters:</STRONG><DD><CODE>i</CODE> - a param.</DL>"+NL + 35.9 - "</DL>" 35.10 + {BUG_ID + FS + "C.html", "<DL>" + NL + "<DD>This is just a simple constructor." + NL + 35.11 + "<P>" + NL + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>Parameters:</STRONG>" + 35.12 + "</DT><DD><CODE>i</CODE> - a param.</DD></DL>" + NL + 35.13 + "</DD>" + NL + "</DL>" 35.14 } 35.15 }; 35.16 private static final String[][] NEGATED_TEST = NO_TEST;
36.1 --- a/test/com/sun/javadoc/testDeprecatedDocs/TestDeprecatedDocs.java Mon Mar 09 13:34:19 2009 -0700 36.2 +++ b/test/com/sun/javadoc/testDeprecatedDocs/TestDeprecatedDocs.java Mon Mar 09 23:53:41 2009 -0700 36.3 @@ -78,13 +78,12 @@ 36.4 36.5 {TARGET_FILE2, "<STRONG>Deprecated.</STRONG>" + NL + 36.6 "<P>" + NL + 36.7 - "<DL>" + NL + 36.8 - "<DT><PRE><FONT SIZE=\"-1\">@Deprecated" + NL + 36.9 + "<PRE><FONT SIZE=\"-1\">@Deprecated" + NL + 36.10 "</FONT>public class <STRONG>DeprecatedClassByAnnotation</STRONG>"}, 36.11 36.12 {TARGET_FILE2, "public int <STRONG>field</STRONG></PRE>" + NL + 36.13 "<DL>" + NL + 36.14 - "<DD><STRONG>Deprecated.</STRONG> <DL>"}, 36.15 + "<DD><STRONG>Deprecated.</STRONG> </DD></DL>"}, 36.16 36.17 {TARGET_FILE2, "<FONT SIZE=\"-1\">@Deprecated" + NL + 36.18 "</FONT>public <STRONG>DeprecatedClassByAnnotation</STRONG>()</PRE>" + NL +
37.1 --- a/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Mon Mar 09 13:34:19 2009 -0700 37.2 +++ b/test/com/sun/javadoc/testExternalOverridenMethod/TestExternalOverridenMethod.java Mon Mar 09 23:53:41 2009 -0700 37.3 @@ -39,13 +39,13 @@ 37.4 private static final String BUG_ID = "4857717"; 37.5 private static final String[][] TEST = { 37.6 {BUG_ID + FS + "pkg" + FS + "XReader.html", 37.7 - "<STRONG>Overrides:</STRONG><DD><CODE><A HREF=\"" + 37.8 + "<STRONG>Overrides:</STRONG></DT><DD><CODE><A HREF=\"" + 37.9 "http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true#read()\"" + 37.10 " title=\"class or interface in java.io\">read</A></CODE> in class " + 37.11 "<CODE><A HREF=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/FilterReader.html?is-external=true\"" + 37.12 " title=\"class or interface in java.io\">FilterReader</A>"}, 37.13 {BUG_ID + FS + "pkg" + FS + "XReader.html", 37.14 - "<STRONG>Specified by:</STRONG><DD><CODE><A HREF=\"" + 37.15 + "<STRONG>Specified by:</STRONG></DT><DD><CODE><A HREF=\"" + 37.16 "http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true#readInt()\"" + 37.17 " title=\"class or interface in java.io\">readInt</A></CODE> in interface " + 37.18 "<CODE><A HREF=\"http://java.sun.com/j2se/1.4.1/docs/api/java/io/DataInput.html?is-external=true\"" +
38.1 --- a/test/com/sun/javadoc/testHref/TestHref.java Mon Mar 09 13:34:19 2009 -0700 38.2 +++ b/test/com/sun/javadoc/testHref/TestHref.java Mon Mar 09 23:53:41 2009 -0700 38.3 @@ -67,7 +67,7 @@ 38.4 }, 38.5 //@see test. 38.6 {BUG_ID + FS + "pkg" + FS + "C2.html", 38.7 - "See Also:</STRONG><DD><A HREF=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">" 38.8 + "See Also:</STRONG></DT><DD><A HREF=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">" 38.9 }, 38.10 38.11 //Header does not link to the page itself.
39.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 39.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java Mon Mar 09 23:53:41 2009 -0700 39.3 @@ -0,0 +1,370 @@ 39.4 +/* 39.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 39.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 39.7 + * 39.8 + * This code is free software; you can redistribute it and/or modify it 39.9 + * under the terms of the GNU General Public License version 2 only, as 39.10 + * published by the Free Software Foundation. Sun designates this 39.11 + * particular file as subject to the "Classpath" exception as provided 39.12 + * by Sun in the LICENSE file that accompanied this code. 39.13 + * 39.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 39.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 39.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 39.17 + * version 2 for more details (a copy is included in the LICENSE file that 39.18 + * accompanied this code). 39.19 + * 39.20 + * You should have received a copy of the GNU General Public License version 39.21 + * 2 along with this work; if not, write to the Free Software Foundation, 39.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 39.23 + * 39.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 39.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 39.26 + * have any questions. 39.27 + */ 39.28 + 39.29 +/* 39.30 + * @test 39.31 + * @bug 6786690 39.32 + * @summary This test verifies the nesting of definition list tags. 39.33 + * @author Bhavesh Patel 39.34 + * @library ../lib/ 39.35 + * @build JavadocTester 39.36 + * @build TestHtmlDefinitionListTag 39.37 + * @run main TestHtmlDefinitionListTag 39.38 + */ 39.39 + 39.40 +public class TestHtmlDefinitionListTag extends JavadocTester { 39.41 + 39.42 + private static final String BUG_ID = "6786690"; 39.43 + 39.44 + // Test common to all runs of javadoc. The class signature should print 39.45 + // properly enclosed definition list tags and the Annotation Type 39.46 + // Optional Element should print properly nested definition list tags 39.47 + // for default value. 39.48 + private static final String[][] TEST_ALL = { 39.49 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<PRE>public class " + 39.50 + "<STRONG>C1</STRONG>" + NL + "extends " + 39.51 + "java.lang.Object" + NL + "implements " + 39.52 + "java.io.Serializable</PRE>"}, 39.53 + {BUG_ID + FS + "pkg1" + FS + "C4.html", "<DL>" + NL + "<DD><DL>" + NL + 39.54 + "<DT><STRONG>Default:</STRONG></DT><DD>true</DD>" + NL + 39.55 + "</DL>" + NL + "</DD>" + NL + "</DL>"}}; 39.56 + 39.57 + // Test for normal run of javadoc in which various ClassDocs and 39.58 + // serialized form should have properly nested definition list tags 39.59 + // enclosing comments, tags and deprecated information. 39.60 + private static final String[][] TEST_CMNT_DEPR = { 39.61 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.62 + "<DT><STRONG>Since:</STRONG></DT>" + NL + 39.63 + " <DD>JDK1.0</DD>" + NL + "<DT><STRONG>See Also:</STRONG></DT><DD>" + 39.64 + "<A HREF=\"../pkg1/C2.html\" title=\"class in pkg1\">" + 39.65 + "<CODE>C2</CODE></A>, " + NL + 39.66 + "<A HREF=\"../serialized-form.html#pkg1.C1\">" + 39.67 + "Serialized Form</A></DD></DL>"}, 39.68 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.69 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version" + 39.70 + " 1.5, replaced by" + NL + 39.71 + " <A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 39.72 + "<CODE>setUndecorated(boolean)</CODE></A>.</I></DD>" + 39.73 + "<DD>This field indicates whether the C1 is undecorated." + NL + 39.74 + "<P>" + NL + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>" + 39.75 + "Since:</STRONG></DT>" + NL + " <DD>1.4</DD>" + NL + "<DT>" + 39.76 + "<STRONG>See Also:</STRONG></DT><DD>" + 39.77 + "<A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\"><CODE>" + 39.78 + "setUndecorated(boolean)</CODE></A></DD></DL>" + NL +"</DD>" + NL + 39.79 + "</DL>"}, 39.80 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.81 + "<DD>Constructor." + NL + "<P>" + NL + "</DD>" + NL + 39.82 + "<DD><DL>" + NL + "<DT><STRONG>Parameters:</STRONG></DT><DD>" + 39.83 + "<CODE>title</CODE> - the title</DD><DD><CODE>test</CODE>" + 39.84 + " - boolean value</DD>" + NL + "<DT><STRONG>Throws:</STRONG></DT>" + NL + 39.85 + "<DD><CODE>java.lang.IllegalArgumentException</CODE>" + 39.86 + " - if the <code>owner</code>'s" + NL + " <code>GraphicsConfiguration" + 39.87 + "</code> is not from a screen device</DD>" + NL +"<DD><CODE>" + 39.88 + "HeadlessException</CODE></DD></DL>" + NL + "</DD>" + NL + 39.89 + "</DL>"}, 39.90 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.91 + "<DD>Method comments." + NL + "<P>" + NL + 39.92 + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>Parameters:" + 39.93 + "</STRONG></DT><DD><CODE>undecorated</CODE> - <code>true</code>" + 39.94 + " if no decorations are" + NL + " to be enabled;" + NL + 39.95 + " <code>false</code> if decorations are to be enabled." + 39.96 + "</DD><DT><STRONG>Since:</STRONG></DT>" + NL + 39.97 + " <DD>1.4</DD>" + NL + "<DT><STRONG>See Also:</STRONG></DT>" + 39.98 + "<DD><A HREF=\"../pkg1/C1.html#readObject()\"><CODE>" + 39.99 + "readObject()</CODE></A></DD></DL>" + NL + "</DD>" + NL + 39.100 + "</DL>"}, 39.101 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + "<DD><DL>" + NL + 39.102 + "<DT><STRONG>Throws:</STRONG></DT>" + NL + "<DD><CODE>" + 39.103 + "java.io.IOException</CODE></DD><DT><STRONG>See Also:" + 39.104 + "</STRONG></DT><DD>" + 39.105 + "<A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 39.106 + "<CODE>setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 39.107 + "</DD>" + NL + "</DL>"}, 39.108 + {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "<DL>" + NL + 39.109 + "<DD>No modal exclusion." + NL + "<P>" + NL +"</DD>" + NL + 39.110 + "</DL>"}, 39.111 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<DL>" + NL + "<DD>Constructor." + NL + 39.112 + "<P>" + NL +"</DD>" + NL + "</DL>"}, 39.113 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<DL>" + NL + "<DD><STRONG>" + 39.114 + "Deprecated.</STRONG> <I>As of JDK version 1.5, replaced " + 39.115 + "by" + NL + " <A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 39.116 + "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 39.117 + "</DD><DD>Set visible." + NL + "<P>" + NL + "</DD>" +NL + 39.118 + "<DD><DL>" + NL + "<DT><STRONG>Parameters:</STRONG></DT><DD>" + 39.119 + "<CODE>set</CODE> - boolean</DD><DT><STRONG>Since:</STRONG></DT>" + NL + 39.120 + " <DD>1.4</DD></DL>" + NL + "</DD>" + NL + "</DL>"}, 39.121 + {BUG_ID + FS + "pkg1" + FS + "C3.html", "<DL>" + NL + "<DD>Comment." + NL + 39.122 + "<P>" + NL + "</DD>" + NL + "</DL>"}, 39.123 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><DL>" + NL + 39.124 + "<DT><STRONG>Throws:</STRONG></DT>" + NL + "<DD><CODE>" + 39.125 + "java.io.IOException</CODE></DD><DT><STRONG>See Also:</STRONG>" + 39.126 + "</DT><DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.127 + "<CODE>C1.setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 39.128 + "</DD>" + NL + "</DL>"}, 39.129 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 39.130 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version " + 39.131 + "1.5, replaced by" + NL + 39.132 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.133 + "<CODE>setUndecorated(boolean)</CODE></A>.</I></DD>" + 39.134 + "<DD>This field indicates whether the C1 is undecorated." + NL + 39.135 + "<P>" + NL + "</DD>" + NL + "<DD> </DD>" + NL + 39.136 + "<DD><DL>" + NL + "<DT><STRONG>Since:</STRONG></DT>" + NL + 39.137 + " <DD>1.4</DD>" + NL + "<DT><STRONG>See Also:</STRONG>" + 39.138 + "</DT><DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.139 + "<CODE>C1.setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 39.140 + "</DD>" + NL + "</DL>"}, 39.141 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 39.142 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version" + 39.143 + " 1.5, replaced by" + NL + 39.144 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.145 + "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 39.146 + "</DD><DD>Reads the object stream." + NL + "<P>" + NL + 39.147 + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>Throws:" + 39.148 + "</STRONG></DT>" + NL + "<DD><CODE><code>" + 39.149 + "IOException</code></CODE></DD>" + NL + 39.150 + "<DD><CODE>java.io.IOException</CODE></DD></DL>" + NL + 39.151 + "</DD>" + NL + "</DL>"}, 39.152 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 39.153 + "<DD><STRONG>Deprecated.</STRONG> </DD><DD>" + 39.154 + "The name for this class." + NL + "<P>" + NL + "</DD>" + NL + 39.155 + "<DD> </DD>" + NL + "</DL>"}}; 39.156 + 39.157 + // Test with -nocomment option. The ClassDocs and serialized form should 39.158 + // have properly nested definition list tags enclosing deprecated 39.159 + // information and should not display definition lists for comments 39.160 + // and tags. 39.161 + private static final String[][] TEST_NOCMNT = { 39.162 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + "<DD><STRONG>" + 39.163 + "Deprecated.</STRONG> <I>As of JDK version 1.5, replaced by" + NL + 39.164 + " <A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\"><CODE>" + 39.165 + "setUndecorated(boolean)</CODE></A>.</I></DD></DL>"}, 39.166 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<DL>" + NL + 39.167 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version" + 39.168 + " 1.5, replaced by" + NL + 39.169 + " <A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 39.170 + "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 39.171 + "</DD></DL>"}, 39.172 + {BUG_ID + FS + "pkg1" + FS + "C5.html", "<PRE>" + NL + 39.173 + "protected <STRONG>C5</STRONG>()</PRE>" + NL + "<DL>" + NL + 39.174 + "<DD><STRONG>Deprecated.</STRONG> </DD></DL>"}, 39.175 + {BUG_ID + FS + "pkg1" + FS + "C5.html", "<PRE>" + NL + 39.176 + "public void <STRONG>printInfo</STRONG>()</PRE>" + NL + "<DL>" + NL + 39.177 + "<DD><STRONG>Deprecated.</STRONG> </DD></DL>"}, 39.178 + {BUG_ID + FS + "serialized-form.html", "<PRE>" + NL + "boolean <STRONG>" + 39.179 + "undecorated</STRONG></PRE>" + NL + "<DL>" + NL + "<DD><STRONG>" + 39.180 + "Deprecated.</STRONG> <I>As of JDK version 1.5, replaced by" + NL + 39.181 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\"><CODE>" + 39.182 + "setUndecorated(boolean)</CODE></A>.</I></DD></DL>"}, 39.183 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><STRONG>" + 39.184 + "Deprecated.</STRONG> <I>As of JDK version" + 39.185 + " 1.5, replaced by" + NL + 39.186 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.187 + "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 39.188 + "</DD></DL>"}, 39.189 + {BUG_ID + FS + "serialized-form.html", "<PRE>" + NL + "int <STRONG>" + 39.190 + "publicKey</STRONG></PRE>" + NL + "<DL>" + NL + "<DD><STRONG>" + 39.191 + "Deprecated.</STRONG> </DD></DL>"}}; 39.192 + 39.193 + // Test with -nodeprecated option. The ClassDocs should have properly nested 39.194 + // definition list tags enclosing comments and tags. The ClassDocs should not 39.195 + // display definition list for deprecated information. The serialized form 39.196 + // should display properly nested definition list tags for comments, tags 39.197 + // and deprecated information. 39.198 + private static final String[][] TEST_NODEPR = { 39.199 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.200 + "<DT><STRONG>Since:</STRONG></DT>" + NL + 39.201 + " <DD>JDK1.0</DD>" + NL + "<DT><STRONG>See Also:</STRONG></DT><DD>" + 39.202 + "<A HREF=\"../pkg1/C2.html\" title=\"class in pkg1\">" + 39.203 + "<CODE>C2</CODE></A>, " + NL + 39.204 + "<A HREF=\"../serialized-form.html#pkg1.C1\">" + 39.205 + "Serialized Form</A></DD></DL>"}, 39.206 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.207 + "<DD>Constructor." + NL + "<P>" + NL + "</DD>" + NL + 39.208 + "<DD><DL>" + NL + "<DT><STRONG>Parameters:</STRONG></DT><DD>" + 39.209 + "<CODE>title</CODE> - the title</DD><DD><CODE>test</CODE>" + 39.210 + " - boolean value</DD>" + NL + "<DT><STRONG>Throws:</STRONG></DT>" + NL + 39.211 + "<DD><CODE>java.lang.IllegalArgumentException</CODE>" + 39.212 + " - if the <code>owner</code>'s" + NL + " <code>GraphicsConfiguration" + 39.213 + "</code> is not from a screen device</DD>" + NL +"<DD><CODE>" + 39.214 + "HeadlessException</CODE></DD></DL>" + NL + "</DD>" + NL + 39.215 + "</DL>"}, 39.216 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + 39.217 + "<DD>Method comments." + NL + "<P>" + NL + 39.218 + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>Parameters:" + 39.219 + "</STRONG></DT><DD><CODE>undecorated</CODE> - <code>true</code>" + 39.220 + " if no decorations are" + NL + " to be enabled;" + NL + 39.221 + " <code>false</code> if decorations are to be enabled." + 39.222 + "</DD><DT><STRONG>Since:</STRONG></DT>" + NL + 39.223 + " <DD>1.4</DD>" + NL + "<DT><STRONG>See Also:</STRONG></DT>" + 39.224 + "<DD><A HREF=\"../pkg1/C1.html#readObject()\"><CODE>" + 39.225 + "readObject()</CODE></A></DD></DL>" + NL + "</DD>" + NL + 39.226 + "</DL>"}, 39.227 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + "<DD><DL>" + NL + 39.228 + "<DT><STRONG>Throws:</STRONG></DT>" + NL + "<DD><CODE>" + 39.229 + "java.io.IOException</CODE></DD><DT><STRONG>See Also:" + 39.230 + "</STRONG></DT><DD>" + 39.231 + "<A HREF=\"../pkg1/C1.html#setUndecorated(boolean)\">" + 39.232 + "<CODE>setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 39.233 + "</DD>" + NL + "</DL>"}, 39.234 + {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "<DL>" + NL + 39.235 + "<DD>No modal exclusion." + NL + "<P>" + NL +"</DD>" + NL + 39.236 + "</DL>"}, 39.237 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<DL>" + NL + "<DD>Constructor." + NL + 39.238 + "<P>" + NL +"</DD>" + NL + "</DL>"}, 39.239 + {BUG_ID + FS + "pkg1" + FS + "C3.html", "<DL>" + NL + "<DD>Comment." + NL + 39.240 + "<P>" + NL + "</DD>" + NL + "</DL>"}, 39.241 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><DL>" + NL + 39.242 + "<DT><STRONG>Throws:</STRONG></DT>" + NL + "<DD><CODE>" + 39.243 + "java.io.IOException</CODE></DD><DT><STRONG>See Also:</STRONG>" + 39.244 + "</DT><DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.245 + "<CODE>C1.setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 39.246 + "</DD>" + NL + "</DL>"}, 39.247 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 39.248 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version " + 39.249 + "1.5, replaced by" + NL + 39.250 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.251 + "<CODE>setUndecorated(boolean)</CODE></A>.</I></DD>" + 39.252 + "<DD>This field indicates whether the C1 is undecorated." + NL + 39.253 + "<P>" + NL + "</DD>" + NL + "<DD> </DD>" + NL + 39.254 + "<DD><DL>" + NL + "<DT><STRONG>Since:</STRONG></DT>" + NL + 39.255 + " <DD>1.4</DD>" + NL + "<DT><STRONG>See Also:</STRONG>" + 39.256 + "</DT><DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.257 + "<CODE>C1.setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 39.258 + "</DD>" + NL + "</DL>"}, 39.259 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 39.260 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version" + 39.261 + " 1.5, replaced by" + NL + 39.262 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.263 + "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 39.264 + "</DD><DD>Reads the object stream." + NL + "<P>" + NL + 39.265 + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>Throws:" + 39.266 + "</STRONG></DT>" + NL + "<DD><CODE><code>" + 39.267 + "IOException</code></CODE></DD>" + NL + 39.268 + "<DD><CODE>java.io.IOException</CODE></DD></DL>" + NL + 39.269 + "</DD>" + NL + "</DL>"}, 39.270 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 39.271 + "<DD><STRONG>Deprecated.</STRONG> </DD><DD>" + 39.272 + "The name for this class." + NL + "<P>" + NL + "</DD>" + NL + 39.273 + "<DD> </DD>" + NL + "</DL>"}}; 39.274 + 39.275 + // Test with -nocomment and -nodeprecated options. The ClassDocs whould 39.276 + // not display definition lists for any member details. The serialized 39.277 + // form should display properly nested definition list tags for 39.278 + // deprecated information only. 39.279 + private static final String[][] TEST_NOCMNT_NODEPR = { 39.280 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<PRE>" + NL + "public void " + 39.281 + "<STRONG>readObject</STRONG>()" + NL + " throws" + 39.282 + " java.io.IOException</PRE>" + NL + "<HR>"}, 39.283 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<PRE>" +NL + "public <STRONG>" + 39.284 + "C2</STRONG>()</PRE>" + NL + "<HR>"}, 39.285 + {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "<PRE>" + NL + 39.286 + "public static final " + 39.287 + "<A HREF=\"../pkg1/C1.ModalExclusionType.html\" " + 39.288 + "title=\"enum in pkg1\">C1.ModalExclusionType</A> <STRONG>" + 39.289 + "APPLICATION_EXCLUDE</STRONG></PRE>" + NL + "<HR>"}, 39.290 + {BUG_ID + FS + "serialized-form.html", "<PRE>" + NL + "boolean <STRONG>" + 39.291 + "undecorated</STRONG></PRE>" + NL + "<DL>" + NL + "<DD><STRONG>" + 39.292 + "Deprecated.</STRONG> <I>As of JDK version 1.5, replaced by" + NL + 39.293 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\"><CODE>" + 39.294 + "setUndecorated(boolean)</CODE></A>.</I></DD></DL>"}, 39.295 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><STRONG>" + 39.296 + "Deprecated.</STRONG> <I>As of JDK version" + 39.297 + " 1.5, replaced by" + NL + 39.298 + " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 39.299 + "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 39.300 + "</DD></DL>"}, 39.301 + {BUG_ID + FS + "serialized-form.html", "<PRE>" + NL + "int <STRONG>" + 39.302 + "publicKey</STRONG></PRE>" + NL + "<DL>" + NL + "<DD><STRONG>" + 39.303 + "Deprecated.</STRONG> </DD></DL>"}}; 39.304 + 39.305 + // Test for valid HTML generation which should not comprise of empty 39.306 + // definition list tags. 39.307 + private static final String[][] NEGATED_TEST = { 39.308 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL></DL>"}, 39.309 + {BUG_ID + FS + "pkg1" + FS + "C1.html", "<DL>" + NL + "</DL>"}, 39.310 + {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "<DL></DL>"}, 39.311 + {BUG_ID + FS + "pkg1" + FS + "C1.ModalExclusionType.html", "<DL>" + NL + "</DL>"}, 39.312 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<DL></DL>"}, 39.313 + {BUG_ID + FS + "pkg1" + FS + "C2.html", "<DL>" + NL + "</DL>"}, 39.314 + {BUG_ID + FS + "pkg1" + FS + "C2.ModalType.html", "<DL></DL>"}, 39.315 + {BUG_ID + FS + "pkg1" + FS + "C2.ModalType.html", "<DL>" + NL + "</DL>"}, 39.316 + {BUG_ID + FS + "pkg1" + FS + "C3.html", "<DL></DL>"}, 39.317 + {BUG_ID + FS + "pkg1" + FS + "C3.html", "<DL>" + NL + "</DL>"}, 39.318 + {BUG_ID + FS + "pkg1" + FS + "C4.html", "<DL></DL>"}, 39.319 + {BUG_ID + FS + "pkg1" + FS + "C4.html", "<DL>" + NL + "</DL>"}, 39.320 + {BUG_ID + FS + "pkg1" + FS + "C5.html", "<DL></DL>"}, 39.321 + {BUG_ID + FS + "pkg1" + FS + "C5.html", "<DL>" + NL + "</DL>"}, 39.322 + {BUG_ID + FS + "overview-tree.html", "<DL></DL>"}, 39.323 + {BUG_ID + FS + "overview-tree.html", "<DL>" + NL + "</DL>"}, 39.324 + {BUG_ID + FS + "serialized-form.html", "<DL></DL>"}, 39.325 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "</DL>"}}; 39.326 + 39.327 + private static final String[] ARGS1 = 39.328 + new String[] { 39.329 + "-d", BUG_ID, "-sourcepath", SRC_DIR, "pkg1"}; 39.330 + 39.331 + private static final String[] ARGS2 = 39.332 + new String[] { 39.333 + "-d", BUG_ID, "-nocomment", "-sourcepath", SRC_DIR, "pkg1"}; 39.334 + 39.335 + private static final String[] ARGS3 = 39.336 + new String[] { 39.337 + "-d", BUG_ID, "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; 39.338 + 39.339 + private static final String[] ARGS4 = 39.340 + new String[] { 39.341 + "-d", BUG_ID, "-nocomment", "-nodeprecated", "-sourcepath", SRC_DIR, "pkg1"}; 39.342 + 39.343 + /** 39.344 + * The entry point of the test. 39.345 + * @param args the array of command line arguments. 39.346 + */ 39.347 + public static void main(String[] args) { 39.348 + TestHtmlDefinitionListTag tester = new TestHtmlDefinitionListTag(); 39.349 + run(tester, ARGS1, TEST_ALL, NEGATED_TEST); 39.350 + run(tester, ARGS1, TEST_CMNT_DEPR, NEGATED_TEST); 39.351 + run(tester, ARGS2, TEST_ALL, NEGATED_TEST); 39.352 + run(tester, ARGS2, TEST_NOCMNT, TEST_CMNT_DEPR); 39.353 + run(tester, ARGS3, TEST_ALL, NEGATED_TEST); 39.354 + run(tester, ARGS3, TEST_NODEPR, TEST_NOCMNT_NODEPR); 39.355 + run(tester, ARGS4, TEST_ALL, NEGATED_TEST); 39.356 + run(tester, ARGS4, TEST_NOCMNT_NODEPR, TEST_CMNT_DEPR); 39.357 + tester.printSummary(); 39.358 + } 39.359 + 39.360 + /** 39.361 + * {@inheritDoc} 39.362 + */ 39.363 + public String getBugId() { 39.364 + return BUG_ID; 39.365 + } 39.366 + 39.367 + /** 39.368 + * {@inheritDoc} 39.369 + */ 39.370 + public String getBugName() { 39.371 + return getClass().getName(); 39.372 + } 39.373 +}
40.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 40.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C1.java Mon Mar 09 23:53:41 2009 -0700 40.3 @@ -0,0 +1,108 @@ 40.4 +/* 40.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 40.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 40.7 + * 40.8 + * This code is free software; you can redistribute it and/or modify it 40.9 + * under the terms of the GNU General Public License version 2 only, as 40.10 + * published by the Free Software Foundation. Sun designates this 40.11 + * particular file as subject to the "Classpath" exception as provided 40.12 + * by Sun in the LICENSE file that accompanied this code. 40.13 + * 40.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 40.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 40.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 40.17 + * version 2 for more details (a copy is included in the LICENSE file that 40.18 + * accompanied this code). 40.19 + * 40.20 + * You should have received a copy of the GNU General Public License version 40.21 + * 2 along with this work; if not, write to the Free Software Foundation, 40.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 40.23 + * 40.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 40.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 40.26 + * have any questions. 40.27 + */ 40.28 + 40.29 +package pkg1; 40.30 + 40.31 +import java.io.IOException; 40.32 +import java.io.Serializable; 40.33 + 40.34 +/** 40.35 + * A class comment for testing. 40.36 + * 40.37 + * @author Bhavesh Patel 40.38 + * @see C2 40.39 + * @since JDK1.0 40.40 + */ 40.41 + 40.42 +public class C1 implements Serializable { 40.43 + 40.44 + /** 40.45 + * This field indicates whether the C1 is undecorated. 40.46 + * 40.47 + * @see #setUndecorated(boolean) 40.48 + * @since 1.4 40.49 + * @serial 40.50 + * @deprecated As of JDK version 1.5, replaced by 40.51 + * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}. 40.52 + */ 40.53 + @Deprecated 40.54 + public boolean undecorated = false; 40.55 + 40.56 + private String title; 40.57 + 40.58 + /** 40.59 + * This enum specifies the possible modal exclusion types. 40.60 + * 40.61 + * @since 1.6 40.62 + */ 40.63 + public static enum ModalExclusionType { 40.64 + /** 40.65 + * No modal exclusion. 40.66 + */ 40.67 + NO_EXCLUDE, 40.68 + /** 40.69 + * <code>APPLICATION_EXCLUDE</code> indicates that a top-level window 40.70 + * won't be blocked by any application-modal dialogs. Also, it isn't 40.71 + * blocked by document-modal dialogs from outside of its child hierarchy. 40.72 + */ 40.73 + APPLICATION_EXCLUDE 40.74 + }; 40.75 + 40.76 + /** 40.77 + * Constructor. 40.78 + * 40.79 + * @param title the title 40.80 + * @param test boolean value 40.81 + * @exception IllegalArgumentException if the <code>owner</code>'s 40.82 + * <code>GraphicsConfiguration</code> is not from a screen device 40.83 + * @exception HeadlessException 40.84 + */ 40.85 + public C1(String title, boolean test) { 40.86 + 40.87 + } 40.88 + 40.89 + public C1(String title) { 40.90 + 40.91 + } 40.92 + 40.93 + /** 40.94 + * Method comments. 40.95 + * @param undecorated <code>true</code> if no decorations are 40.96 + * to be enabled; 40.97 + * <code>false</code> if decorations are to be enabled. 40.98 + * @see #readObject() 40.99 + * @since 1.4 40.100 + */ 40.101 + public void setUndecorated(boolean undecorated) { 40.102 + /* Make sure we don't run in the middle of peer creation.*/ 40.103 + } 40.104 + 40.105 + /** 40.106 + * @see #setUndecorated(boolean) 40.107 + */ 40.108 + public void readObject() throws IOException { 40.109 + 40.110 + } 40.111 +}
41.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 41.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C2.java Mon Mar 09 23:53:41 2009 -0700 41.3 @@ -0,0 +1,86 @@ 41.4 +/* 41.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 41.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 41.7 + * 41.8 + * This code is free software; you can redistribute it and/or modify it 41.9 + * under the terms of the GNU General Public License version 2 only, as 41.10 + * published by the Free Software Foundation. Sun designates this 41.11 + * particular file as subject to the "Classpath" exception as provided 41.12 + * by Sun in the LICENSE file that accompanied this code. 41.13 + * 41.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 41.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 41.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 41.17 + * version 2 for more details (a copy is included in the LICENSE file that 41.18 + * accompanied this code). 41.19 + * 41.20 + * You should have received a copy of the GNU General Public License version 41.21 + * 2 along with this work; if not, write to the Free Software Foundation, 41.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 41.23 + * 41.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 41.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 41.26 + * have any questions. 41.27 + */ 41.28 + 41.29 +package pkg1; 41.30 + 41.31 +import java.io.ObjectInputStream; 41.32 +import java.io.IOException; 41.33 +import java.io.Serializable; 41.34 + 41.35 +/** 41.36 + * A class comment for testing. 41.37 + * 41.38 + * @author Bhavesh Patel 41.39 + * @see C1 41.40 + * @since JDK1.0 41.41 + */ 41.42 + 41.43 +public class C2 implements Serializable { 41.44 + 41.45 + /** 41.46 + * This field indicates title. 41.47 + */ 41.48 + String title; 41.49 + 41.50 + public static enum ModalType { 41.51 + NO_EXCLUDE 41.52 + }; 41.53 + 41.54 + /** 41.55 + * Constructor. 41.56 + * 41.57 + */ 41.58 + public C2() { 41.59 + 41.60 + } 41.61 + 41.62 + public C2(String title) { 41.63 + 41.64 + } 41.65 + 41.66 + /** 41.67 + * Set visible. 41.68 + * 41.69 + * @param set boolean 41.70 + * @since 1.4 41.71 + * @deprecated As of JDK version 1.5, replaced by 41.72 + * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}. 41.73 + */ 41.74 + @Deprecated 41.75 + public void setVisible(boolean set) { 41.76 + } 41.77 + 41.78 + /** 41.79 + * Reads the object stream. 41.80 + * 41.81 + * @param s ObjectInputStream 41.82 + * @throws <code>IOException</code> 41.83 + * @deprecated As of JDK version 1.5, replaced by 41.84 + * {@link C1#setUndecorated(boolean) setUndecorated(boolean)}. 41.85 + */ 41.86 + @Deprecated 41.87 + public void readObject(ObjectInputStream s) throws IOException { 41.88 + } 41.89 +}
42.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 42.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C3.java Mon Mar 09 23:53:41 2009 -0700 42.3 @@ -0,0 +1,42 @@ 42.4 +/* 42.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 42.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 42.7 + * 42.8 + * This code is free software; you can redistribute it and/or modify it 42.9 + * under the terms of the GNU General Public License version 2 only, as 42.10 + * published by the Free Software Foundation. Sun designates this 42.11 + * particular file as subject to the "Classpath" exception as provided 42.12 + * by Sun in the LICENSE file that accompanied this code. 42.13 + * 42.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 42.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 42.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 42.17 + * version 2 for more details (a copy is included in the LICENSE file that 42.18 + * accompanied this code). 42.19 + * 42.20 + * You should have received a copy of the GNU General Public License version 42.21 + * 2 along with this work; if not, write to the Free Software Foundation, 42.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 42.23 + * 42.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 42.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 42.26 + * have any questions. 42.27 + */ 42.28 + 42.29 +package pkg1; 42.30 + 42.31 +import java.lang.annotation.*; 42.32 + 42.33 +/** 42.34 + * Test Annotation class. 42.35 + * 42.36 + * @author Bhavesh Patel 42.37 + * @since 1.5 42.38 + */ 42.39 +@Retention(RetentionPolicy.SOURCE) 42.40 +public @interface C3 { 42.41 + /** 42.42 + * Comment. 42.43 + */ 42.44 + String[] value(); 42.45 +}
43.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 43.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C4.java Mon Mar 09 23:53:41 2009 -0700 43.3 @@ -0,0 +1,39 @@ 43.4 +/* 43.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 43.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 43.7 + * 43.8 + * This code is free software; you can redistribute it and/or modify it 43.9 + * under the terms of the GNU General Public License version 2 only, as 43.10 + * published by the Free Software Foundation. Sun designates this 43.11 + * particular file as subject to the "Classpath" exception as provided 43.12 + * by Sun in the LICENSE file that accompanied this code. 43.13 + * 43.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 43.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 43.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 43.17 + * version 2 for more details (a copy is included in the LICENSE file that 43.18 + * accompanied this code). 43.19 + * 43.20 + * You should have received a copy of the GNU General Public License version 43.21 + * 2 along with this work; if not, write to the Free Software Foundation, 43.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 43.23 + * 43.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 43.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 43.26 + * have any questions. 43.27 + */ 43.28 + 43.29 +package pkg1; 43.30 + 43.31 +import java.lang.annotation.*; 43.32 + 43.33 +/* 43.34 + * The @Inherited annotation has no effect when applied to an interface. 43.35 + */ 43.36 +@Documented 43.37 +@Retention(RetentionPolicy.RUNTIME) 43.38 +@Target(ElementType.TYPE) 43.39 +@Inherited 43.40 +public @interface C4 { 43.41 + boolean value() default true; 43.42 +}
44.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 44.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/pkg1/C5.java Mon Mar 09 23:53:41 2009 -0700 44.3 @@ -0,0 +1,65 @@ 44.4 +/* 44.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 44.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 44.7 + * 44.8 + * This code is free software; you can redistribute it and/or modify it 44.9 + * under the terms of the GNU General Public License version 2 only, as 44.10 + * published by the Free Software Foundation. Sun designates this 44.11 + * particular file as subject to the "Classpath" exception as provided 44.12 + * by Sun in the LICENSE file that accompanied this code. 44.13 + * 44.14 + * This code is distributed in the hope that it will be useful, but WITHOUT 44.15 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 44.16 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 44.17 + * version 2 for more details (a copy is included in the LICENSE file that 44.18 + * accompanied this code). 44.19 + * 44.20 + * You should have received a copy of the GNU General Public License version 44.21 + * 2 along with this work; if not, write to the Free Software Foundation, 44.22 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 44.23 + * 44.24 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 44.25 + * CA 95054 USA or visit www.sun.com if you need additional information or 44.26 + * have any questions. 44.27 + */ 44.28 + 44.29 +package pkg1; 44.30 + 44.31 +import java.io.Serializable; 44.32 + 44.33 +/** 44.34 + * Test for Serializable 44.35 + * 44.36 + * @author Bhavesh Patel 44.37 + * @deprecated This class is no longer used. 44.38 + */ 44.39 +@Deprecated 44.40 +public abstract class C5 implements Serializable { 44.41 + 44.42 + /** 44.43 + * The name for this class. 44.44 + * 44.45 + * @serial 44.46 + */ 44.47 + private String name; 44.48 + 44.49 + /** 44.50 + * @serial 44.51 + */ 44.52 + private int publicKey; 44.53 + 44.54 + /** 44.55 + * Constructor for serialization only. 44.56 + */ 44.57 + protected C5() { 44.58 + 44.59 + } 44.60 + 44.61 + /** 44.62 + * Prints general information. 44.63 + * 44.64 + */ 44.65 + public void printInfo() { 44.66 + 44.67 + } 44.68 +}
45.1 --- a/test/com/sun/javadoc/testIndex/TestIndex.java Mon Mar 09 13:34:19 2009 -0700 45.2 +++ b/test/com/sun/javadoc/testIndex/TestIndex.java Mon Mar 09 23:53:41 2009 -0700 45.3 @@ -73,10 +73,10 @@ 45.4 {BUG_ID + FS + "index-all.html", 45.5 "<DT><A HREF=\"./pkg/C.html#Java\"><STRONG>Java</STRONG></A> - " + NL + 45.6 "Static variable in class pkg.<A HREF=\"./pkg/C.html\" title=\"class in pkg\">C</A>" + NL + 45.7 - "<DD> " + NL + 45.8 + "</DT><DD> </DD>" + NL + NL + 45.9 "<DT><A HREF=\"./pkg/C.html#JDK\"><STRONG>JDK</STRONG></A> - " + NL + 45.10 "Static variable in class pkg.<A HREF=\"./pkg/C.html\" title=\"class in pkg\">C</A>" + NL + 45.11 - "<DD> "}, 45.12 + "</DT><DD> </DD>"}, 45.13 }; 45.14 private static final String[][] NEGATED_TEST = NO_TEST; 45.15
46.1 --- a/test/com/sun/javadoc/testInterface/TestInterface.java Mon Mar 09 13:34:19 2009 -0700 46.2 +++ b/test/com/sun/javadoc/testInterface/TestInterface.java Mon Mar 09 23:53:41 2009 -0700 46.3 @@ -55,7 +55,7 @@ 46.4 46.5 // Make sure known implementing class list is correct and omits type parameters. 46.6 {BUG_ID + FS + "pkg" + FS + "Interface.html", 46.7 - "<DT><STRONG>All Known Implementing Classes:</STRONG> " + 46.8 + "<DT><STRONG>All Known Implementing Classes:</STRONG></DT> " + 46.9 "<DD><A HREF=\"../pkg/Child.html\" " + 46.10 "title=\"class in pkg\">Child</A>, " + 46.11 "<A HREF=\"../pkg/Parent.html\" title=\"class in pkg\">" + 46.12 @@ -63,7 +63,9 @@ 46.13 46.14 // Make sure "All Implemented Interfaces": has substituted type parameters 46.15 {BUG_ID + FS + "pkg" + FS + "Child.html", 46.16 - "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/Interface.html\" title=\"interface in pkg\">Interface</A><T>" 46.17 + "<STRONG>All Implemented Interfaces:</STRONG></DT> <DD>" + 46.18 + "<A HREF=\"../pkg/Interface.html\" title=\"interface in pkg\">" + 46.19 + "Interface</A><T>" 46.20 }, 46.21 //Make sure Class Tree has substituted type parameters. 46.22 {BUG_ID + FS + "pkg" + FS + "Child.html", 46.23 @@ -75,15 +77,15 @@ 46.24 }, 46.25 //Make sure "Direct Know Subclasses" omits type parameters 46.26 {BUG_ID + FS + "pkg" + FS + "Parent.html", 46.27 - "<STRONG>Direct Known Subclasses:</STRONG> <DD><A HREF=\"../pkg/Child.html\" title=\"class in pkg\">Child</A>" 46.28 + "<STRONG>Direct Known Subclasses:</STRONG></DT> <DD><A HREF=\"../pkg/Child.html\" title=\"class in pkg\">Child</A>" 46.29 }, 46.30 //Make sure "Specified By" has substituted type parameters. 46.31 {BUG_ID + FS + "pkg" + FS + "Child.html", 46.32 - "<STRONG>Specified by:</STRONG><DD><CODE><A HREF=\"../pkg/Interface.html#method()\">method</A></CODE> in interface <CODE><A HREF=\"../pkg/Interface.html\" title=\"interface in pkg\">Interface</A><<A HREF=\"../pkg/Child.html\" title=\"type parameter in Child\">T</A>></CODE>" 46.33 + "<STRONG>Specified by:</STRONG></DT><DD><CODE><A HREF=\"../pkg/Interface.html#method()\">method</A></CODE> in interface <CODE><A HREF=\"../pkg/Interface.html\" title=\"interface in pkg\">Interface</A><<A HREF=\"../pkg/Child.html\" title=\"type parameter in Child\">T</A>></CODE>" 46.34 }, 46.35 //Make sure "Overrides" has substituted type parameters. 46.36 {BUG_ID + FS + "pkg" + FS + "Child.html", 46.37 - "<STRONG>Overrides:</STRONG><DD><CODE><A HREF=\"../pkg/Parent.html#method()\">method</A></CODE> in class <CODE><A HREF=\"../pkg/Parent.html\" title=\"class in pkg\">Parent</A><<A HREF=\"../pkg/Child.html\" title=\"type parameter in Child\">T</A>></CODE>" 46.38 + "<STRONG>Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg/Parent.html#method()\">method</A></CODE> in class <CODE><A HREF=\"../pkg/Parent.html\" title=\"class in pkg\">Parent</A><<A HREF=\"../pkg/Child.html\" title=\"type parameter in Child\">T</A>></CODE>" 46.39 }, 46.40 }; 46.41 private static final String[][] NEGATED_TEST = {
47.1 --- a/test/com/sun/javadoc/testLinkOption/TestLinkOption.java Mon Mar 09 13:34:19 2009 -0700 47.2 +++ b/test/com/sun/javadoc/testLinkOption/TestLinkOption.java Mon Mar 09 23:53:41 2009 -0700 47.3 @@ -63,7 +63,8 @@ 47.4 "title=\"class or interface in java.lang\">Object</A> p3)" 47.5 }, 47.6 {BUG_ID + "-1" + FS + "java" + FS + "lang" + FS + "StringBuilderChild.html", 47.7 - "public abstract class <STRONG>StringBuilderChild</STRONG><DT>extends <A HREF=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true\" title=\"class or interface in java.lang\">Object</A>" 47.8 + "public abstract class <STRONG>StringBuilderChild</STRONG>" + NL + 47.9 + "extends <A HREF=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true\" title=\"class or interface in java.lang\">Object</A>" 47.10 }, 47.11 47.12 };
48.1 --- a/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Mon Mar 09 13:34:19 2009 -0700 48.2 +++ b/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java Mon Mar 09 23:53:41 2009 -0700 48.3 @@ -59,7 +59,7 @@ 48.4 " Link to another inner class: <A HREF=\"../pkg/C.InnerC2.html\" title=\"class in pkg\"><CODE>C.InnerC2</CODE></A>" 48.5 }, 48.6 {BUG_ID + FS + "pkg" + FS + "C.InnerC2.html", 48.7 - "Enclosing class:</STRONG><DD><A HREF=\"../pkg/C.html\" title=\"class in pkg\">C</A>" 48.8 + "Enclosing class:</STRONG></DT><DD><A HREF=\"../pkg/C.html\" title=\"class in pkg\">C</A>" 48.9 }, 48.10 }; 48.11 private static final String[][] NEGATED_TEST = {
49.1 --- a/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Mon Mar 09 13:34:19 2009 -0700 49.2 +++ b/test/com/sun/javadoc/testMemberInheritence/TestMemberInheritence.java Mon Mar 09 23:53:41 2009 -0700 49.3 @@ -74,7 +74,7 @@ 49.4 49.5 // Test overriding/implementing methods with generic parameters. 49.6 {BUG_ID + FS + "pkg" + FS + "BaseClass.html", 49.7 - "<DT><STRONG>Specified by:</STRONG><DD><CODE><A HREF=\"../pkg/BaseInterface.html#getAnnotation(java.lang.Class)\">getAnnotation</A></CODE> in interface <CODE><A HREF=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">BaseInterface</A></CODE></DL>"}, 49.8 + "<DT><STRONG>Specified by:</STRONG></DT><DD><CODE><A HREF=\"../pkg/BaseInterface.html#getAnnotation(java.lang.Class)\">getAnnotation</A></CODE> in interface <CODE><A HREF=\"../pkg/BaseInterface.html\" title=\"interface in pkg\">BaseInterface</A></CODE></DD>"+NL+"</DL>"}, 49.9 49.10 // Test diamond inheritence member summary (6256068) 49.11 {BUG_ID + FS + "diamond" + FS + "Z.html",
50.1 --- a/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Mon Mar 09 13:34:19 2009 -0700 50.2 +++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java Mon Mar 09 23:53:41 2009 -0700 50.3 @@ -54,7 +54,7 @@ 50.4 {BUG_ID + FS + "pkg" + FS + "Coin.html", "Enum Coin</H2>"}, 50.5 //Make sure enum signature is correct. 50.6 {BUG_ID + FS + "pkg" + FS + "Coin.html", "public enum "+ 50.7 - "<STRONG>Coin</STRONG><DT>extends java.lang.Enum<" + 50.8 + "<STRONG>Coin</STRONG>" + NL + "extends java.lang.Enum<" + 50.9 "<A HREF=\"../pkg/Coin.html\" title=\"enum in pkg\">Coin</A>>" 50.10 }, 50.11 //Check for enum constant section 50.12 @@ -79,20 +79,20 @@ 50.13 "Class TypeParameters<E></H2>"}, 50.14 //Check class type parameters section. 50.15 {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 50.16 - "<DT><STRONG>Type Parameters:</STRONG><DD><CODE>E</CODE> - " + 50.17 + "<DT><STRONG>Type Parameters:</STRONG></DT><DD><CODE>E</CODE> - " + 50.18 "the type parameter for this class."}, 50.19 //Type parameters in @see/@link 50.20 {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 50.21 - "<DT><STRONG>See Also:</STRONG><DD><A HREF=\"../pkg/TypeParameters.html\" " + 50.22 - "title=\"class in pkg\"><CODE>TypeParameters</CODE></A></DL>"}, 50.23 + "<DT><STRONG>See Also:</STRONG></DT><DD><A HREF=\"../pkg/TypeParameters.html\" " + 50.24 + "title=\"class in pkg\"><CODE>TypeParameters</CODE></A></DD></DL>"}, 50.25 //Method that uses class type parameter. 50.26 {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 50.27 "(<A HREF=\"../pkg/TypeParameters.html\" title=\"type " + 50.28 "parameter in TypeParameters\">E</A> param)"}, 50.29 //Method type parameter section. 50.30 {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 50.31 - "<STRONG>Type Parameters:</STRONG><DD><CODE>T</CODE> - This is the first " + 50.32 - "type parameter.<DD><CODE>V</CODE> - This is the second type " + 50.33 + "<STRONG>Type Parameters:</STRONG></DT><DD><CODE>T</CODE> - This is the first " + 50.34 + "type parameter.</DD><DD><CODE>V</CODE> - This is the second type " + 50.35 "parameter."}, 50.36 //Signature of method with type parameters 50.37 {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 50.38 @@ -117,17 +117,17 @@ 50.39 //Signature of subclass that has type parameters. 50.40 {BUG_ID + FS + "pkg" + FS + "TypeParameterSubClass.html", 50.41 "public class <STRONG>TypeParameterSubClass<T extends java.lang.String>" + 50.42 - "</STRONG><DT>extends <A HREF=\"../pkg/TypeParameterSuperClass.html\" " + 50.43 + "</STRONG>" + NL + "extends <A HREF=\"../pkg/TypeParameterSuperClass.html\" " + 50.44 "title=\"class in pkg\">TypeParameterSuperClass</A><T>"}, 50.45 50.46 //Interface generic parameter substitution 50.47 //Signature of subclass that has type parameters. 50.48 {BUG_ID + FS + "pkg" + FS + "TypeParameters.html", 50.49 - "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/SubInterface.html\" title=\"interface in pkg\">SubInterface</A><E>, <A HREF=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">SuperInterface</A><E></DD>"}, 50.50 + "<STRONG>All Implemented Interfaces:</STRONG></DT> <DD><A HREF=\"../pkg/SubInterface.html\" title=\"interface in pkg\">SubInterface</A><E>, <A HREF=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">SuperInterface</A><E></DD>"}, 50.51 {BUG_ID + FS + "pkg" + FS + "SuperInterface.html", 50.52 - "<STRONG>All Known Subinterfaces:</STRONG> <DD><A HREF=\"../pkg/SubInterface.html\" title=\"interface in pkg\">SubInterface</A><V></DD>"}, 50.53 + "<STRONG>All Known Subinterfaces:</STRONG></DT> <DD><A HREF=\"../pkg/SubInterface.html\" title=\"interface in pkg\">SubInterface</A><V></DD>"}, 50.54 {BUG_ID + FS + "pkg" + FS + "SubInterface.html", 50.55 - "<STRONG>All Superinterfaces:</STRONG> <DD><A HREF=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">SuperInterface</A><V></DD>"}, 50.56 + "<STRONG>All Superinterfaces:</STRONG></DT> <DD><A HREF=\"../pkg/SuperInterface.html\" title=\"interface in pkg\">SuperInterface</A><V></DD>"}, 50.57 50.58 //================================= 50.59 // VAR ARG TESTING 50.60 @@ -166,7 +166,7 @@ 50.61 "Element Detail"}, 50.62 //Make sure default annotation type value is printed when necessary. 50.63 {BUG_ID + FS + "pkg" + FS + "AnnotationType.html", 50.64 - "<STRONG>Default:</STRONG><DD>\"unknown\"</DD>"}, 50.65 + "<STRONG>Default:</STRONG></DT><DD>\"unknown\"</DD>"}, 50.66 50.67 //================================= 50.68 // ANNOTATION TYPE USAGE TESTING 50.69 @@ -182,7 +182,8 @@ 50.70 "<FONT SIZE=\"-1\">" + 50.71 "<A HREF=\"../pkg/AnnotationType.html\" title=\"annotation in pkg\">@AnnotationType</A>(<A HREF=\"../pkg/AnnotationType.html#optional()\">optional</A>=\"Class Annotation\","+NL + 50.72 " <A HREF=\"../pkg/AnnotationType.html#required()\">required</A>=1994)"+NL + 50.73 - "</FONT>public class <STRONG>AnnotationTypeUsage</STRONG><DT>extends java.lang.Object</DL>"}, 50.74 + "</FONT>public class <STRONG>AnnotationTypeUsage</STRONG>" + NL + 50.75 + "extends java.lang.Object"}, 50.76 50.77 //FIELD 50.78 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html", 50.79 @@ -270,8 +271,7 @@ 50.80 {BUG_ID + FS + "pkg1" + FS + "B.html", 50.81 "<PRE><FONT SIZE=\"-1\"><A HREF=\"../pkg1/A.html\" title=\"annotation in pkg1\">@A</A>"}, 50.82 {BUG_ID + FS + "pkg1" + FS + "B.html", 50.83 - "</FONT>public interface <STRONG>B</STRONG></DL>" + NL + 50.84 - "</PRE>"}, 50.85 + "</FONT>public interface <STRONG>B</STRONG></PRE>"}, 50.86 50.87 50.88 //============================================================== 50.89 @@ -525,7 +525,7 @@ 50.90 "<FONT SIZE=\"-1\">" + NL + 50.91 "<A HREF=\"../pkg/AnnotationTypeUndocumented.html\" title=\"annotation in pkg\">@AnnotationTypeUndocumented</A>(<A HREF=\"../pkg/AnnotationType.html#optional\">optional</A>=\"Class Annotation\"," + NL + 50.92 " <A HREF=\"../pkg/AnnotationType.html#required\">required</A>=1994)" + NL + 50.93 - "</FONT>public class <STRONG>AnnotationTypeUsage</STRONG><DT>extends java.lang.Object</DL>"}, 50.94 + "</FONT>public class <STRONG>AnnotationTypeUsage</STRONG></DT><DT>extends java.lang.Object</DT></DL>"}, 50.95 50.96 //FIELD 50.97 {BUG_ID + FS + "pkg" + FS + "AnnotationTypeUsage.html",
51.1 --- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java Mon Mar 09 13:34:19 2009 -0700 51.2 +++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethods.java Mon Mar 09 23:53:41 2009 -0700 51.3 @@ -40,11 +40,11 @@ 51.4 private static final String[][] TEST = { 51.5 //The public method should be overriden 51.6 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 51.7 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 51.8 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 51.9 51.10 //The public method in different package should be overriden 51.11 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 51.12 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"} 51.13 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"} 51.14 }; 51.15 51.16 private static final String[][] NEGATED_TEST = { 51.17 @@ -52,20 +52,20 @@ 51.18 //The package private method should be overriden since the base and sub class are in the same 51.19 //package. However, the link should not show up because the package private methods are not documented. 51.20 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 51.21 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"}, 51.22 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"}, 51.23 51.24 //The private method in should not be overriden 51.25 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 51.26 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 51.27 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 51.28 51.29 //The private method in different package should not be overriden 51.30 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 51.31 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 51.32 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 51.33 51.34 //The package private method should not be overriden since the base and sub class are in 51.35 //different packages. 51.36 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 51.37 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"} 51.38 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"} 51.39 }; 51.40 51.41 private static final String[] ARGS =
52.1 --- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Mon Mar 09 13:34:19 2009 -0700 52.2 +++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPackageFlag.java Mon Mar 09 23:53:41 2009 -0700 52.3 @@ -40,32 +40,32 @@ 52.4 private static final String[][] TEST = { 52.5 //The public method should be overriden 52.6 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 52.7 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 52.8 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 52.9 52.10 //The public method in different package should be overriden 52.11 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 52.12 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 52.13 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 52.14 52.15 //The package private method should be overriden since the base and sub class are in the same 52.16 //package. 52.17 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 52.18 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"} 52.19 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"} 52.20 }; 52.21 52.22 private static final String[][] NEGATED_TEST = { 52.23 52.24 //The private method in should not be overriden 52.25 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 52.26 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 52.27 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 52.28 52.29 //The private method in different package should not be overriden 52.30 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 52.31 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 52.32 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 52.33 52.34 //The package private method should not be overriden since the base and sub class are in 52.35 //different packages. 52.36 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 52.37 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"}, 52.38 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"}, 52.39 }; 52.40 52.41 private static final String[] ARGS =
53.1 --- a/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java Mon Mar 09 13:34:19 2009 -0700 53.2 +++ b/test/com/sun/javadoc/testOverridenMethods/TestOverridenPrivateMethodsWithPrivateFlag.java Mon Mar 09 23:53:41 2009 -0700 53.3 @@ -40,32 +40,32 @@ 53.4 private static final String[][] TEST = { 53.5 //The public method should be overriden 53.6 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 53.7 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 53.8 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 53.9 53.10 //The package private method should be overriden since the base and sub class are in the same 53.11 //package. 53.12 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 53.13 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"}, 53.14 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"}, 53.15 53.16 //The public method in different package should be overriden 53.17 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 53.18 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 53.19 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#publicMethod"}, 53.20 }; 53.21 53.22 private static final String[][] NEGATED_TEST = { 53.23 53.24 //The private method in should not be overriden 53.25 {BUG_ID + FS + "pkg1" + FS + "SubClass.html", 53.26 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 53.27 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 53.28 53.29 //The private method in different package should not be overriden 53.30 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 53.31 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 53.32 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#privateMethod"}, 53.33 53.34 //The package private method should not be overriden since the base and sub class are in 53.35 //different packages. 53.36 {BUG_ID + FS + "pkg2" + FS + "SubClass.html", 53.37 - "Overrides:</STRONG><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"} 53.38 + "Overrides:</STRONG></DT><DD><CODE><A HREF=\"../pkg1/BaseClass.html#packagePrivateMethod"} 53.39 53.40 53.41 };
54.1 --- a/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java Mon Mar 09 13:34:19 2009 -0700 54.2 +++ b/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java Mon Mar 09 23:53:41 2009 -0700 54.3 @@ -48,12 +48,12 @@ 54.4 private static final String[][] TEST = { 54.5 //Regular param tags. 54.6 {BUG_ID + FS + "pkg" + FS + "C.html", 54.7 - "<STRONG>Parameters:</STRONG><DD><CODE>param1</CODE> - testing 1 2 3." + 54.8 + "<STRONG>Parameters:</STRONG></DT><DD><CODE>param1</CODE> - testing 1 2 3.</DD>" + 54.9 "<DD><CODE>param2</CODE> - testing 1 2 3." 54.10 }, 54.11 //Param tags that don't match with any real parameters. 54.12 {BUG_ID + FS + "pkg" + FS + "C.html", 54.13 - "<STRONG>Parameters:</STRONG><DD><CODE><I>p1</I></CODE> - testing 1 2 3." + 54.14 + "<STRONG>Parameters:</STRONG></DT><DD><CODE><I>p1</I></CODE> - testing 1 2 3.</DD>" + 54.15 "<DD><CODE><I>p2</I></CODE> - testing 1 2 3." 54.16 }, 54.17 //{@inherit} doc misuse does not cause doclet to throw exception.
55.1 --- a/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Mon Mar 09 13:34:19 2009 -0700 55.2 +++ b/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java Mon Mar 09 23:53:41 2009 -0700 55.3 @@ -96,11 +96,11 @@ 55.4 55.5 //Make sure implemented interfaces from private superclass are inherited 55.6 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicInterface.html", 55.7 - "<STRONG>All Known Implementing Classes:</STRONG> <DD><A HREF=\"../pkg/PublicChild.html\" " + 55.8 + "<STRONG>All Known Implementing Classes:</STRONG></DT> <DD><A HREF=\"../pkg/PublicChild.html\" " + 55.9 "title=\"class in pkg\">PublicChild</A>"}, 55.10 55.11 {BUG_ID + "-1" + FS + "pkg" + FS + "PublicChild.html", 55.12 - "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/PublicInterface.html\" " + 55.13 + "<STRONG>All Implemented Interfaces:</STRONG></DT> <DD><A HREF=\"../pkg/PublicInterface.html\" " + 55.14 "title=\"interface in pkg\">PublicInterface</A>"}, 55.15 55.16 //Generic interface method test. 55.17 @@ -174,18 +174,18 @@ 55.18 }, 55.19 // Should document that a method overrides method from private class. 55.20 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 55.21 - "<STRONG>Overrides:</STRONG><DD><CODE>" + 55.22 + "<STRONG>Overrides:</STRONG></DT><DD><CODE>" + 55.23 "<A HREF=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[], int, T, V, java.util.List)\">" + 55.24 "methodOverridenFromParent</A></CODE> in class <CODE>" + 55.25 "<A HREF=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" + 55.26 - "PrivateParent</A></CODE></DL>"}, 55.27 + "PrivateParent</A></CODE></DD>" + NL + "</DL>"}, 55.28 // Should document that a method is specified by private interface. 55.29 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 55.30 - "<STRONG>Specified by:</STRONG><DD><CODE>" + 55.31 + "<STRONG>Specified by:</STRONG></DT><DD><CODE>" + 55.32 "<A HREF=\"../pkg/PrivateInterface.html#methodInterface(int)\">" + 55.33 "methodInterface</A></CODE> in interface <CODE>" + 55.34 "<A HREF=\"../pkg/PrivateInterface.html\" title=\"interface in pkg\">" + 55.35 - "PrivateInterface</A></CODE></DL>" + NL + "</DD>"}, 55.36 + "PrivateInterface</A></CODE></DD>" + NL + "</DL>" + NL + "</DD>"}, 55.37 // Method inheritence from non-public superinterface. 55.38 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", 55.39 "Methods inherited from interface " + 55.40 @@ -209,12 +209,12 @@ 55.41 55.42 //Make sure implemented interfaces from private superclass are inherited 55.43 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicInterface.html", 55.44 - "<STRONG>All Known Implementing Classes:</STRONG> <DD><A HREF=\"../pkg/PrivateParent.html\" " + 55.45 + "<STRONG>All Known Implementing Classes:</STRONG></DT> <DD><A HREF=\"../pkg/PrivateParent.html\" " + 55.46 "title=\"class in pkg\">PrivateParent</A>, " + 55.47 "<A HREF=\"../pkg/PublicChild.html\" title=\"class in pkg\">PublicChild</A>"}, 55.48 55.49 {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html", 55.50 - "<STRONG>All Implemented Interfaces:</STRONG> <DD><A HREF=\"../pkg/PrivateInterface.html\" " + 55.51 + "<STRONG>All Implemented Interfaces:</STRONG></DT> <DD><A HREF=\"../pkg/PrivateInterface.html\" " + 55.52 "title=\"interface in pkg\">PrivateInterface</A>, " + 55.53 "<A HREF=\"../pkg/PublicInterface.html\" title=\"interface in pkg\">" + 55.54 "PublicInterface</A>"}, 55.55 @@ -226,7 +226,7 @@ 55.56 "<CODE><A HREF=\"../pkg2/I.html#hello(T)\">I</A></CODE></STRONG>"}, 55.57 55.58 {BUG_ID + "-2" + FS + "pkg2" + FS + "C.html", 55.59 - "<STRONG>Specified by:</STRONG><DD><CODE><A HREF=\"../pkg2/I.html#hello(T)\">" + 55.60 + "<STRONG>Specified by:</STRONG></DT><DD><CODE><A HREF=\"../pkg2/I.html#hello(T)\">" + 55.61 "hello</A></CODE> in interface <CODE><A HREF=\"../pkg2/I.html\" " + 55.62 "title=\"interface in pkg2\">I</A>"}, 55.63 };
56.1 --- a/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Mon Mar 09 13:34:19 2009 -0700 56.2 +++ b/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java Mon Mar 09 23:53:41 2009 -0700 56.3 @@ -41,39 +41,39 @@ 56.4 // Test for normal run of javadoc. The serialized-form.html should 56.5 // display the inline comments, tags and deprecation information if any. 56.6 private static final String[][] TEST_CMNT_DEPR = { 56.7 - {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><DL>" + NL + NL + 56.8 - "<DT><STRONG>Throws:</STRONG>" + NL + "<DD><CODE>" + 56.9 - "java.io.IOException</CODE><DT><STRONG>See Also:</STRONG>" + 56.10 - "<DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.11 - "<CODE>C1.setUndecorated(boolean)</CODE></A></DD>" + NL + 56.12 - "</DL>" + NL + "</DL>"}, 56.13 + {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><DL>" + NL + 56.14 + "<DT><STRONG>Throws:</STRONG></DT>" + NL + "<DD><CODE>" + 56.15 + "java.io.IOException</CODE></DD><DT><STRONG>See Also:</STRONG>" + 56.16 + "</DT><DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.17 + "<CODE>C1.setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 56.18 + "</DD>" + NL + "</DL>"}, 56.19 {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 56.20 - "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version" + 56.21 - " 1.5, replaced by" + NL + 56.22 + "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version " + 56.23 + "1.5, replaced by" + NL + 56.24 " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.25 - "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + 56.26 + "<CODE>setUndecorated(boolean)</CODE></A>.</I></DD>" + 56.27 "<DD>This field indicates whether the C1 is undecorated." + NL + 56.28 - "<P>" + NL + "<DT><DD> <DL>" + NL + 56.29 - "<DT><STRONG>Since:</STRONG></DT>" + NL + 56.30 + "<P>" + NL + "</DD>" + NL + "<DD> </DD>" + NL + 56.31 + "<DD><DL>" + NL + "<DT><STRONG>Since:</STRONG></DT>" + NL + 56.32 " <DD>1.4</DD>" + NL + "<DT><STRONG>See Also:</STRONG>" + 56.33 - "<DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.34 - "<CODE>C1.setUndecorated(boolean)</CODE></A></DL>" + NL + 56.35 - "</DL>"}, 56.36 + "</DT><DD><A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.37 + "<CODE>C1.setUndecorated(boolean)</CODE></A></DD></DL>" + NL + 56.38 + "</DD>" + NL + "</DL>"}, 56.39 {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 56.40 "<DD><STRONG>Deprecated.</STRONG> <I>As of JDK version" + 56.41 " 1.5, replaced by" + NL + 56.42 " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.43 "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 56.44 - "<DD>Reads the object stream." + NL + "<P>" + NL + 56.45 - "<DD><DL>" + NL + NL + "<DT><STRONG>Throws:" + 56.46 - "</STRONG>" + NL + "<DD><CODE><code>" + 56.47 - "IOException</code></CODE>" + NL + 56.48 - "<DD><CODE>java.io.IOException</CODE></DD>" + NL + 56.49 - "</DL>" + NL + "</DL>"}, 56.50 + "</DD><DD>Reads the object stream." + NL + "<P>" + NL + 56.51 + "</DD>" + NL + "<DD><DL>" + NL + "<DT><STRONG>Throws:" + 56.52 + "</STRONG></DT>" + NL + "<DD><CODE><code>" + 56.53 + "IOException</code></CODE></DD>" + NL + 56.54 + "<DD><CODE>java.io.IOException</CODE></DD></DL>" + NL + 56.55 + "</DD>" + NL + "</DL>"}, 56.56 {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + 56.57 - "<DD><STRONG>Deprecated.</STRONG> <DD>" + 56.58 - "The name for this class." + NL + "<P>" + NL + 56.59 - "<DT><DD> <DL>" + NL + "</DL>" + NL + "</DL>"}}; 56.60 + "<DD><STRONG>Deprecated.</STRONG> </DD><DD>" + 56.61 + "The name for this class." + NL + "<P>" + NL + "</DD>" + NL + 56.62 + "<DD> </DD>" + NL + "</DL>"}}; 56.63 56.64 // Test with -nocomment option. The serialized-form.html should 56.65 // not display the inline comments and tags but should display deprecation 56.66 @@ -83,16 +83,16 @@ 56.67 "undecorated</STRONG></PRE>" + NL + "<DL>" + NL + "<DD><STRONG>" + 56.68 "Deprecated.</STRONG> <I>As of JDK version 1.5, replaced by" + NL + 56.69 " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\"><CODE>" + 56.70 - "setUndecorated(boolean)</CODE></A>.</I></DL>"}, 56.71 + "setUndecorated(boolean)</CODE></A>.</I></DD></DL>"}, 56.72 {BUG_ID + FS + "serialized-form.html", "<DL>" + NL + "<DD><STRONG>" + 56.73 "Deprecated.</STRONG> <I>As of JDK version" + 56.74 " 1.5, replaced by" + NL + 56.75 " <A HREF=\"pkg1/C1.html#setUndecorated(boolean)\">" + 56.76 "<CODE>setUndecorated(boolean)</CODE></A>.</I>" + NL + "<P>" + NL + 56.77 - "</DL>"}, 56.78 + "</DD></DL>"}, 56.79 {BUG_ID + FS + "serialized-form.html", "<PRE>" + NL + "int <STRONG>" + 56.80 "publicKey</STRONG></PRE>" + NL + "<DL>" + NL + "<DD><STRONG>" + 56.81 - "Deprecated.</STRONG> </DL>"}}; 56.82 + "Deprecated.</STRONG> </DD></DL>"}}; 56.83 56.84 // Test with -nodeprecated option. The serialized-form.html should 56.85 // ignore the -nodeprecated tag and display the deprecation info. This
57.1 --- a/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java Mon Mar 09 13:34:19 2009 -0700 57.2 +++ b/test/com/sun/javadoc/testThrowsTag/TestThrowsTag.java Mon Mar 09 23:53:41 2009 -0700 57.3 @@ -46,14 +46,14 @@ 57.4 //Input for string search tests. 57.5 private static final String[][] TEST = { 57.6 {BUG_ID + FS + "pkg" + FS + "C.html", 57.7 - "<DD><CODE><A HREF=\"../pkg/T1.html\" title=\"class in pkg\">T1</A></CODE> - the first throws tag." + NL + 57.8 - "<DD><CODE><A HREF=\"../pkg/T2.html\" title=\"class in pkg\">T2</A></CODE> - the second throws tag." + NL + 57.9 - "<DD><CODE><A HREF=\"../pkg/T3.html\" title=\"class in pkg\">T3</A></CODE> - the third throws tag." + NL + 57.10 - "<DD><CODE><A HREF=\"../pkg/T4.html\" title=\"class in pkg\">T4</A></CODE> - the fourth throws tag." + NL + 57.11 - "<DD><CODE><A HREF=\"../pkg/T5.html\" title=\"class in pkg\">T5</A></CODE> - the first inherited throws tag." + NL + 57.12 - "<DD><CODE><A HREF=\"../pkg/T6.html\" title=\"class in pkg\">T6</A></CODE> - the second inherited throws tag." + NL + 57.13 - "<DD><CODE><A HREF=\"../pkg/T7.html\" title=\"class in pkg\">T7</A></CODE> - the third inherited throws tag." + NL + 57.14 - "<DD><CODE><A HREF=\"../pkg/T8.html\" title=\"class in pkg\">T8</A></CODE> - the fourth inherited throws tag." 57.15 + "<DD><CODE><A HREF=\"../pkg/T1.html\" title=\"class in pkg\">T1</A></CODE> - the first throws tag.</DD>" + NL + 57.16 + "<DD><CODE><A HREF=\"../pkg/T2.html\" title=\"class in pkg\">T2</A></CODE> - the second throws tag.</DD>" + NL + 57.17 + "<DD><CODE><A HREF=\"../pkg/T3.html\" title=\"class in pkg\">T3</A></CODE> - the third throws tag.</DD>" + NL + 57.18 + "<DD><CODE><A HREF=\"../pkg/T4.html\" title=\"class in pkg\">T4</A></CODE> - the fourth throws tag.</DD>" + NL + 57.19 + "<DD><CODE><A HREF=\"../pkg/T5.html\" title=\"class in pkg\">T5</A></CODE> - the first inherited throws tag.</DD>" + NL + 57.20 + "<DD><CODE><A HREF=\"../pkg/T6.html\" title=\"class in pkg\">T6</A></CODE> - the second inherited throws tag.</DD>" + NL + 57.21 + "<DD><CODE><A HREF=\"../pkg/T7.html\" title=\"class in pkg\">T7</A></CODE> - the third inherited throws tag.</DD>" + NL + 57.22 + "<DD><CODE><A HREF=\"../pkg/T8.html\" title=\"class in pkg\">T8</A></CODE> - the fourth inherited throws tag.</DD>" 57.23 }, 57.24 }; 57.25 private static final String[][] NEGATED_TEST = NO_TEST;
58.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 58.2 +++ b/test/tools/javac/Diagnostics/6799605/T6799605.java Mon Mar 09 23:53:41 2009 -0700 58.3 @@ -0,0 +1,43 @@ 58.4 +/* 58.5 + * Copyright 2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 58.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 58.24 + * have any questions. 58.25 + */ 58.26 + 58.27 +/** 58.28 + * @test 58.29 + * @bug 6799605 58.30 + * @summary Basic/Raw formatters should use type/symbol printer instead of toString() 58.31 + * @author mcimadamore 58.32 + * @compile/fail/ref=T6799605.out -XDrawDiagnostics T6799605.java 58.33 + */ 58.34 + 58.35 +class T6799605<X> { 58.36 + 58.37 + <T extends T6799605<T>> void m(T6799605<T> x1) {} 58.38 + <T> void m(T6799605<T> x1, T6799605<T> x2) {} 58.39 + <T> void m(T6799605<T> x1, T6799605<T> x2, T6799605<T> x3) {} 58.40 + 58.41 + void test(T6799605<?> t) { 58.42 + m(t); 58.43 + m(t, t); 58.44 + m(t, t, t); 58.45 + } 58.46 +}
59.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 59.2 +++ b/test/tools/javac/Diagnostics/6799605/T6799605.out Mon Mar 09 23:53:41 2009 -0700 59.3 @@ -0,0 +1,4 @@ 59.4 +T6799605.java:39:9: compiler.err.cant.resolve.location.args: kindname.method, m, , T6799605<compiler.misc.type.captureof: 1, ?>, kindname.class, T6799605<X> 59.5 +T6799605.java:40:9: compiler.err.cant.resolve.location.args: kindname.method, m, , T6799605<compiler.misc.type.captureof: 1, ?>,T6799605<compiler.misc.type.captureof: 2, ?>, kindname.class, T6799605<X> 59.6 +T6799605.java:41:9: compiler.err.cant.resolve.location.args: kindname.method, m, , T6799605<compiler.misc.type.captureof: 1, ?>,T6799605<compiler.misc.type.captureof: 2, ?>,T6799605<compiler.misc.type.captureof: 3, ?>, kindname.class, T6799605<X> 59.7 +3 errors
60.1 --- a/test/tools/javac/NestedInnerClassNames.out Mon Mar 09 13:34:19 2009 -0700 60.2 +++ b/test/tools/javac/NestedInnerClassNames.out Mon Mar 09 23:53:41 2009 -0700 60.3 @@ -1,15 +1,15 @@ 60.4 -NestedInnerClassNames.java:16:5: compiler.err.already.defined: NestedInnerClassNames, unnamed package 60.5 +NestedInnerClassNames.java:16:5: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package 60.6 NestedInnerClassNames.java:23:9: compiler.err.already.defined: NestedInnerClassNames.foo, NestedInnerClassNames 60.7 -NestedInnerClassNames.java:34:9: compiler.err.already.defined: NestedInnerClassNames, unnamed package 60.8 +NestedInnerClassNames.java:34:9: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package 60.9 NestedInnerClassNames.java:45:9: compiler.err.already.defined: NestedInnerClassNames.baz, NestedInnerClassNames 60.10 NestedInnerClassNames.java:46:13: compiler.err.already.defined: NestedInnerClassNames.baz.baz, NestedInnerClassNames.baz 60.11 NestedInnerClassNames.java:59:9: compiler.err.already.defined: NestedInnerClassNames.foo$bar, NestedInnerClassNames 60.12 NestedInnerClassNames.java:76:13: compiler.err.already.defined: NestedInnerClassNames.$bar, NestedInnerClassNames 60.13 NestedInnerClassNames.java:90:13: compiler.err.already.defined: NestedInnerClassNames.bar$bar.bar, NestedInnerClassNames.bar$bar 60.14 NestedInnerClassNames.java:109:5: compiler.err.duplicate.class: NestedInnerClassNames.foo.foo 60.15 -NestedInnerClassNames.java:19:9: compiler.err.already.defined: NestedInnerClassNames, unnamed package 60.16 +NestedInnerClassNames.java:19:9: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package 60.17 NestedInnerClassNames.java:28:13: compiler.err.already.defined: foo, m2() 60.18 -NestedInnerClassNames.java:40:13: compiler.err.already.defined: NestedInnerClassNames, unnamed package 60.19 +NestedInnerClassNames.java:40:13: compiler.err.already.defined: NestedInnerClassNames, compiler.misc.unnamed.package 60.20 NestedInnerClassNames.java:52:13: compiler.err.already.defined: baz, m4() 60.21 NestedInnerClassNames.java:53:17: compiler.err.already.defined: baz.baz, baz 60.22 NestedInnerClassNames.java:67:13: compiler.err.already.defined: foo$bar, m5()
61.1 --- a/test/tools/javac/T6241723.out Mon Mar 09 13:34:19 2009 -0700 61.2 +++ b/test/tools/javac/T6241723.out Mon Mar 09 23:53:41 2009 -0700 61.3 @@ -1,6 +1,6 @@ 61.4 -T6241723.java:21:5: compiler.warn.has.been.deprecated: A1, unnamed package 61.5 +T6241723.java:21:5: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 61.6 T6241723.java:23:7: compiler.warn.has.been.deprecated: A2.A21, A2 61.7 -T6241723.java:26:5: compiler.warn.has.been.deprecated: Z1, unnamed package 61.8 +T6241723.java:26:5: compiler.warn.has.been.deprecated: Z1, compiler.misc.unnamed.package 61.9 T6241723.java:28:7: compiler.warn.has.been.deprecated: Z2.Z21, Z2 61.10 - compiler.err.warnings.and.werror 61.11 1 error
62.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 62.2 +++ b/test/tools/javac/cast/6467183/T6467183a.java Mon Mar 09 23:53:41 2009 -0700 62.3 @@ -0,0 +1,53 @@ 62.4 +/* 62.5 + * Copyright 2009 Sun Microsystems, Inc. All Rights Reserved. 62.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 62.7 + * 62.8 + * This code is free software; you can redistribute it and/or modify it 62.9 + * under the terms of the GNU General Public License version 2 only, as 62.10 + * published by the Free Software Foundation. 62.11 + * 62.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 62.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 62.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 62.15 + * version 2 for more details (a copy is included in the LICENSE file that 62.16 + * accompanied this code). 62.17 + * 62.18 + * You should have received a copy of the GNU General Public License version 62.19 + * 2 along with this work; if not, write to the Free Software Foundation, 62.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 62.21 + * 62.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 62.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 62.24 + * have any questions. 62.25 + */ 62.26 + 62.27 +/* 62.28 + * @test 62.29 + * @author mcimadamore 62.30 + * @bug 6467183 62.31 + * @summary 62.32 + * @compile/fail/ref=T6467183a.out -Xlint:unchecked -Werror -XDrawDiagnostics T6467183a.java 62.33 + */ 62.34 + 62.35 +class T6467183a<T> { 62.36 + 62.37 + class A<S> {} 62.38 + class B extends A<Integer> {} 62.39 + class C<X> extends A<X> {} 62.40 + 62.41 + void cast1(B b) { 62.42 + Object o = (A<T>)b; 62.43 + } 62.44 + 62.45 + void cast2(B b) { 62.46 + Object o = (A<? extends Number>)b; 62.47 + } 62.48 + 62.49 + void cast3(A<Integer> a) { 62.50 + Object o = (C<? extends Number>)a; 62.51 + } 62.52 + 62.53 + void cast4(A<Integer> a) { 62.54 + Object o = (C<? extends Integer>)a; 62.55 + } 62.56 +}
63.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 63.2 +++ b/test/tools/javac/cast/6467183/T6467183a.out Mon Mar 09 23:53:41 2009 -0700 63.3 @@ -0,0 +1,6 @@ 63.4 +T6467183a.java:39:26: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6467183a<T>.B, T6467183a<T>.A<T> 63.5 +T6467183a.java:47:41: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6467183a<T>.A<java.lang.Integer>, T6467183a<T>.C<? extends java.lang.Number> 63.6 +T6467183a.java:51:42: compiler.warn.prob.found.req: (compiler.misc.unchecked.cast.to.type), T6467183a<T>.A<java.lang.Integer>, T6467183a<T>.C<? extends java.lang.Integer> 63.7 +- compiler.err.warnings.and.werror 63.8 +1 error 63.9 +3 warnings
64.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 64.2 +++ b/test/tools/javac/cast/6467183/T6467183b.java Mon Mar 09 23:53:41 2009 -0700 64.3 @@ -0,0 +1,40 @@ 64.4 +/* 64.5 + * Copyright 2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 64.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 64.24 + * have any questions. 64.25 + */ 64.26 + 64.27 +/* 64.28 + * @test 64.29 + * @author mcimadamore 64.30 + * @bug 6467183 64.31 + * @summary 64.32 + * @compile/fail -Xlint:unchecked -Werror -XDrawDiagnostics T6467183b.java 64.33 + */ 64.34 + 64.35 +class T6665356b<T> { 64.36 + 64.37 + class A<S> {} 64.38 + class B<X> extends A<X> {} 64.39 + 64.40 + void cast(A<? extends Number> a) { 64.41 + Object o = (B<? extends Integer>)a; 64.42 + } 64.43 +}
65.1 --- a/test/tools/javac/depDocComment/SuppressDeprecation.out Mon Mar 09 13:34:19 2009 -0700 65.2 +++ b/test/tools/javac/depDocComment/SuppressDeprecation.out Mon Mar 09 23:53:41 2009 -0700 65.3 @@ -1,4 +1,4 @@ 65.4 -SuppressDeprecation.java:130:17: compiler.warn.has.been.deprecated: X, unnamed package 65.5 +SuppressDeprecation.java:130:17: compiler.warn.has.been.deprecated: X, compiler.misc.unnamed.package 65.6 SuppressDeprecation.java:82:10: compiler.warn.has.been.deprecated: g(), T 65.7 SuppressDeprecation.java:83:14: compiler.warn.has.been.deprecated: g(), T 65.8 SuppressDeprecation.java:84:9: compiler.warn.has.been.deprecated: var, T
66.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 66.2 +++ b/test/tools/javac/generics/typevars/6804733/T6804733.java Mon Mar 09 23:53:41 2009 -0700 66.3 @@ -0,0 +1,35 @@ 66.4 +/* 66.5 + * Copyright 2009 Sun Microsystems, Inc. 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 Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 66.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 66.24 + * have any questions. 66.25 + */ 66.26 + 66.27 +/* 66.28 + * @test 66.29 + * @bug 6804733 66.30 + * @summary javac generates spourious diagnostics for ill-formed type-variable bounds 66.31 + * @author mcimadamore 66.32 + * @compile/fail/ref=T6804733.out -XDrawDiagnostics T6804733.java 66.33 + */ 66.34 + 66.35 +import java.util.ArrayList; 66.36 +class T6804733<S> extends ArrayList<S> { 66.37 + <T extends S & S> void m() {} 66.38 +}
67.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 67.2 +++ b/test/tools/javac/generics/typevars/6804733/T6804733.out Mon Mar 09 23:53:41 2009 -0700 67.3 @@ -0,0 +1,2 @@ 67.4 +T6804733.java:34:20: compiler.err.type.var.may.not.be.followed.by.other.bounds 67.5 +1 error
68.1 --- a/test/tools/javac/mandatoryWarnings/deprecated/Test3.out Mon Mar 09 13:34:19 2009 -0700 68.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Test3.out Mon Mar 09 23:53:41 2009 -0700 68.3 @@ -1,3 +1,3 @@ 68.4 -A.java:10:9: compiler.warn.has.been.deprecated: A1, unnamed package 68.5 -A.java:10:21: compiler.warn.has.been.deprecated: A1, unnamed package 68.6 +A.java:10:9: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 68.7 +A.java:10:21: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 68.8 2 warnings
69.1 --- a/test/tools/javac/mandatoryWarnings/deprecated/Test3b.out Mon Mar 09 13:34:19 2009 -0700 69.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Test3b.out Mon Mar 09 23:53:41 2009 -0700 69.3 @@ -1,3 +1,3 @@ 69.4 -A.java:10:9: compiler.warn.has.been.deprecated: A1, unnamed package 69.5 +A.java:10:9: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 69.6 - compiler.note.deprecated.filename.additional: A.java 69.7 1 warning
70.1 --- a/test/tools/javac/mandatoryWarnings/deprecated/Test4.out Mon Mar 09 13:34:19 2009 -0700 70.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Test4.out Mon Mar 09 23:53:41 2009 -0700 70.3 @@ -1,7 +1,7 @@ 70.4 -A.java:10:9: compiler.warn.has.been.deprecated: A1, unnamed package 70.5 -A.java:10:21: compiler.warn.has.been.deprecated: A1, unnamed package 70.6 -B.java:11:9: compiler.warn.has.been.deprecated: B1, unnamed package 70.7 -B.java:11:21: compiler.warn.has.been.deprecated: B1, unnamed package 70.8 -B.java:12:9: compiler.warn.has.been.deprecated: B1, unnamed package 70.9 -B.java:12:22: compiler.warn.has.been.deprecated: B1, unnamed package 70.10 +A.java:10:9: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 70.11 +A.java:10:21: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 70.12 +B.java:11:9: compiler.warn.has.been.deprecated: B1, compiler.misc.unnamed.package 70.13 +B.java:11:21: compiler.warn.has.been.deprecated: B1, compiler.misc.unnamed.package 70.14 +B.java:12:9: compiler.warn.has.been.deprecated: B1, compiler.misc.unnamed.package 70.15 +B.java:12:22: compiler.warn.has.been.deprecated: B1, compiler.misc.unnamed.package 70.16 6 warnings
71.1 --- a/test/tools/javac/mandatoryWarnings/deprecated/Test4b.out Mon Mar 09 13:34:19 2009 -0700 71.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Test4b.out Mon Mar 09 23:53:41 2009 -0700 71.3 @@ -1,3 +1,3 @@ 71.4 -A.java:10:9: compiler.warn.has.been.deprecated: A1, unnamed package 71.5 +A.java:10:9: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 71.6 - compiler.note.deprecated.plural.additional 71.7 1 warning
72.1 --- a/test/tools/javac/mandatoryWarnings/deprecated/Test4c.out Mon Mar 09 13:34:19 2009 -0700 72.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Test4c.out Mon Mar 09 23:53:41 2009 -0700 72.3 @@ -1,4 +1,4 @@ 72.4 -A.java:10:9: compiler.warn.has.been.deprecated: A1, unnamed package 72.5 -A.java:10:21: compiler.warn.has.been.deprecated: A1, unnamed package 72.6 +A.java:10:9: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 72.7 +A.java:10:21: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 72.8 - compiler.note.deprecated.filename: B.java 72.9 2 warnings
73.1 --- a/test/tools/javac/mandatoryWarnings/deprecated/Test4d.out Mon Mar 09 13:34:19 2009 -0700 73.2 +++ b/test/tools/javac/mandatoryWarnings/deprecated/Test4d.out Mon Mar 09 23:53:41 2009 -0700 73.3 @@ -1,5 +1,5 @@ 73.4 -A.java:10:9: compiler.warn.has.been.deprecated: A1, unnamed package 73.5 -A.java:10:21: compiler.warn.has.been.deprecated: A1, unnamed package 73.6 -B.java:11:9: compiler.warn.has.been.deprecated: B1, unnamed package 73.7 +A.java:10:9: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 73.8 +A.java:10:21: compiler.warn.has.been.deprecated: A1, compiler.misc.unnamed.package 73.9 +B.java:11:9: compiler.warn.has.been.deprecated: B1, compiler.misc.unnamed.package 73.10 - compiler.note.deprecated.filename.additional: B.java 73.11 3 warnings
74.1 --- a/test/tools/javac/positions/T6253161.out Mon Mar 09 13:34:19 2009 -0700 74.2 +++ b/test/tools/javac/positions/T6253161.out Mon Mar 09 23:53:41 2009 -0700 74.3 @@ -1,2 +1,2 @@ 74.4 -T6253161.java:19:62: compiler.warn.missing.SVUID: <anonymous T6253161$1$1> 74.5 +T6253161.java:19:62: compiler.warn.missing.SVUID: compiler.misc.anonymous.class: T6253161$1$1 74.6 1 warning
75.1 --- a/test/tools/javac/positions/T6253161a.out Mon Mar 09 13:34:19 2009 -0700 75.2 +++ b/test/tools/javac/positions/T6253161a.out Mon Mar 09 23:53:41 2009 -0700 75.3 @@ -1,2 +1,2 @@ 75.4 -T6253161a.java:19:62: compiler.warn.missing.SVUID: <anonymous T6253161a$1$1> 75.5 +T6253161a.java:19:62: compiler.warn.missing.SVUID: compiler.misc.anonymous.class: T6253161a$1$1 75.6 1 warning
76.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 76.2 +++ b/test/tools/javac/processing/environment/round/Foo.java Mon Mar 09 23:53:41 2009 -0700 76.3 @@ -0,0 +1,27 @@ 76.4 +/* 76.5 + * Copyright 2006 Sun Microsystems, Inc. All Rights Reserved. 76.6 + * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 76.7 + * 76.8 + * This code is free software; you can redistribute it and/or modify it 76.9 + * under the terms of the GNU General Public License version 2 only, as 76.10 + * published by the Free Software Foundation. 76.11 + * 76.12 + * This code is distributed in the hope that it will be useful, but WITHOUT 76.13 + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or 76.14 + * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License 76.15 + * version 2 for more details (a copy is included in the LICENSE file that 76.16 + * accompanied this code). 76.17 + * 76.18 + * You should have received a copy of the GNU General Public License version 76.19 + * 2 along with this work; if not, write to the Free Software Foundation, 76.20 + * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA. 76.21 + * 76.22 + * Please contact Sun Microsystems, Inc., 4150 Network Circle, Santa Clara, 76.23 + * CA 95054 USA or visit www.sun.com if you need additional information or 76.24 + * have any questions. 76.25 + */ 76.26 + 76.27 +@AnnotatedElementInfo(annotationName="AnnotatedElementInfo", 76.28 + expectedSize=1, 76.29 + names="Foo") 76.30 +public class Foo {}
77.1 --- a/test/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java Mon Mar 09 13:34:19 2009 -0700 77.2 +++ b/test/tools/javac/processing/environment/round/TestElementsAnnotatedWith.java Mon Mar 09 23:53:41 2009 -0700 77.3 @@ -1,5 +1,5 @@ 77.4 /* 77.5 - * Copyright 2006-2007 Sun Microsystems, Inc. All Rights Reserved. 77.6 + * Copyright 2006-2009 Sun Microsystems, Inc. All Rights Reserved. 77.7 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 77.8 * 77.9 * This code is free software; you can redistribute it and/or modify it 77.10 @@ -23,7 +23,7 @@ 77.11 77.12 /* 77.13 * @test 77.14 - * @bug 6397298 6400986 6425592 6449798 6453386 6508401 77.15 + * @bug 6397298 6400986 6425592 6449798 6453386 6508401 6498938 77.16 * @summary Tests that getElementsAnnotatedWith works properly. 77.17 * @author Joseph D. Darcy 77.18 * @compile TestElementsAnnotatedWith.java 77.19 @@ -31,16 +31,22 @@ 77.20 * @compile -processor TestElementsAnnotatedWith -proc:only SurfaceAnnotations.java 77.21 * @compile -processor TestElementsAnnotatedWith -proc:only BuriedAnnotations.java 77.22 * @compile -processor TestElementsAnnotatedWith -proc:only Part1.java Part2.java 77.23 + * @compile -processor TestElementsAnnotatedWith -proc:only C2.java 77.24 + * @compile -processor TestElementsAnnotatedWith -proc:only Foo.java 77.25 + * @compile -XD-d=. Foo.java 77.26 * @compile -processor TestElementsAnnotatedWith -proc:only TestElementsAnnotatedWith.java 77.27 - * @compile -processor TestElementsAnnotatedWith -proc:only C2.java 77.28 */ 77.29 77.30 import java.lang.annotation.Annotation; 77.31 +import java.io.*; 77.32 import java.util.Collections; 77.33 import java.util.Set; 77.34 import java.util.HashSet; 77.35 +import java.util.List; 77.36 +import java.util.ArrayList; 77.37 import java.util.Arrays; 77.38 import javax.annotation.processing.*; 77.39 +import javax.tools.*; 77.40 import javax.lang.model.SourceVersion; 77.41 import javax.lang.model.element.*; 77.42 import javax.lang.model.util.*; 77.43 @@ -120,6 +126,9 @@ 77.44 System.err.println("AnnotatedElementInfo: " + annotatedElementInfo); 77.45 throw new RuntimeException(); 77.46 } 77.47 + 77.48 + if("TestElementsAnnotatedWith".equals(firstType.getSimpleName().toString())) 77.49 + writeClassFile(); // Start another round to test class file input 77.50 } else { 77.51 // If processing is over without an error, the specified 77.52 // elements should be empty so an empty set should be returned. 77.53 @@ -161,6 +170,37 @@ 77.54 } catch(IllegalArgumentException iae) {} 77.55 } 77.56 77.57 + /* 77.58 + * Hack alert! The class file read below is generated by the 77.59 + * "@compile -XD-d=. Foo.java" directive above. This sneakily 77.60 + * overrides the output location to the current directory where a 77.61 + * subsequent @compile can read the file. This could be improved 77.62 + * if either a new directive like @process accepted class file 77.63 + * arguments (the javac command accepts such arguments but 77.64 + * @compile does not) or the test.src and test.classes properties 77.65 + * were set to be read with @compile jobs. 77.66 + */ 77.67 + private void writeClassFile() { 77.68 + try { 77.69 + Filer filer = processingEnv.getFiler(); 77.70 + JavaFileObject jfo = filer.createClassFile("Foo"); 77.71 + OutputStream os = jfo.openOutputStream(); 77.72 + // Copy the bytes over 77.73 + System.out.println((new File(".")).getAbsolutePath()); 77.74 + InputStream io = new BufferedInputStream(new FileInputStream(new File(".", "Foo.class"))); 77.75 + int datum = io.read(); 77.76 + while(datum != -1) { 77.77 + os.write(datum); 77.78 + datum = io.read(); 77.79 + } 77.80 + os.close(); 77.81 + } catch (IOException io) { 77.82 + throw new RuntimeException(io); 77.83 + } 77.84 + 77.85 + 77.86 + } 77.87 + 77.88 @Override 77.89 public SourceVersion getSupportedSourceVersion() { 77.90 return SourceVersion.latest();
78.1 --- a/test/tools/javac/warnings/Deprecation.lintAll.out Mon Mar 09 13:34:19 2009 -0700 78.2 +++ b/test/tools/javac/warnings/Deprecation.lintAll.out Mon Mar 09 23:53:41 2009 -0700 78.3 @@ -1,3 +1,3 @@ 78.4 -Deprecation.java:18:24: compiler.warn.has.been.deprecated: Deprecation, unnamed package 78.5 -Deprecation.java:55:24: compiler.warn.has.been.deprecated: Deprecation, unnamed package 78.6 +Deprecation.java:18:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package 78.7 +Deprecation.java:55:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package 78.8 2 warnings
79.1 --- a/test/tools/javac/warnings/Deprecation.lintDeprecation.out Mon Mar 09 13:34:19 2009 -0700 79.2 +++ b/test/tools/javac/warnings/Deprecation.lintDeprecation.out Mon Mar 09 23:53:41 2009 -0700 79.3 @@ -1,3 +1,3 @@ 79.4 -Deprecation.java:18:24: compiler.warn.has.been.deprecated: Deprecation, unnamed package 79.5 -Deprecation.java:55:24: compiler.warn.has.been.deprecated: Deprecation, unnamed package 79.6 +Deprecation.java:18:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package 79.7 +Deprecation.java:55:24: compiler.warn.has.been.deprecated: Deprecation, compiler.misc.unnamed.package 79.8 2 warnings