8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder

Tue, 14 May 2013 10:14:54 -0700

author
jjg
date
Tue, 14 May 2013 10:14:54 -0700
changeset 1743
6a5288a298fd
parent 1742
7af0fa419a2b
child 1744
76a691e3e961

8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder
Reviewed-by: darcy

src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java file | annotate | diff | comparison | revisions
src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/AuthorDD/AuthorDD.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testHref/TestHref.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testJavaFX/TestJavaFX.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testSinceTag/TestSinceTag.java file | annotate | diff | comparison | revisions
test/com/sun/javadoc/testValueTag/TestValueTag.java file | annotate | diff | comparison | revisions
     1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 14 10:14:54 2013 -0700
     1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 14 10:14:54 2013 -0700
     1.3 @@ -246,7 +246,7 @@
     1.4          if (doc instanceof MethodDoc) {
     1.5              addMethodInfo((MethodDoc) doc, dl);
     1.6          }
     1.7 -        TagletOutputImpl output = new TagletOutputImpl("");
     1.8 +        TagletOutput output = new TagletOutputImpl();
     1.9          TagletWriter.genTagOuput(configuration.tagletManager, doc,
    1.10              configuration.tagletManager.getCustomTags(doc),
    1.11                  getTagletWriterInstance(false), output);
    1.12 @@ -266,7 +266,7 @@
    1.13       * @return true if there are tags to be printed else return false.
    1.14       */
    1.15      protected boolean hasSerializationOverviewTags(FieldDoc field) {
    1.16 -        TagletOutputImpl output = new TagletOutputImpl("");
    1.17 +        TagletOutput output = new TagletOutputImpl();
    1.18          TagletWriter.genTagOuput(configuration.tagletManager, field,
    1.19              configuration.tagletManager.getCustomTags(field),
    1.20                  getTagletWriterInstance(false), output);
     2.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Tue May 14 10:14:54 2013 -0700
     2.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Tue May 14 10:14:54 2013 -0700
     2.3 @@ -46,7 +46,7 @@
     2.4   * @author Bhavesh Patel (Modified)
     2.5   */
     2.6  public class HtmlSerialFieldWriter extends FieldWriterImpl
     2.7 -    implements SerializedFormWriter.SerialFieldWriter {
     2.8 +        implements SerializedFormWriter.SerialFieldWriter {
     2.9      ProgramElementDoc[] members = null;
    2.10  
    2.11      private boolean printedOverallAnchor = false;
    2.12 @@ -186,7 +186,7 @@
    2.13       * @param contentTree the tree to which the member tags info will be added
    2.14       */
    2.15      public void addMemberTags(FieldDoc field, Content contentTree) {
    2.16 -        TagletOutputImpl output = new TagletOutputImpl("");
    2.17 +        TagletOutput output = new TagletOutputImpl();
    2.18          TagletWriter.genTagOuput(configuration.tagletManager, field,
    2.19                  configuration.tagletManager.getCustomTags(field),
    2.20                  writer.getTagletWriterInstance(false), output);
     3.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Tue May 14 10:14:54 2013 -0700
     3.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Tue May 14 10:14:54 2013 -0700
     3.3 @@ -1,5 +1,5 @@
     3.4  /*
     3.5 - * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
     3.6 + * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
     3.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     3.8   *
     3.9   * This code is free software; you can redistribute it and/or modify it
    3.10 @@ -146,7 +146,7 @@
    3.11       * @param methodsContentTree the tree to which the member tags info will be added
    3.12       */
    3.13      public void addMemberTags(MethodDoc member, Content methodsContentTree) {
    3.14 -        TagletOutputImpl output = new TagletOutputImpl("");
    3.15 +        TagletOutput output = new TagletOutputImpl();
    3.16          TagletManager tagletManager =
    3.17              configuration.tagletManager;
    3.18          TagletWriter.genTagOuput(tagletManager, member,
     4.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java	Tue May 14 10:14:54 2013 -0700
     4.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java	Tue May 14 10:14:54 2013 -0700
     4.3 @@ -1,5 +1,5 @@
     4.4  /*
     4.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
     4.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     4.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     4.8   *
     4.9   * This code is free software; you can redistribute it and/or modify it
    4.10 @@ -25,6 +25,9 @@
    4.11  
    4.12  package com.sun.tools.doclets.formats.html;
    4.13  
    4.14 +import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
    4.15 +import com.sun.tools.doclets.formats.html.markup.RawHtml;
    4.16 +import com.sun.tools.doclets.internal.toolkit.Content;
    4.17  import com.sun.tools.doclets.internal.toolkit.taglets.*;
    4.18  
    4.19  /**
    4.20 @@ -37,45 +40,54 @@
    4.21   *
    4.22   * @since 1.5
    4.23   * @author Jamie Ho
    4.24 + * @author Jonathan Gibbons (rewrite)
    4.25   */
    4.26  
    4.27  public class TagletOutputImpl implements TagletOutput {
    4.28  
    4.29 -    private StringBuilder output;
    4.30 +    private ContentBuilder content;
    4.31 +
    4.32 +    public TagletOutputImpl() {
    4.33 +        content = new ContentBuilder();
    4.34 +    }
    4.35  
    4.36      public TagletOutputImpl(String o) {
    4.37          setOutput(o);
    4.38      }
    4.39  
    4.40 +    public TagletOutputImpl(Content c) {
    4.41 +        setOutput(c);
    4.42 +    }
    4.43 +
    4.44      /**
    4.45       * {@inheritDoc}
    4.46       */
    4.47      public void setOutput (Object o) {
    4.48 -        output = new StringBuilder(o == null ? "" : (String) o);
    4.49 +        content = new ContentBuilder();
    4.50 +        if (o != null) {
    4.51 +            if (o instanceof String)
    4.52 +                content.addContent(new RawHtml((String) o));
    4.53 +            else if (o instanceof Content)
    4.54 +                content.addContent((Content) o);
    4.55 +            else if (o instanceof TagletOutputImpl)
    4.56 +                content.addContent(((TagletOutputImpl) o).content);
    4.57 +            else
    4.58 +                throw new IllegalArgumentException(o.getClass().getName());
    4.59 +        }
    4.60      }
    4.61  
    4.62      /**
    4.63       * {@inheritDoc}
    4.64       */
    4.65      public void appendOutput(TagletOutput o) {
    4.66 -        output.append(o.toString());
    4.67 -    }
    4.68 -
    4.69 -    /**
    4.70 -     * {@inheritDoc}
    4.71 -     */
    4.72 -    public boolean hasInheritDocTag() {
    4.73 -        return output.indexOf(InheritDocTaglet.INHERIT_DOC_INLINE_TAG) != -1;
    4.74 +        if (o instanceof TagletOutputImpl)
    4.75 +            content.addContent(((TagletOutputImpl) o).content);
    4.76 +        else
    4.77 +            throw new IllegalArgumentException(o.getClass().getName());
    4.78      }
    4.79  
    4.80      public String toString() {
    4.81 -        return output.toString();
    4.82 +        return content.toString();
    4.83      }
    4.84  
    4.85 -    /**
    4.86 -     * Check whether the taglet output is empty.
    4.87 -     */
    4.88 -    public boolean isEmpty() {
    4.89 -        return (toString().trim().isEmpty());
    4.90 -    }
    4.91  }
     5.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Tue May 14 10:14:54 2013 -0700
     5.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Tue May 14 10:14:54 2013 -0700
     5.3 @@ -26,9 +26,12 @@
     5.4  package com.sun.tools.doclets.formats.html;
     5.5  
     5.6  import com.sun.javadoc.*;
     5.7 +import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
     5.8  import com.sun.tools.doclets.formats.html.markup.HtmlAttr;
     5.9 +import com.sun.tools.doclets.formats.html.markup.HtmlStyle;
    5.10  import com.sun.tools.doclets.formats.html.markup.HtmlTag;
    5.11  import com.sun.tools.doclets.formats.html.markup.HtmlTree;
    5.12 +import com.sun.tools.doclets.formats.html.markup.RawHtml;
    5.13  import com.sun.tools.doclets.formats.html.markup.StringContent;
    5.14  import com.sun.tools.doclets.internal.toolkit.*;
    5.15  import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder;
    5.16 @@ -63,7 +66,7 @@
    5.17       * {@inheritDoc}
    5.18       */
    5.19      public TagletOutput getOutputInstance() {
    5.20 -        return new TagletOutputImpl("");
    5.21 +        return new TagletOutputImpl();
    5.22      }
    5.23  
    5.24      /**
    5.25 @@ -71,7 +74,7 @@
    5.26       */
    5.27      protected TagletOutput codeTagOutput(Tag tag) {
    5.28          Content result = HtmlTree.CODE(new StringContent(tag.text()));
    5.29 -        return new TagletOutputImpl(result.toString());
    5.30 +        return new TagletOutputImpl(result);
    5.31      }
    5.32  
    5.33      /**
    5.34 @@ -90,18 +93,17 @@
    5.35       * {@inheritDoc}
    5.36       */
    5.37      public TagletOutput deprecatedTagOutput(Doc doc) {
    5.38 -        StringBuilder output = new StringBuilder();
    5.39 +        ContentBuilder result = new ContentBuilder();
    5.40          Tag[] deprs = doc.tags("deprecated");
    5.41          if (doc instanceof ClassDoc) {
    5.42              if (Util.isDeprecated((ProgramElementDoc) doc)) {
    5.43 -                output.append("<span class=\"strong\">" +
    5.44 -                    configuration.
    5.45 -                        getText("doclet.Deprecated") + "</span>&nbsp;");
    5.46 +                result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
    5.47 +                        new StringContent(configuration.getText("doclet.Deprecated"))));
    5.48 +                result.addContent(RawHtml.nbsp);
    5.49                  if (deprs.length > 0) {
    5.50                      Tag[] commentTags = deprs[0].inlineTags();
    5.51                      if (commentTags.length > 0) {
    5.52 -
    5.53 -                        output.append(commentTagsToOutput(null, doc,
    5.54 +                        result.addContent(commentTagsToOutput(null, doc,
    5.55                              deprs[0].inlineTags(), false).toString()
    5.56                          );
    5.57                      }
    5.58 @@ -110,24 +112,23 @@
    5.59          } else {
    5.60              MemberDoc member = (MemberDoc) doc;
    5.61              if (Util.isDeprecated((ProgramElementDoc) doc)) {
    5.62 -                output.append("<span class=\"strong\">" +
    5.63 -                    configuration.
    5.64 -                            getText("doclet.Deprecated") + "</span>&nbsp;");
    5.65 +                result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
    5.66 +                        new StringContent(configuration.getText("doclet.Deprecated"))));
    5.67 +                result.addContent(RawHtml.nbsp);
    5.68                  if (deprs.length > 0) {
    5.69 -                    output.append("<i>");
    5.70 -                    output.append(commentTagsToOutput(null, doc,
    5.71 -                        deprs[0].inlineTags(), false).toString());
    5.72 -                    output.append("</i>");
    5.73 +                    TagletOutput body = commentTagsToOutput(null, doc,
    5.74 +                        deprs[0].inlineTags(), false);
    5.75 +                    result.addContent(HtmlTree.I(new RawHtml(body.toString())));
    5.76                  }
    5.77              } else {
    5.78                  if (Util.isDeprecated(member.containingClass())) {
    5.79 -                    output.append("<span class=\"strong\">" +
    5.80 -                    configuration.
    5.81 -                            getText("doclet.Deprecated") + "</span>&nbsp;");
    5.82 +                    result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
    5.83 +                            new StringContent(configuration.getText("doclet.Deprecated"))));
    5.84 +                    result.addContent(RawHtml.nbsp);
    5.85                  }
    5.86              }
    5.87          }
    5.88 -        return new TagletOutputImpl(output.toString());
    5.89 +        return new TagletOutputImpl(result);
    5.90      }
    5.91  
    5.92      /**
    5.93 @@ -136,7 +137,7 @@
    5.94      protected TagletOutput expertTagOutput(Tag tag) {
    5.95          HtmlTree result = new HtmlTree(HtmlTag.SUB, new StringContent(tag.text()));
    5.96          result.addAttr(HtmlAttr.ID, "expert");
    5.97 -        return new TagletOutputImpl(result.toString());
    5.98 +        return new TagletOutputImpl(result);
    5.99      }
   5.100  
   5.101      /**
   5.102 @@ -144,7 +145,7 @@
   5.103       */
   5.104      protected TagletOutput literalTagOutput(Tag tag) {
   5.105          Content result = new StringContent(tag.text());
   5.106 -        return new TagletOutputImpl(result.toString());
   5.107 +        return new TagletOutputImpl(result);
   5.108      }
   5.109  
   5.110      /**
   5.111 @@ -158,95 +159,102 @@
   5.112       * {@inheritDoc}
   5.113       */
   5.114      public TagletOutput getParamHeader(String header) {
   5.115 -        StringBuilder result = new StringBuilder();
   5.116 -        result.append("<dt>");
   5.117 -        result.append("<span class=\"strong\">").append(header).append("</span></dt>");
   5.118 -        return new TagletOutputImpl(result.toString());
   5.119 +        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
   5.120 +                new StringContent(header)));
   5.121 +        return new TagletOutputImpl(result);
   5.122      }
   5.123  
   5.124      /**
   5.125       * {@inheritDoc}
   5.126       */
   5.127      public TagletOutput paramTagOutput(ParamTag paramTag, String paramName) {
   5.128 -        TagletOutput result = new TagletOutputImpl("<dd><code>" + paramName + "</code>"
   5.129 -         + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false) + "</dd>");
   5.130 -        return result;
   5.131 +        ContentBuilder body = new ContentBuilder();
   5.132 +        body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
   5.133 +        body.addContent(" - ");
   5.134 +        body.addContent(new RawHtml(htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false)));
   5.135 +        HtmlTree result = HtmlTree.DD(body);
   5.136 +        return new TagletOutputImpl(result);
   5.137      }
   5.138  
   5.139      /**
   5.140       * {@inheritDoc}
   5.141       */
   5.142      public TagletOutput returnTagOutput(Tag returnTag) {
   5.143 -        TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<dt>" +
   5.144 -            "<span class=\"strong\">" + configuration.getText("doclet.Returns") +
   5.145 -            "</span>" + "</dt>" + "<dd>" +
   5.146 -            htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(),
   5.147 -            false) + "</dd>");
   5.148 -        return result;
   5.149 +        ContentBuilder result = new ContentBuilder();
   5.150 +        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
   5.151 +                new StringContent(configuration.getText("doclet.Returns")))));
   5.152 +        result.addContent(HtmlTree.DD(new RawHtml(htmlWriter.commentTagsToString(
   5.153 +                returnTag, null, returnTag.inlineTags(), false))));
   5.154 +        return new TagletOutputImpl(result);
   5.155      }
   5.156  
   5.157      /**
   5.158       * {@inheritDoc}
   5.159       */
   5.160      public TagletOutput seeTagOutput(Doc holder, SeeTag[] seeTags) {
   5.161 -        String result = "";
   5.162 +        ContentBuilder body = new ContentBuilder();
   5.163          if (seeTags.length > 0) {
   5.164 -            result = addSeeHeader(result);
   5.165              for (int i = 0; i < seeTags.length; ++i) {
   5.166 -                if (i > 0) {
   5.167 -                    result += ", " + DocletConstants.NL;
   5.168 -                }
   5.169 -                result += htmlWriter.seeTagToString(seeTags[i]);
   5.170 +                appendSeparatorIfNotEmpty(body);
   5.171 +                body.addContent(new RawHtml(htmlWriter.seeTagToString(seeTags[i])));
   5.172              }
   5.173          }
   5.174          if (holder.isField() && ((FieldDoc)holder).constantValue() != null &&
   5.175                  htmlWriter instanceof ClassWriterImpl) {
   5.176              //Automatically add link to constant values page for constant fields.
   5.177 -            result = addSeeHeader(result);
   5.178 +            appendSeparatorIfNotEmpty(body);
   5.179              DocPath constantsPath =
   5.180                      htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
   5.181              String whichConstant =
   5.182                      ((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName() + "." + ((FieldDoc) holder).name();
   5.183              DocLink link = constantsPath.fragment(whichConstant);
   5.184 -            result += htmlWriter.getHyperLinkString(link,
   5.185 -                    configuration.getText("doclet.Constants_Summary"));
   5.186 +            body.addContent(htmlWriter.getHyperLink(link,
   5.187 +                    new StringContent(configuration.getText("doclet.Constants_Summary"))));
   5.188          }
   5.189          if (holder.isClass() && ((ClassDoc)holder).isSerializable()) {
   5.190              //Automatically add link to serialized form page for serializable classes.
   5.191              if ((SerializedFormBuilder.serialInclude(holder) &&
   5.192                        SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) {
   5.193 -                result = addSeeHeader(result);
   5.194 +                appendSeparatorIfNotEmpty(body);
   5.195                  DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
   5.196                  DocLink link = serialPath.fragment(((ClassDoc)holder).qualifiedName());
   5.197 -                result += htmlWriter.getHyperLinkString(link,
   5.198 -                        configuration.getText("doclet.Serialized_Form"));
   5.199 +                body.addContent(htmlWriter.getHyperLink(link,
   5.200 +                        new StringContent(configuration.getText("doclet.Serialized_Form"))));
   5.201              }
   5.202          }
   5.203 -        return result.equals("") ? null : new TagletOutputImpl(result + "</dd>");
   5.204 +        if (body.isEmpty())
   5.205 +            return new TagletOutputImpl(body);
   5.206 +
   5.207 +        ContentBuilder result = new ContentBuilder();
   5.208 +        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
   5.209 +                new StringContent(configuration.getText("doclet.See_Also")))));
   5.210 +        result.addContent(HtmlTree.DD(body));
   5.211 +        return new TagletOutputImpl(result);
   5.212 +
   5.213      }
   5.214  
   5.215 -    private String addSeeHeader(String result) {
   5.216 -        if (result != null && result.length() > 0) {
   5.217 -            return result + ", " + DocletConstants.NL;
   5.218 -        } else {
   5.219 -            return "<dt><span class=\"strong\">" +
   5.220 -                    configuration.getText("doclet.See_Also") + "</span></dt><dd>";
   5.221 +    private void appendSeparatorIfNotEmpty(ContentBuilder body) {
   5.222 +        if (!body.isEmpty()) {
   5.223 +            body.addContent(", ");
   5.224 +            body.addContent(DocletConstants.NL);
   5.225          }
   5.226 -     }
   5.227 +    }
   5.228  
   5.229      /**
   5.230       * {@inheritDoc}
   5.231       */
   5.232      public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) {
   5.233 -        String result = "<dt><span class=\"strong\">" + header + "</span></dt>" + DocletConstants.NL +
   5.234 -            "  <dd>";
   5.235 +        ContentBuilder result = new ContentBuilder();
   5.236 +        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
   5.237 +        ContentBuilder body = new ContentBuilder();
   5.238          for (int i = 0; i < simpleTags.length; i++) {
   5.239              if (i > 0) {
   5.240 -                result += ", ";
   5.241 +                body.addContent(", ");
   5.242              }
   5.243 -            result += htmlWriter.commentTagsToString(simpleTags[i], null, simpleTags[i].inlineTags(), false);
   5.244 +            body.addContent(new RawHtml(htmlWriter.commentTagsToString(
   5.245 +                    simpleTags[i], null, simpleTags[i].inlineTags(), false)));
   5.246          }
   5.247 -        result += "</dd>" + DocletConstants.NL;
   5.248 +        result.addContent(HtmlTree.DD(body));
   5.249          return new TagletOutputImpl(result);
   5.250      }
   5.251  
   5.252 @@ -254,46 +262,50 @@
   5.253       * {@inheritDoc}
   5.254       */
   5.255      public TagletOutput simpleTagOutput(Tag simpleTag, String header) {
   5.256 -        return new TagletOutputImpl("<dt><span class=\"strong\">" + header + "</span></dt>" + "  <dd>"
   5.257 -            + htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false)
   5.258 -            + "</dd>" + DocletConstants.NL);
   5.259 +        ContentBuilder result = new ContentBuilder();
   5.260 +        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
   5.261 +        Content body = new RawHtml(htmlWriter.commentTagsToString(
   5.262 +                simpleTag, null, simpleTag.inlineTags(), false));
   5.263 +        result.addContent(HtmlTree.DD(body));
   5.264 +        return new TagletOutputImpl(result);
   5.265      }
   5.266  
   5.267      /**
   5.268       * {@inheritDoc}
   5.269       */
   5.270      public TagletOutput getThrowsHeader() {
   5.271 -        return new TagletOutputImpl(DocletConstants.NL + "<dt>" + "<span class=\"strong\">" +
   5.272 -            configuration.getText("doclet.Throws") + "</span></dt>");
   5.273 +        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
   5.274 +                new StringContent(configuration.getText("doclet.Throws"))));
   5.275 +        return new TagletOutputImpl(result);
   5.276      }
   5.277  
   5.278      /**
   5.279       * {@inheritDoc}
   5.280       */
   5.281      public TagletOutput throwsTagOutput(ThrowsTag throwsTag) {
   5.282 -        String result = DocletConstants.NL + "<dd>";
   5.283 -        result += throwsTag.exceptionType() == null ?
   5.284 -            htmlWriter.codeText(throwsTag.exceptionName()) :
   5.285 -            htmlWriter.codeText(
   5.286 +        ContentBuilder body = new ContentBuilder();
   5.287 +        Content excName = (throwsTag.exceptionType() == null) ?
   5.288 +                new RawHtml(throwsTag.exceptionName()) :
   5.289                  htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
   5.290 -                throwsTag.exceptionType())).toString());
   5.291 -        TagletOutput text = new TagletOutputImpl(
   5.292 -            htmlWriter.commentTagsToString(throwsTag, null,
   5.293 -            throwsTag.inlineTags(), false));
   5.294 -        if (text != null && text.toString().length() > 0) {
   5.295 -            result += " - " + text;
   5.296 +                throwsTag.exceptionType()));
   5.297 +        body.addContent(HtmlTree.CODE(excName));
   5.298 +        String desc = htmlWriter.commentTagsToString(throwsTag, null,
   5.299 +            throwsTag.inlineTags(), false);
   5.300 +        if (desc != null && !desc.isEmpty()) {
   5.301 +            body.addContent(" - ");
   5.302 +            body.addContent(new RawHtml(desc));
   5.303          }
   5.304 -        result += "</dd>";
   5.305 -        return new TagletOutputImpl(result);
   5.306 +        HtmlTree res2 = HtmlTree.DD(body);
   5.307 +        return new TagletOutputImpl(res2);
   5.308      }
   5.309  
   5.310      /**
   5.311       * {@inheritDoc}
   5.312       */
   5.313      public TagletOutput throwsTagOutput(Type throwsType) {
   5.314 -        return new TagletOutputImpl(DocletConstants.NL + "<dd>" +
   5.315 -            htmlWriter.codeText(htmlWriter.getLink(
   5.316 -                new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType)).toString()) + "</dd>");
   5.317 +        HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink(
   5.318 +                new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))));
   5.319 +        return new TagletOutputImpl(result);
   5.320      }
   5.321  
   5.322      /**
   5.323 @@ -303,7 +315,7 @@
   5.324              boolean includeLink) {
   5.325          return new TagletOutputImpl(includeLink ?
   5.326              htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field,
   5.327 -                constantVal, false).toString() : constantVal);
   5.328 +                constantVal, false) : new RawHtml(constantVal));
   5.329      }
   5.330  
   5.331      /**
   5.332 @@ -325,8 +337,8 @@
   5.333       */
   5.334      public TagletOutput commentTagsToOutput(Tag holderTag,
   5.335          Doc holderDoc, Tag[] tags, boolean isFirstSentence) {
   5.336 -        return new TagletOutputImpl(htmlWriter.commentTagsToString(
   5.337 -            holderTag, holderDoc, tags, isFirstSentence));
   5.338 +        return new TagletOutputImpl(new RawHtml(htmlWriter.commentTagsToString(
   5.339 +            holderTag, holderDoc, tags, isFirstSentence)));
   5.340      }
   5.341  
   5.342      /**
   5.343 @@ -335,13 +347,4 @@
   5.344      public Configuration configuration() {
   5.345          return configuration;
   5.346      }
   5.347 -
   5.348 -    /**
   5.349 -     * Return an instance of a TagletWriter that knows how to write HTML.
   5.350 -     *
   5.351 -     * @return an instance of a TagletWriter that knows how to write HTML.
   5.352 -     */
   5.353 -    public TagletOutput getTagletOutputInstance() {
   5.354 -        return new TagletOutputImpl("");
   5.355 -    }
   5.356  }
     6.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java	Tue May 14 10:14:54 2013 -0700
     6.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java	Tue May 14 10:14:54 2013 -0700
     6.3 @@ -53,12 +53,12 @@
     6.4      private static final String NAME = "code";
     6.5  
     6.6      public static void register(Map<String, Taglet> map) {
     6.7 -            map.remove(NAME);
     6.8 -            map.put(NAME, new CodeTaglet());
     6.9 +        map.remove(NAME);
    6.10 +        map.put(NAME, new CodeTaglet());
    6.11      }
    6.12  
    6.13      public String getName() {
    6.14 -            return NAME;
    6.15 +        return NAME;
    6.16      }
    6.17  
    6.18      /**
     7.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java	Tue May 14 10:14:54 2013 -0700
     7.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java	Tue May 14 10:14:54 2013 -0700
     7.3 @@ -116,7 +116,7 @@
     7.4       */
     7.5      private TagletOutput retrieveInheritedDocumentation(TagletWriter writer,
     7.6              ProgramElementDoc ped, Tag holderTag, boolean isFirstSentence) {
     7.7 -        TagletOutput replacement = writer.getTagletOutputInstance();
     7.8 +        TagletOutput replacement = writer.getOutputInstance();
     7.9  
    7.10          Configuration configuration = writer.configuration();
    7.11          Taglet inheritableTaglet = holderTag == null ?
     8.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java	Tue May 14 10:14:54 2013 -0700
     8.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java	Tue May 14 10:14:54 2013 -0700
     8.3 @@ -26,7 +26,6 @@
     8.4  
     8.5  import java.util.Map;
     8.6  
     8.7 -import com.sun.javadoc.Doc;
     8.8  import com.sun.javadoc.Tag;
     8.9  
    8.10  
     9.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java	Tue May 14 10:14:54 2013 -0700
     9.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java	Tue May 14 10:14:54 2013 -0700
     9.3 @@ -1,5 +1,5 @@
     9.4  /*
     9.5 - * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
     9.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
     9.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
     9.8   *
     9.9   * This code is free software; you can redistribute it and/or modify it
    9.10 @@ -152,4 +152,6 @@
    9.11       */
    9.12      public abstract TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException;
    9.13  
    9.14 +    @Override
    9.15 +    public abstract String toString();
    9.16  }
    10.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java	Tue May 14 10:14:54 2013 -0700
    10.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java	Tue May 14 10:14:54 2013 -0700
    10.3 @@ -1,5 +1,5 @@
    10.4  /*
    10.5 - * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
    10.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    10.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    10.8   *
    10.9   * This code is free software; you can redistribute it and/or modify it
   10.10 @@ -52,9 +52,6 @@
   10.11       */
   10.12      public abstract void appendOutput(TagletOutput o);
   10.13  
   10.14 -    /**
   10.15 -     * Return true if this output has any occurances of @inheritDoc.
   10.16 -     * @return true if inheritDoc tag is found.
   10.17 -     */
   10.18 -    public abstract boolean hasInheritDocTag();
   10.19 +    @Override
   10.20 +    public String toString();
   10.21  }
    11.1 --- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java	Tue May 14 10:14:54 2013 -0700
    11.2 +++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java	Tue May 14 10:14:54 2013 -0700
    11.3 @@ -307,9 +307,4 @@
    11.4       * @return an instance of the configuration used for this doclet.
    11.5       */
    11.6      public abstract Configuration configuration();
    11.7 -
    11.8 -    /**
    11.9 -     * @return an instance of the taglet output object.
   11.10 -     */
   11.11 -    public abstract TagletOutput getTagletOutputInstance();
   11.12  }
    12.1 --- a/test/com/sun/javadoc/AuthorDD/AuthorDD.java	Tue May 14 10:14:54 2013 -0700
    12.2 +++ b/test/com/sun/javadoc/AuthorDD/AuthorDD.java	Tue May 14 10:14:54 2013 -0700
    12.3 @@ -1,5 +1,5 @@
    12.4  /*
    12.5 - * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
    12.6 + * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
    12.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    12.8   *
    12.9   * This code is free software; you can redistribute it and/or modify it
   12.10 @@ -86,12 +86,12 @@
   12.11  
   12.12               // Test single @since tag:
   12.13  
   12.14 -            { "<dt><span class=\"strong\">Since:</span></dt>"+NL+"  <dd>JDK 1.0</dd>",
   12.15 +            { "<dt><span class=\"strong\">Since:</span></dt>"+NL+"<dd>JDK 1.0</dd>",
   12.16                                    BUGID + FS + "p1" + FS + "C1.html" },
   12.17  
   12.18              // Test multiple @author tags:
   12.19  
   12.20 -            { "<dt><span class=\"strong\">Author:</span></dt>"+NL+"  <dd>Doug Kramer, Jamie, Neal</dd>",
   12.21 +            { "<dt><span class=\"strong\">Author:</span></dt>"+NL+"<dd>Doug Kramer, Jamie, Neal</dd>",
   12.22                                    BUGID + FS + "p1" + FS + "C1.html" },
   12.23  
   12.24          };
    13.1 --- a/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java	Tue May 14 10:14:54 2013 -0700
    13.2 +++ b/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java	Tue May 14 10:14:54 2013 -0700
    13.3 @@ -1,5 +1,5 @@
    13.4  /*
    13.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    13.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    13.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    13.8   *
    13.9   * This code is free software; you can redistribute it and/or modify it
   13.10 @@ -47,8 +47,8 @@
   13.11      private static final String[][] TEST = {
   13.12          {BUG_ID + FS + "C.html", "<div class=\"block\">" +
   13.13                   "This is just a simple constructor.</div>" + NL +
   13.14 -                 "<dl><dt><span class=\"strong\">Parameters:</span></dt><dd>" +
   13.15 -                 "<code>i</code> - a param.</dd></dl>"
   13.16 +                 "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL +
   13.17 +                 "<dd><code>i</code> - a param.</dd></dl>"
   13.18          }
   13.19      };
   13.20      private static final String[][] NEGATED_TEST = NO_TEST;
    14.1 --- a/test/com/sun/javadoc/testHref/TestHref.java	Tue May 14 10:14:54 2013 -0700
    14.2 +++ b/test/com/sun/javadoc/testHref/TestHref.java	Tue May 14 10:14:54 2013 -0700
    14.3 @@ -1,5 +1,5 @@
    14.4  /*
    14.5 - * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
    14.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    14.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    14.8   *
    14.9   * This code is free software; you can redistribute it and/or modify it
   14.10 @@ -70,7 +70,7 @@
   14.11          },
   14.12          //@see test.
   14.13          {BUG_ID + FS + "pkg" + FS + "C2.html",
   14.14 -            "See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
   14.15 +            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
   14.16          },
   14.17  
   14.18          //Header does not link to the page itself.
    15.1 --- a/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue May 14 10:14:54 2013 -0700
    15.2 +++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue May 14 10:14:54 2013 -0700
    15.3 @@ -55,43 +55,43 @@
    15.4      private static final String[][] TEST_CMNT_DEPR = {
    15.5          {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
    15.6                   "<dt><span class=\"strong\">Since:</span></dt>" + NL +
    15.7 -                 "  <dd>JDK1.0</dd></dl>"},
    15.8 +                 "<dd>JDK1.0</dd></dl>"},
    15.9          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   15.10 -                 "  <dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" +
   15.11 +                 "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL +
   15.12                   "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" +
   15.13                   "C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
   15.14                   "Serialized Form</a></dd></dl>"},
   15.15          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   15.16 -                 "  <dd>1.4</dd>" + NL +
   15.17 -                 "<dt><span class=\"strong\">See Also:</span></dt><dd>" +
   15.18 +                 "<dd>1.4</dd>" + NL +
   15.19 +                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
   15.20                   "<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
   15.21                   "<code>setUndecorated(boolean)</code></a></dd></dl>"},
   15.22 -        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt><dd><code>title" +
   15.23 -                 "</code> - the title</dd><dd><code>test</code> - boolean value" +
   15.24 +        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" +
   15.25 +                 "</code> - the title</dd>" + NL + "<dd><code>test</code> - boolean value" +
   15.26                   "</dd>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
   15.27                   "<dd><code>java.lang.IllegalArgumentException</code> - if the " +
   15.28                   "<code>owner</code>'s" + NL +
   15.29                   "     <code>GraphicsConfiguration</code> is not from a screen " +
   15.30                   "device</dd>" + NL + "<dd><code>HeadlessException</code></dd></dl>"},
   15.31 -        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt><dd><code>undecorated" +
   15.32 +        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>undecorated" +
   15.33                   "</code> - <code>true</code> if no decorations are" + NL +
   15.34                   "         to be enabled;" + NL + "         <code>false</code> " +
   15.35 -                 "if decorations are to be enabled.</dd><dt><span class=\"strong\">Since:" +
   15.36 -                 "</span></dt>" + NL + "  <dd>1.4</dd>" + NL +
   15.37 -                 "<dt><span class=\"strong\">See Also:</span></dt><dd>" +
   15.38 +                 "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"strong\">Since:" +
   15.39 +                 "</span></dt>" + NL + "<dd>1.4</dd>" + NL +
   15.40 +                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
   15.41                   "<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" +
   15.42                   "</code></a></dd></dl>"},
   15.43          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span></dt>" + NL +
   15.44 -                 "<dd><code>java.io.IOException</code></dd><dt><span class=\"strong\">See Also:" +
   15.45 -                 "</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
   15.46 +                 "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:" +
   15.47 +                 "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
   15.48                   "<code>setUndecorated(boolean)</code></a></dd></dl>"},
   15.49          {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl><dt><span class=\"strong\">Parameters:" +
   15.50 -                 "</span></dt><dd><code>set</code> - boolean</dd><dt><span class=\"strong\">" +
   15.51 -                 "Since:</span></dt>" + NL + "  <dd>1.4</dd></dl>"},
   15.52 +                 "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"strong\">" +
   15.53 +                 "Since:</span></dt>" + NL + "<dd>1.4</dd></dl>"},
   15.54          {BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
   15.55                   "</dt>" + NL + "<dd><code>" +
   15.56 -                 "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" +
   15.57 -                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   15.58 +                 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
   15.59 +                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   15.60                   "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
   15.61          {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
   15.62                   "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
   15.63 @@ -99,8 +99,8 @@
   15.64                   "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
   15.65                   "<div class=\"block\">This field indicates whether the C1 is " +
   15.66                   "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   15.67 -                 "  <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
   15.68 -                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   15.69 +                 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
   15.70 +                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   15.71                   "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
   15.72          {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
   15.73                   "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
   15.74 @@ -123,34 +123,34 @@
   15.75      private static final String[][] TEST_NODEPR = {
   15.76          {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
   15.77                   "<dt><span class=\"strong\">Since:</span></dt>" + NL +
   15.78 -                 "  <dd>JDK1.0</dd></dl>"},
   15.79 +                 "<dd>JDK1.0</dd></dl>"},
   15.80          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span>" +
   15.81 -                 "</dt>" + NL + "  <dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:" +
   15.82 -                 "</span></dt><dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
   15.83 +                 "</dt>" + NL + "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:" +
   15.84 +                 "</span></dt>" + NL + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
   15.85                   "<code>C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
   15.86                   "Serialized Form</a></dd></dl>"},
   15.87          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" +
   15.88 -                 "</span></dt><dd><code>title</code> - the title</dd><dd><code>" +
   15.89 +                 "</span></dt>" + NL + "<dd><code>title</code> - the title</dd>" + NL + "<dd><code>" +
   15.90                   "test</code> - boolean value</dd>" + NL + "<dt><span class=\"strong\">Throws:" +
   15.91                   "</span></dt>" + NL + "<dd><code>java.lang.IllegalArgumentException" +
   15.92                   "</code> - if the <code>owner</code>'s" + NL + "     <code>GraphicsConfiguration" +
   15.93                   "</code> is not from a screen device</dd>" + NL + "<dd><code>" +
   15.94                   "HeadlessException</code></dd></dl>"},
   15.95          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" +
   15.96 -                 "</span></dt><dd><code>undecorated</code> - <code>true</code>" +
   15.97 +                 "</span></dt>" + NL + "<dd><code>undecorated</code> - <code>true</code>" +
   15.98                   " if no decorations are" + NL + "         to be enabled;" + NL +
   15.99                   "         <code>false</code> if decorations are to be enabled." +
  15.100 -                 "</dd><dt><span class=\"strong\">Since:</span></dt>" + NL + "  <dd>1.4</dd>" + NL +
  15.101 -                 "<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#readObject()\">" +
  15.102 +                 "</dd>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL +
  15.103 +                 "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject()\">" +
  15.104                   "<code>readObject()</code></a></dd></dl>"},
  15.105          {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
  15.106 -                 "</dt>" + NL + "<dd><code>java.io.IOException</code></dd><dt>" +
  15.107 -                 "<span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
  15.108 +                 "</dt>" + NL + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt>" +
  15.109 +                 "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
  15.110                   "<code>setUndecorated(boolean)</code></a></dd></dl>"},
  15.111          {BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
  15.112                   "</dt>" + NL + "<dd><code>" +
  15.113 -                 "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" +
  15.114 -                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
  15.115 +                 "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
  15.116 +                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
  15.117                   "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
  15.118          {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
  15.119                   "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
  15.120 @@ -158,8 +158,8 @@
  15.121                   "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
  15.122                   "<div class=\"block\">This field indicates whether the C1 is " +
  15.123                   "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
  15.124 -                 "  <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
  15.125 -                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
  15.126 +                 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
  15.127 +                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
  15.128                   "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
  15.129          {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
  15.130                   "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
    16.1 --- a/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Tue May 14 10:14:54 2013 -0700
    16.2 +++ b/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Tue May 14 10:14:54 2013 -0700
    16.3 @@ -38,7 +38,7 @@
    16.4      private static final String[][] TEST =
    16.5          new String[][] {
    16.6              {"./" + BUG_ID + "/C.html",
    16.7 -                "<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
    16.8 +                "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
    16.9                  "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
   16.10              {"./" + BUG_ID + "/C.html",
   16.11                  "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
    17.1 --- a/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue May 14 10:14:54 2013 -0700
    17.2 +++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue May 14 10:14:54 2013 -0700
    17.3 @@ -80,11 +80,11 @@
    17.4                  "Class TypeParameters&lt;E&gt;</h2>"},
    17.5              //Check class type parameters section.
    17.6              {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
    17.7 -                "<dt><span class=\"strong\">Type Parameters:</span></dt><dd><code>E</code> - " +
    17.8 +                "<dt><span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>E</code> - " +
    17.9                  "the type parameter for this class."},
   17.10              //Type parameters in @see/@link
   17.11              {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
   17.12 -                "<dl><dt><span class=\"strong\">See Also:</span></dt><dd>" +
   17.13 +                "<dl><dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
   17.14                  "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
   17.15                  "<code>TypeParameters</code></a></dd></dl>"},
   17.16              //Method that uses class type parameter.
   17.17 @@ -93,8 +93,8 @@
   17.18                      "parameter in TypeParameters\">E</a>&nbsp;param)"},
   17.19              //Method type parameter section.
   17.20              {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
   17.21 -                "<span class=\"strong\">Type Parameters:</span></dt><dd><code>T</code> - This is the first " +
   17.22 -                    "type parameter.</dd><dd><code>V</code> - This is the second type " +
   17.23 +                "<span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>T</code> - This is the first " +
   17.24 +                    "type parameter.</dd>" + NL + "<dd><code>V</code> - This is the second type " +
   17.25                      "parameter."},
   17.26              //Signature of method with type parameters
   17.27              {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
    18.1 --- a/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java	Tue May 14 10:14:54 2013 -0700
    18.2 +++ b/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java	Tue May 14 10:14:54 2013 -0700
    18.3 @@ -1,5 +1,5 @@
    18.4  /*
    18.5 - * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
    18.6 + * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
    18.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    18.8   *
    18.9   * This code is free software; you can redistribute it and/or modify it
   18.10 @@ -48,13 +48,13 @@
   18.11      private static final String[][] TEST = {
   18.12          //Regular param tags.
   18.13          {BUG_ID + FS + "pkg" + FS + "C.html",
   18.14 -            "<span class=\"strong\">Parameters:</span></dt><dd><code>param1</code> - testing 1 2 3.</dd>" +
   18.15 -                "<dd><code>param2</code> - testing 1 2 3."
   18.16 +            "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>param1</code> - testing 1 2 3.</dd>" +
   18.17 +                NL + "<dd><code>param2</code> - testing 1 2 3."
   18.18          },
   18.19          //Param tags that don't match with any real parameters.
   18.20          {BUG_ID + FS + "pkg" + FS + "C.html",
   18.21 -            "<span class=\"strong\">Parameters:</span></dt><dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
   18.22 -                "<dd><code><I>p2</I></code> - testing 1 2 3."
   18.23 +            "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
   18.24 +                NL + "<dd><code><I>p2</I></code> - testing 1 2 3."
   18.25          },
   18.26          //{@inherit} doc misuse does not cause doclet to throw exception.
   18.27          // Param is printed with nothing inherited.
    19.1 --- a/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue May 14 10:14:54 2013 -0700
    19.2 +++ b/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue May 14 10:14:54 2013 -0700
    19.3 @@ -1,5 +1,5 @@
    19.4  /*
    19.5 - * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
    19.6 + * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
    19.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    19.8   *
    19.9   * This code is free software; you can redistribute it and/or modify it
   19.10 @@ -43,8 +43,8 @@
   19.11      private static final String[][] TEST_CMNT_DEPR = {
   19.12          {BUG_ID + FS + "serialized-form.html", "<dl>" +
   19.13                   "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" +
   19.14 -                 "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" +
   19.15 -                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   19.16 +                 "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"strong\">See Also:</span>" +
   19.17 +                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   19.18                   "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
   19.19          {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
   19.20                   "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
   19.21 @@ -53,8 +53,8 @@
   19.22                   "<div class=\"block\">This field indicates whether the C1 " +
   19.23                   "is undecorated.</div>" + NL + "&nbsp;" + NL +
   19.24                   "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   19.25 -                 "  <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
   19.26 -                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   19.27 +                 "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
   19.28 +                 "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
   19.29                   "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
   19.30          {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
   19.31                   "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
    20.1 --- a/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java	Tue May 14 10:14:54 2013 -0700
    20.2 +++ b/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java	Tue May 14 10:14:54 2013 -0700
    20.3 @@ -47,10 +47,10 @@
    20.4      private static final String[][] TEST = {
    20.5          { BUG_ID + FS + "p" + FS + "TestClass.html",
    20.6            "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
    20.7 -          "  <dd>doc for BaseClass class</dd>" },
    20.8 +          "<dd>doc for BaseClass class</dd>" },
    20.9          { BUG_ID + FS + "p" + FS + "TestClass.html",
   20.10            "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
   20.11 -          "  <dd>doc for BaseClass method</dd>" }
   20.12 +          "<dd>doc for BaseClass method</dd>" }
   20.13      };
   20.14      private static final String[][] NEGATED_TEST = NO_TEST;
   20.15  
    21.1 --- a/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Tue May 14 10:14:54 2013 -0700
    21.2 +++ b/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Tue May 14 10:14:54 2013 -0700
    21.3 @@ -1,5 +1,5 @@
    21.4  /*
    21.5 - * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
    21.6 + * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
    21.7   * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
    21.8   *
    21.9   * This code is free software; you can redistribute it and/or modify it
   21.10 @@ -49,11 +49,11 @@
   21.11      private static final String[][] TEST = {
   21.12          {BUG_ID + FS + "pkg1" + FS + "C1.html",
   21.13              "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   21.14 -            "  <dd>JDK1.0</dd>"
   21.15 +            "<dd>JDK1.0</dd>"
   21.16          },
   21.17          {BUG_ID + FS + "serialized-form.html",
   21.18              "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
   21.19 -            "  <dd>1.4</dd>"
   21.20 +            "<dd>1.4</dd>"
   21.21          }
   21.22      };
   21.23  
    22.1 --- a/test/com/sun/javadoc/testValueTag/TestValueTag.java	Tue May 14 10:14:54 2013 -0700
    22.2 +++ b/test/com/sun/javadoc/testValueTag/TestValueTag.java	Tue May 14 10:14:54 2013 -0700
    22.3 @@ -90,7 +90,7 @@
    22.4          //Test @value tag used with custom tag.
    22.5          {BUG_ID + FS + "pkg1" + FS + "CustomTagUsage.html",
    22.6              "<dt><span class=\"strong\">Todo:</span></dt>" + NL +
    22.7 -                "  <dd>the value of this constant is 55.</dd>"},
    22.8 +                "<dd>the value of this constant is 55.</dd>"},
    22.9          //Test @value warning printed when used with non-constant.
   22.10          {WARNING_OUTPUT,"warning - @value tag (which references nonConstant) " +
   22.11              "can only be used in constants."

mercurial