changeset 1743:76a691e3e961

8012176: reduce use of TagletOutputImpl.toString Reviewed-by: darcy
author jjg
date Tue, 14 May 2013 10:14:54 -0700
parents 6a5288a298fd
children 937aa020c667
files src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java test/com/sun/javadoc/testJavaFX/TestJavaFX.java test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java test/com/sun/javadoc/testSinceTag/TestSinceTag.java
diffstat 13 files changed, 78 insertions(+), 83 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/AbstractMemberWriter.java	Tue May 14 10:14:54 2013 -0700
@@ -348,10 +348,11 @@
      * @param contentTree the content tree to which the deprecated information will be added.
      */
     protected void addDeprecatedInfo(ProgramElementDoc member, Content contentTree) {
-        String output = (new DeprecatedTaglet()).getTagletOutput(member,
-            writer.getTagletWriterInstance(false)).toString().trim();
-        if (!output.isEmpty()) {
-            Content deprecatedContent = new RawHtml(output);
+        TagletOutput output = (new DeprecatedTaglet()).getTagletOutput(member,
+            writer.getTagletWriterInstance(false));
+        Content body = ((TagletOutputImpl) output).getContent();
+        if (!body.isEmpty()) {
+            Content deprecatedContent = body;
             Content div = HtmlTree.DIV(HtmlStyle.block, deprecatedContent);
             contentTree.addContent(div);
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ClassWriterImpl.java	Tue May 14 10:14:54 2013 -0700
@@ -397,7 +397,7 @@
         if (classDoc.typeParamTags().length > 0) {
             TagletOutput output = (new ParamTaglet()).getTagletOutput(classDoc,
                     getTagletWriterInstance(false));
-            Content typeParam = new RawHtml(output.toString());
+            Content typeParam = ((TagletOutputImpl) output).getContent();
             Content dl = HtmlTree.DL(typeParam);
             classInfoTree.addContent(dl);
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue May 14 10:14:54 2013 -0700
@@ -246,15 +246,11 @@
         if (doc instanceof MethodDoc) {
             addMethodInfo((MethodDoc) doc, dl);
         }
-        TagletOutput output = new TagletOutputImpl();
+        TagletOutputImpl output = new TagletOutputImpl();
         TagletWriter.genTagOuput(configuration.tagletManager, doc,
             configuration.tagletManager.getCustomTags(doc),
                 getTagletWriterInstance(false), output);
-        String outputString = output.toString().trim();
-        if (!outputString.isEmpty()) {
-            Content resultString = new RawHtml(outputString);
-            dl.addContent(resultString);
-        }
+        dl.addContent(output.getContent());
         htmltree.addContent(dl);
     }
 
@@ -266,11 +262,11 @@
      * @return true if there are tags to be printed else return false.
      */
     protected boolean hasSerializationOverviewTags(FieldDoc field) {
-        TagletOutput output = new TagletOutputImpl();
+        TagletOutputImpl output = new TagletOutputImpl();
         TagletWriter.genTagOuput(configuration.tagletManager, field,
             configuration.tagletManager.getCustomTags(field),
                 getTagletWriterInstance(false), output);
-        return (!output.toString().trim().isEmpty());
+        return !output.getContent().isEmpty();
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialFieldWriter.java	Tue May 14 10:14:54 2013 -0700
@@ -186,17 +186,14 @@
      * @param contentTree the tree to which the member tags info will be added
      */
     public void addMemberTags(FieldDoc field, Content contentTree) {
-        TagletOutput output = new TagletOutputImpl();
+        TagletOutputImpl output = new TagletOutputImpl();
         TagletWriter.genTagOuput(configuration.tagletManager, field,
                 configuration.tagletManager.getCustomTags(field),
                 writer.getTagletWriterInstance(false), output);
-        String outputString = output.toString().trim();
+        Content tagContent = output.getContent();
         Content dlTags = new HtmlTree(HtmlTag.DL);
-        if (!outputString.isEmpty()) {
-            Content tagContent = new RawHtml(outputString);
-            dlTags.addContent(tagContent);
-        }
-        contentTree.addContent(dlTags);
+        dlTags.addContent(tagContent);
+        contentTree.addContent(dlTags);  // TODO: what if empty?
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlSerialMethodWriter.java	Tue May 14 10:14:54 2013 -0700
@@ -146,19 +146,16 @@
      * @param methodsContentTree the tree to which the member tags info will be added
      */
     public void addMemberTags(MethodDoc member, Content methodsContentTree) {
-        TagletOutput output = new TagletOutputImpl();
+        TagletOutputImpl output = new TagletOutputImpl();
         TagletManager tagletManager =
             configuration.tagletManager;
         TagletWriter.genTagOuput(tagletManager, member,
             tagletManager.getSerializedFormTags(),
             writer.getTagletWriterInstance(false), output);
-        String outputString = output.toString().trim();
+        Content tagContent = output.getContent();
         Content dlTags = new HtmlTree(HtmlTag.DL);
-        if (!outputString.isEmpty()) {
-            Content tagContent = new RawHtml(outputString);
-            dlTags.addContent(tagContent);
-        }
-        methodsContentTree.addContent(dlTags);
+        dlTags.addContent(tagContent);
+        methodsContentTree.addContent(dlTags);  // TODO: what if empty?
         MethodDoc method = member;
         if (method.name().compareTo("writeExternal") == 0
                 && method.tags("serialData").length == 0) {
--- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletOutputImpl.java	Tue May 14 10:14:54 2013 -0700
@@ -59,6 +59,10 @@
         setOutput(c);
     }
 
+    Content getContent() {
+        return content;
+    }
+
     /**
      * {@inheritDoc}
      */
--- a/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/TagletWriterImpl.java	Tue May 14 10:14:54 2013 -0700
@@ -104,7 +104,7 @@
                     Tag[] commentTags = deprs[0].inlineTags();
                     if (commentTags.length > 0) {
                         result.addContent(commentTagsToOutput(null, doc,
-                            deprs[0].inlineTags(), false).toString()
+                            deprs[0].inlineTags(), false).getContent()
                         );
                     }
                 }
@@ -116,9 +116,9 @@
                         new StringContent(configuration.getText("doclet.Deprecated"))));
                 result.addContent(RawHtml.nbsp);
                 if (deprs.length > 0) {
-                    TagletOutput body = commentTagsToOutput(null, doc,
+                    TagletOutputImpl body = commentTagsToOutput(null, doc,
                         deprs[0].inlineTags(), false);
-                    result.addContent(HtmlTree.I(new RawHtml(body.toString())));
+                    result.addContent(HtmlTree.I(body.getContent()));
                 }
             } else {
                 if (Util.isDeprecated(member.containingClass())) {
@@ -321,21 +321,21 @@
     /**
      * {@inheritDoc}
      */
-    public TagletOutput commentTagsToOutput(Tag holderTag, Tag[] tags) {
+    public TagletOutputImpl commentTagsToOutput(Tag holderTag, Tag[] tags) {
         return commentTagsToOutput(holderTag, null, tags, false);
     }
 
     /**
      * {@inheritDoc}
      */
-    public TagletOutput commentTagsToOutput(Doc holderDoc, Tag[] tags) {
+    public TagletOutputImpl commentTagsToOutput(Doc holderDoc, Tag[] tags) {
         return commentTagsToOutput(null, holderDoc, tags, false);
     }
 
     /**
      * {@inheritDoc}
      */
-    public TagletOutput commentTagsToOutput(Tag holderTag,
+    public TagletOutputImpl commentTagsToOutput(Tag holderTag,
         Doc holderDoc, Tag[] tags, boolean isFirstSentence) {
         return new TagletOutputImpl(new RawHtml(htmlWriter.commentTagsToString(
             holderTag, holderDoc, tags, isFirstSentence)));
--- a/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java	Tue May 14 10:14:54 2013 -0700
@@ -47,8 +47,8 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "C.html", "<div class=\"block\">" +
                  "This is just a simple constructor.</div>" + NL +
-                 "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL +
-                 "<dd><code>i</code> - a param.</dd></dl>"
+                 "<dl>" + NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL +
+                 "<dd><code>i</code> - a param.</dd>" + NL +"</dl>"
         }
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testHtmlDefinitionListTag/TestHtmlDefinitionListTag.java	Tue May 14 10:14:54 2013 -0700
@@ -53,64 +53,64 @@
     // serialized form should have properly nested definition list tags
     // enclosing comments, tags and deprecated information.
     private static final String[][] TEST_CMNT_DEPR = {
-        {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" + NL +
                  "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "<dd>JDK1.0</dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "<dd>JDK1.0</dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL +
                  "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\"><code>" +
                  "C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
-                 "Serialized Form</a></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "Serialized Form</a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL +
                  "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
                  "<a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>setUndecorated(boolean)</code></a></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" +
+                 "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>"+ NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>title" +
                  "</code> - the title</dd>" + NL + "<dd><code>test</code> - boolean value" +
                  "</dd>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
                  "<dd><code>java.lang.IllegalArgumentException</code> - if the " +
                  "<code>owner</code>'s" + NL +
                  "     <code>GraphicsConfiguration</code> is not from a screen " +
-                 "device</dd>" + NL + "<dd><code>HeadlessException</code></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>undecorated" +
+                 "device</dd>" + NL + "<dd><code>HeadlessException</code></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>undecorated" +
                  "</code> - <code>true</code> if no decorations are" + NL +
                  "         to be enabled;" + NL + "         <code>false</code> " +
                  "if decorations are to be enabled.</dd>" + NL + "<dt><span class=\"strong\">Since:" +
                  "</span></dt>" + NL + "<dd>1.4</dd>" + NL +
                  "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
                  "<a href=\"../pkg1/C1.html#readObject()\"><code>readObject()" +
-                 "</code></a></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span></dt>" + NL +
+                 "</code></a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL +
                  "<dd><code>java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:" +
                  "</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>setUndecorated(boolean)</code></a></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl><dt><span class=\"strong\">Parameters:" +
+                 "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C2.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
                  "</span></dt>" + NL + "<dd><code>set</code> - boolean</dd>" + NL + "<dt><span class=\"strong\">" +
-                 "Since:</span></dt>" + NL + "<dd>1.4</dd></dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
+                 "Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>" +
                  "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
                  "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
+                 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
                  " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
                  "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 is " +
-                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
                  "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
+                 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
                  " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
                  "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
-                 "<dl><dt><span class=\"strong\">Throws:" +
+                 "<dl>" + NL + "<dt><span class=\"strong\">Throws:" +
                  "</span></dt>" + NL + "<dd><code><code>" +
                  "IOException</code></code></dd>" + NL +
-                 "<dd><code>java.io.IOException</code></dd></dl>"},
+                 "<dd><code>java.io.IOException</code></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;</div>" + NL +
                  "<div class=\"block\">The name for this class.</div>"}};
@@ -121,55 +121,55 @@
     // should display properly nested definition list tags for comments, tags
     // and deprecated information.
     private static final String[][] TEST_NODEPR = {
-        {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
+        {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" + NL +
                  "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "<dd>JDK1.0</dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Since:</span>" +
+                 "<dd>JDK1.0</dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Since:</span>" +
                  "</dt>" + NL + "<dd>JDK1.0</dd>" + NL + "<dt><span class=\"strong\">See Also:" +
                  "</span></dt>" + NL + "<dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
                  "<code>C2</code></a>, " + NL + "<a href=\"../serialized-form.html#pkg1.C1\">" +
-                 "Serialized Form</a></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" +
+                 "Serialized Form</a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
                  "</span></dt>" + NL + "<dd><code>title</code> - the title</dd>" + NL + "<dd><code>" +
                  "test</code> - boolean value</dd>" + NL + "<dt><span class=\"strong\">Throws:" +
                  "</span></dt>" + NL + "<dd><code>java.lang.IllegalArgumentException" +
                  "</code> - if the <code>owner</code>'s" + NL + "     <code>GraphicsConfiguration" +
                  "</code> is not from a screen device</dd>" + NL + "<dd><code>" +
-                 "HeadlessException</code></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Parameters:" +
+                 "HeadlessException</code></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Parameters:" +
                  "</span></dt>" + NL + "<dd><code>undecorated</code> - <code>true</code>" +
                  " if no decorations are" + NL + "         to be enabled;" + NL +
                  "         <code>false</code> if decorations are to be enabled." +
                  "</dd>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL + "<dd>1.4</dd>" + NL +
                  "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#readObject()\">" +
-                 "<code>readObject()</code></a></dd></dl>"},
-        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
+                 "<code>readObject()</code></a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>java.io.IOException</code></dd>" + NL + "<dt>" +
                  "<span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>setUndecorated(boolean)</code></a></dd></dl>"},
-        {BUG_ID + FS + "serialized-form.html", "<dl><dt><span class=\"strong\">Throws:</span>" +
+                 "<code>setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
+        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span>" +
                  "</dt>" + NL + "<dd><code>" +
                  "java.io.IOException</code></dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
                  "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
+                 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
                  " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
                  "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 is " +
-                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "undecorated.</div>" + NL + "&nbsp;" + NL + "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
                  "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
+                 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
                  " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
                  "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
-                 "<dl><dt><span class=\"strong\">Throws:" +
+                 "<dl>" + NL + "<dt><span class=\"strong\">Throws:" +
                  "</span></dt>" + NL + "<dd><code><code>" +
                  "IOException</code></code></dd>" + NL +
-                 "<dd><code>java.io.IOException</code></dd></dl>"},
+                 "<dd><code>java.io.IOException</code></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;</div>" + NL + "<div class=\"block\">" +
                  "The name for this class.</div>"}};
--- a/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testJavaFX/TestJavaFX.java	Tue May 14 10:14:54 2013 -0700
@@ -43,11 +43,11 @@
             {"./" + BUG_ID + "/C.html",
                 "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
                 "<div class=\"block\">Sets the value of the property rate.</div>" + NL +
-                "<dl><dt><span class=\"strong\">Property description:</span></dt>" },
+                "<dl>" + NL + "<dt><span class=\"strong\">Property description:</span></dt>" },
             {"./" + BUG_ID + "/C.html",
                 "<pre>public final&nbsp;double&nbsp;getRate()</pre>" + NL +
                 "<div class=\"block\">Gets the value of the property rate.</div>" + NL +
-                "<dl><dt><span class=\"strong\">Property description:</span></dt>" },
+                "<dl>" + NL + "<dt><span class=\"strong\">Property description:</span></dt>" },
             {"./" + BUG_ID + "/C.html",
                 "<td class=\"colLast\"><code><strong><a href=\"C.html#rateProperty\">rate</a></strong></code>" + NL +
                 "<div class=\"block\">Defines the direction/speed at which the <code>Timeline</code> is expected to"},
--- a/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testNewLanguageFeatures/TestNewLanguageFeatures.java	Tue May 14 10:14:54 2013 -0700
@@ -84,9 +84,9 @@
                 "the type parameter for this class."},
             //Type parameters in @see/@link
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
-                "<dl><dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
+                "<dl>" + NL + "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd>" +
                 "<a href=\"../pkg/TypeParameters.html\" title=\"class in pkg\">" +
-                "<code>TypeParameters</code></a></dd></dl>"},
+                "<code>TypeParameters</code></a></dd>" + NL + "</dl>"},
             //Method that uses class type parameter.
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
                 "(<a href=\"../pkg/TypeParameters.html\" title=\"type " +
--- a/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java	Tue May 14 10:14:54 2013 -0700
@@ -41,29 +41,29 @@
     // Test for normal run of javadoc. The serialized-form.html should
     // display the inline comments, tags and deprecation information if any.
     private static final String[][] TEST_CMNT_DEPR = {
-        {BUG_ID + FS + "serialized-form.html", "<dl>" +
+        {BUG_ID + FS + "serialized-form.html", "<dl>" + NL +
                  "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" +
                  "java.io.IOException</code></dd>"+ NL + "<dt><span class=\"strong\">See Also:</span>" +
                  "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
+                 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
                  " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
                  "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
                  "<div class=\"block\">This field indicates whether the C1 " +
                  "is undecorated.</div>" + NL + "&nbsp;" + NL +
-                 "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+                 "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
                  "<dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
                  "</dt>" + NL + "<dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
-                 "<code>C1.setUndecorated(boolean)</code></a></dd></dl>"},
+                 "<code>C1.setUndecorated(boolean)</code></a></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
                  " <a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
                  "<code>setUndecorated(boolean)</code></a>.</i></div>" + NL +
                  "<div class=\"block\">Reads the object stream.</div>" + NL +
-                 "<dl><dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code><code>" +
+                 "<dl>" + NL + "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code><code>" +
                  "IOException</code></code></dd>" + NL +
-                 "<dd><code>java.io.IOException</code></dd></dl>"},
+                 "<dd><code>java.io.IOException</code></dd>" + NL + "</dl>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;</div>" + NL + "<div class=\"block\">" +
                  "The name for this class.</div>"}};
--- a/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testSinceTag/TestSinceTag.java	Tue May 14 10:14:54 2013 -0700
@@ -48,11 +48,11 @@
     //Input for string search tests.
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
-            "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+            "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
             "<dd>JDK1.0</dd>"
         },
         {BUG_ID + FS + "serialized-form.html",
-            "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
+            "<dl>" + NL + "<dt><span class=\"strong\">Since:</span></dt>" + NL +
             "<dd>1.4</dd>"
         }
     };