changeset 1742:6a5288a298fd

8012175: Convert TagletOutputImpl to use ContentBuilder instead of StringBuilder Reviewed-by: darcy
author jjg
date Tue, 14 May 2013 10:14:54 -0700
parents 7af0fa419a2b
children 76a691e3e961
files 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 src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java test/com/sun/javadoc/AuthorDD/AuthorDD.java test/com/sun/javadoc/testConstructorIndent/TestConstructorIndent.java test/com/sun/javadoc/testHref/TestHref.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/testParamTaglet/TestParamTaglet.java test/com/sun/javadoc/testSerializedFormDeprecationInfo/TestSerializedFormDeprecationInfo.java test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java test/com/sun/javadoc/testSinceTag/TestSinceTag.java test/com/sun/javadoc/testValueTag/TestValueTag.java
diffstat 22 files changed, 200 insertions(+), 192 deletions(-) [+]
line wrap: on
line diff
--- 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,7 +246,7 @@
         if (doc instanceof MethodDoc) {
             addMethodInfo((MethodDoc) doc, dl);
         }
-        TagletOutputImpl output = new TagletOutputImpl("");
+        TagletOutput output = new TagletOutputImpl();
         TagletWriter.genTagOuput(configuration.tagletManager, doc,
             configuration.tagletManager.getCustomTags(doc),
                 getTagletWriterInstance(false), output);
@@ -266,7 +266,7 @@
      * @return true if there are tags to be printed else return false.
      */
     protected boolean hasSerializationOverviewTags(FieldDoc field) {
-        TagletOutputImpl output = new TagletOutputImpl("");
+        TagletOutput output = new TagletOutputImpl();
         TagletWriter.genTagOuput(configuration.tagletManager, field,
             configuration.tagletManager.getCustomTags(field),
                 getTagletWriterInstance(false), output);
--- 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
@@ -46,7 +46,7 @@
  * @author Bhavesh Patel (Modified)
  */
 public class HtmlSerialFieldWriter extends FieldWriterImpl
-    implements SerializedFormWriter.SerialFieldWriter {
+        implements SerializedFormWriter.SerialFieldWriter {
     ProgramElementDoc[] members = null;
 
     private boolean printedOverallAnchor = false;
@@ -186,7 +186,7 @@
      * @param contentTree the tree to which the member tags info will be added
      */
     public void addMemberTags(FieldDoc field, Content contentTree) {
-        TagletOutputImpl output = new TagletOutputImpl("");
+        TagletOutput output = new TagletOutputImpl();
         TagletWriter.genTagOuput(configuration.tagletManager, field,
                 configuration.tagletManager.getCustomTags(field),
                 writer.getTagletWriterInstance(false), output);
--- 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -146,7 +146,7 @@
      * @param methodsContentTree the tree to which the member tags info will be added
      */
     public void addMemberTags(MethodDoc member, Content methodsContentTree) {
-        TagletOutputImpl output = new TagletOutputImpl("");
+        TagletOutput output = new TagletOutputImpl();
         TagletManager tagletManager =
             configuration.tagletManager;
         TagletWriter.genTagOuput(tagletManager, member,
--- 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -25,6 +25,9 @@
 
 package com.sun.tools.doclets.formats.html;
 
+import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
+import com.sun.tools.doclets.formats.html.markup.RawHtml;
+import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.taglets.*;
 
 /**
@@ -37,45 +40,54 @@
  *
  * @since 1.5
  * @author Jamie Ho
+ * @author Jonathan Gibbons (rewrite)
  */
 
 public class TagletOutputImpl implements TagletOutput {
 
-    private StringBuilder output;
+    private ContentBuilder content;
+
+    public TagletOutputImpl() {
+        content = new ContentBuilder();
+    }
 
     public TagletOutputImpl(String o) {
         setOutput(o);
     }
 
+    public TagletOutputImpl(Content c) {
+        setOutput(c);
+    }
+
     /**
      * {@inheritDoc}
      */
     public void setOutput (Object o) {
-        output = new StringBuilder(o == null ? "" : (String) o);
+        content = new ContentBuilder();
+        if (o != null) {
+            if (o instanceof String)
+                content.addContent(new RawHtml((String) o));
+            else if (o instanceof Content)
+                content.addContent((Content) o);
+            else if (o instanceof TagletOutputImpl)
+                content.addContent(((TagletOutputImpl) o).content);
+            else
+                throw new IllegalArgumentException(o.getClass().getName());
+        }
     }
 
     /**
      * {@inheritDoc}
      */
     public void appendOutput(TagletOutput o) {
-        output.append(o.toString());
-    }
-
-    /**
-     * {@inheritDoc}
-     */
-    public boolean hasInheritDocTag() {
-        return output.indexOf(InheritDocTaglet.INHERIT_DOC_INLINE_TAG) != -1;
+        if (o instanceof TagletOutputImpl)
+            content.addContent(((TagletOutputImpl) o).content);
+        else
+            throw new IllegalArgumentException(o.getClass().getName());
     }
 
     public String toString() {
-        return output.toString();
+        return content.toString();
     }
 
-    /**
-     * Check whether the taglet output is empty.
-     */
-    public boolean isEmpty() {
-        return (toString().trim().isEmpty());
-    }
 }
--- 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
@@ -26,9 +26,12 @@
 package com.sun.tools.doclets.formats.html;
 
 import com.sun.javadoc.*;
+import com.sun.tools.doclets.formats.html.markup.ContentBuilder;
 import com.sun.tools.doclets.formats.html.markup.HtmlAttr;
+import com.sun.tools.doclets.formats.html.markup.HtmlStyle;
 import com.sun.tools.doclets.formats.html.markup.HtmlTag;
 import com.sun.tools.doclets.formats.html.markup.HtmlTree;
+import com.sun.tools.doclets.formats.html.markup.RawHtml;
 import com.sun.tools.doclets.formats.html.markup.StringContent;
 import com.sun.tools.doclets.internal.toolkit.*;
 import com.sun.tools.doclets.internal.toolkit.builders.SerializedFormBuilder;
@@ -63,7 +66,7 @@
      * {@inheritDoc}
      */
     public TagletOutput getOutputInstance() {
-        return new TagletOutputImpl("");
+        return new TagletOutputImpl();
     }
 
     /**
@@ -71,7 +74,7 @@
      */
     protected TagletOutput codeTagOutput(Tag tag) {
         Content result = HtmlTree.CODE(new StringContent(tag.text()));
-        return new TagletOutputImpl(result.toString());
+        return new TagletOutputImpl(result);
     }
 
     /**
@@ -90,18 +93,17 @@
      * {@inheritDoc}
      */
     public TagletOutput deprecatedTagOutput(Doc doc) {
-        StringBuilder output = new StringBuilder();
+        ContentBuilder result = new ContentBuilder();
         Tag[] deprs = doc.tags("deprecated");
         if (doc instanceof ClassDoc) {
             if (Util.isDeprecated((ProgramElementDoc) doc)) {
-                output.append("<span class=\"strong\">" +
-                    configuration.
-                        getText("doclet.Deprecated") + "</span>&nbsp;");
+                result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
+                        new StringContent(configuration.getText("doclet.Deprecated"))));
+                result.addContent(RawHtml.nbsp);
                 if (deprs.length > 0) {
                     Tag[] commentTags = deprs[0].inlineTags();
                     if (commentTags.length > 0) {
-
-                        output.append(commentTagsToOutput(null, doc,
+                        result.addContent(commentTagsToOutput(null, doc,
                             deprs[0].inlineTags(), false).toString()
                         );
                     }
@@ -110,24 +112,23 @@
         } else {
             MemberDoc member = (MemberDoc) doc;
             if (Util.isDeprecated((ProgramElementDoc) doc)) {
-                output.append("<span class=\"strong\">" +
-                    configuration.
-                            getText("doclet.Deprecated") + "</span>&nbsp;");
+                result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
+                        new StringContent(configuration.getText("doclet.Deprecated"))));
+                result.addContent(RawHtml.nbsp);
                 if (deprs.length > 0) {
-                    output.append("<i>");
-                    output.append(commentTagsToOutput(null, doc,
-                        deprs[0].inlineTags(), false).toString());
-                    output.append("</i>");
+                    TagletOutput body = commentTagsToOutput(null, doc,
+                        deprs[0].inlineTags(), false);
+                    result.addContent(HtmlTree.I(new RawHtml(body.toString())));
                 }
             } else {
                 if (Util.isDeprecated(member.containingClass())) {
-                    output.append("<span class=\"strong\">" +
-                    configuration.
-                            getText("doclet.Deprecated") + "</span>&nbsp;");
+                    result.addContent(HtmlTree.SPAN(HtmlStyle.strong,
+                            new StringContent(configuration.getText("doclet.Deprecated"))));
+                    result.addContent(RawHtml.nbsp);
                 }
             }
         }
-        return new TagletOutputImpl(output.toString());
+        return new TagletOutputImpl(result);
     }
 
     /**
@@ -136,7 +137,7 @@
     protected TagletOutput expertTagOutput(Tag tag) {
         HtmlTree result = new HtmlTree(HtmlTag.SUB, new StringContent(tag.text()));
         result.addAttr(HtmlAttr.ID, "expert");
-        return new TagletOutputImpl(result.toString());
+        return new TagletOutputImpl(result);
     }
 
     /**
@@ -144,7 +145,7 @@
      */
     protected TagletOutput literalTagOutput(Tag tag) {
         Content result = new StringContent(tag.text());
-        return new TagletOutputImpl(result.toString());
+        return new TagletOutputImpl(result);
     }
 
     /**
@@ -158,95 +159,102 @@
      * {@inheritDoc}
      */
     public TagletOutput getParamHeader(String header) {
-        StringBuilder result = new StringBuilder();
-        result.append("<dt>");
-        result.append("<span class=\"strong\">").append(header).append("</span></dt>");
-        return new TagletOutputImpl(result.toString());
+        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+                new StringContent(header)));
+        return new TagletOutputImpl(result);
     }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput paramTagOutput(ParamTag paramTag, String paramName) {
-        TagletOutput result = new TagletOutputImpl("<dd><code>" + paramName + "</code>"
-         + " - " + htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false) + "</dd>");
-        return result;
+        ContentBuilder body = new ContentBuilder();
+        body.addContent(HtmlTree.CODE(new RawHtml(paramName)));
+        body.addContent(" - ");
+        body.addContent(new RawHtml(htmlWriter.commentTagsToString(paramTag, null, paramTag.inlineTags(), false)));
+        HtmlTree result = HtmlTree.DD(body);
+        return new TagletOutputImpl(result);
     }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput returnTagOutput(Tag returnTag) {
-        TagletOutput result = new TagletOutputImpl(DocletConstants.NL + "<dt>" +
-            "<span class=\"strong\">" + configuration.getText("doclet.Returns") +
-            "</span>" + "</dt>" + "<dd>" +
-            htmlWriter.commentTagsToString(returnTag, null, returnTag.inlineTags(),
-            false) + "</dd>");
-        return result;
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+                new StringContent(configuration.getText("doclet.Returns")))));
+        result.addContent(HtmlTree.DD(new RawHtml(htmlWriter.commentTagsToString(
+                returnTag, null, returnTag.inlineTags(), false))));
+        return new TagletOutputImpl(result);
     }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput seeTagOutput(Doc holder, SeeTag[] seeTags) {
-        String result = "";
+        ContentBuilder body = new ContentBuilder();
         if (seeTags.length > 0) {
-            result = addSeeHeader(result);
             for (int i = 0; i < seeTags.length; ++i) {
-                if (i > 0) {
-                    result += ", " + DocletConstants.NL;
-                }
-                result += htmlWriter.seeTagToString(seeTags[i]);
+                appendSeparatorIfNotEmpty(body);
+                body.addContent(new RawHtml(htmlWriter.seeTagToString(seeTags[i])));
             }
         }
         if (holder.isField() && ((FieldDoc)holder).constantValue() != null &&
                 htmlWriter instanceof ClassWriterImpl) {
             //Automatically add link to constant values page for constant fields.
-            result = addSeeHeader(result);
+            appendSeparatorIfNotEmpty(body);
             DocPath constantsPath =
                     htmlWriter.pathToRoot.resolve(DocPaths.CONSTANT_VALUES);
             String whichConstant =
                     ((ClassWriterImpl) htmlWriter).getClassDoc().qualifiedName() + "." + ((FieldDoc) holder).name();
             DocLink link = constantsPath.fragment(whichConstant);
-            result += htmlWriter.getHyperLinkString(link,
-                    configuration.getText("doclet.Constants_Summary"));
+            body.addContent(htmlWriter.getHyperLink(link,
+                    new StringContent(configuration.getText("doclet.Constants_Summary"))));
         }
         if (holder.isClass() && ((ClassDoc)holder).isSerializable()) {
             //Automatically add link to serialized form page for serializable classes.
             if ((SerializedFormBuilder.serialInclude(holder) &&
                       SerializedFormBuilder.serialInclude(((ClassDoc)holder).containingPackage()))) {
-                result = addSeeHeader(result);
+                appendSeparatorIfNotEmpty(body);
                 DocPath serialPath = htmlWriter.pathToRoot.resolve(DocPaths.SERIALIZED_FORM);
                 DocLink link = serialPath.fragment(((ClassDoc)holder).qualifiedName());
-                result += htmlWriter.getHyperLinkString(link,
-                        configuration.getText("doclet.Serialized_Form"));
+                body.addContent(htmlWriter.getHyperLink(link,
+                        new StringContent(configuration.getText("doclet.Serialized_Form"))));
             }
         }
-        return result.equals("") ? null : new TagletOutputImpl(result + "</dd>");
+        if (body.isEmpty())
+            return new TagletOutputImpl(body);
+
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+                new StringContent(configuration.getText("doclet.See_Also")))));
+        result.addContent(HtmlTree.DD(body));
+        return new TagletOutputImpl(result);
+
     }
 
-    private String addSeeHeader(String result) {
-        if (result != null && result.length() > 0) {
-            return result + ", " + DocletConstants.NL;
-        } else {
-            return "<dt><span class=\"strong\">" +
-                    configuration.getText("doclet.See_Also") + "</span></dt><dd>";
+    private void appendSeparatorIfNotEmpty(ContentBuilder body) {
+        if (!body.isEmpty()) {
+            body.addContent(", ");
+            body.addContent(DocletConstants.NL);
         }
-     }
+    }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput simpleTagOutput(Tag[] simpleTags, String header) {
-        String result = "<dt><span class=\"strong\">" + header + "</span></dt>" + DocletConstants.NL +
-            "  <dd>";
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
+        ContentBuilder body = new ContentBuilder();
         for (int i = 0; i < simpleTags.length; i++) {
             if (i > 0) {
-                result += ", ";
+                body.addContent(", ");
             }
-            result += htmlWriter.commentTagsToString(simpleTags[i], null, simpleTags[i].inlineTags(), false);
+            body.addContent(new RawHtml(htmlWriter.commentTagsToString(
+                    simpleTags[i], null, simpleTags[i].inlineTags(), false)));
         }
-        result += "</dd>" + DocletConstants.NL;
+        result.addContent(HtmlTree.DD(body));
         return new TagletOutputImpl(result);
     }
 
@@ -254,46 +262,50 @@
      * {@inheritDoc}
      */
     public TagletOutput simpleTagOutput(Tag simpleTag, String header) {
-        return new TagletOutputImpl("<dt><span class=\"strong\">" + header + "</span></dt>" + "  <dd>"
-            + htmlWriter.commentTagsToString(simpleTag, null, simpleTag.inlineTags(), false)
-            + "</dd>" + DocletConstants.NL);
+        ContentBuilder result = new ContentBuilder();
+        result.addContent(HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong, new RawHtml(header))));
+        Content body = new RawHtml(htmlWriter.commentTagsToString(
+                simpleTag, null, simpleTag.inlineTags(), false));
+        result.addContent(HtmlTree.DD(body));
+        return new TagletOutputImpl(result);
     }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput getThrowsHeader() {
-        return new TagletOutputImpl(DocletConstants.NL + "<dt>" + "<span class=\"strong\">" +
-            configuration.getText("doclet.Throws") + "</span></dt>");
+        HtmlTree result = HtmlTree.DT(HtmlTree.SPAN(HtmlStyle.strong,
+                new StringContent(configuration.getText("doclet.Throws"))));
+        return new TagletOutputImpl(result);
     }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput throwsTagOutput(ThrowsTag throwsTag) {
-        String result = DocletConstants.NL + "<dd>";
-        result += throwsTag.exceptionType() == null ?
-            htmlWriter.codeText(throwsTag.exceptionName()) :
-            htmlWriter.codeText(
+        ContentBuilder body = new ContentBuilder();
+        Content excName = (throwsTag.exceptionType() == null) ?
+                new RawHtml(throwsTag.exceptionName()) :
                 htmlWriter.getLink(new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER,
-                throwsTag.exceptionType())).toString());
-        TagletOutput text = new TagletOutputImpl(
-            htmlWriter.commentTagsToString(throwsTag, null,
-            throwsTag.inlineTags(), false));
-        if (text != null && text.toString().length() > 0) {
-            result += " - " + text;
+                throwsTag.exceptionType()));
+        body.addContent(HtmlTree.CODE(excName));
+        String desc = htmlWriter.commentTagsToString(throwsTag, null,
+            throwsTag.inlineTags(), false);
+        if (desc != null && !desc.isEmpty()) {
+            body.addContent(" - ");
+            body.addContent(new RawHtml(desc));
         }
-        result += "</dd>";
-        return new TagletOutputImpl(result);
+        HtmlTree res2 = HtmlTree.DD(body);
+        return new TagletOutputImpl(res2);
     }
 
     /**
      * {@inheritDoc}
      */
     public TagletOutput throwsTagOutput(Type throwsType) {
-        return new TagletOutputImpl(DocletConstants.NL + "<dd>" +
-            htmlWriter.codeText(htmlWriter.getLink(
-                new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType)).toString()) + "</dd>");
+        HtmlTree result = HtmlTree.DD(HtmlTree.CODE(htmlWriter.getLink(
+                new LinkInfoImpl(configuration, LinkInfoImpl.Kind.MEMBER, throwsType))));
+        return new TagletOutputImpl(result);
     }
 
     /**
@@ -303,7 +315,7 @@
             boolean includeLink) {
         return new TagletOutputImpl(includeLink ?
             htmlWriter.getDocLink(LinkInfoImpl.Kind.VALUE_TAG, field,
-                constantVal, false).toString() : constantVal);
+                constantVal, false) : new RawHtml(constantVal));
     }
 
     /**
@@ -325,8 +337,8 @@
      */
     public TagletOutput commentTagsToOutput(Tag holderTag,
         Doc holderDoc, Tag[] tags, boolean isFirstSentence) {
-        return new TagletOutputImpl(htmlWriter.commentTagsToString(
-            holderTag, holderDoc, tags, isFirstSentence));
+        return new TagletOutputImpl(new RawHtml(htmlWriter.commentTagsToString(
+            holderTag, holderDoc, tags, isFirstSentence)));
     }
 
     /**
@@ -335,13 +347,4 @@
     public Configuration configuration() {
         return configuration;
     }
-
-    /**
-     * Return an instance of a TagletWriter that knows how to write HTML.
-     *
-     * @return an instance of a TagletWriter that knows how to write HTML.
-     */
-    public TagletOutput getTagletOutputInstance() {
-        return new TagletOutputImpl("");
-    }
 }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/CodeTaglet.java	Tue May 14 10:14:54 2013 -0700
@@ -53,12 +53,12 @@
     private static final String NAME = "code";
 
     public static void register(Map<String, Taglet> map) {
-            map.remove(NAME);
-            map.put(NAME, new CodeTaglet());
+        map.remove(NAME);
+        map.put(NAME, new CodeTaglet());
     }
 
     public String getName() {
-            return NAME;
+        return NAME;
     }
 
     /**
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/InheritDocTaglet.java	Tue May 14 10:14:54 2013 -0700
@@ -116,7 +116,7 @@
      */
     private TagletOutput retrieveInheritedDocumentation(TagletWriter writer,
             ProgramElementDoc ped, Tag holderTag, boolean isFirstSentence) {
-        TagletOutput replacement = writer.getTagletOutputInstance();
+        TagletOutput replacement = writer.getOutputInstance();
 
         Configuration configuration = writer.configuration();
         Taglet inheritableTaglet = holderTag == null ?
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/LiteralTaglet.java	Tue May 14 10:14:54 2013 -0700
@@ -26,7 +26,6 @@
 
 import java.util.Map;
 
-import com.sun.javadoc.Doc;
 import com.sun.javadoc.Tag;
 
 
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/Taglet.java	Tue May 14 10:14:54 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -152,4 +152,6 @@
      */
     public abstract TagletOutput getTagletOutput(Doc holder, TagletWriter writer) throws IllegalArgumentException;
 
+    @Override
+    public abstract String toString();
 }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletOutput.java	Tue May 14 10:14:54 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -52,9 +52,6 @@
      */
     public abstract void appendOutput(TagletOutput o);
 
-    /**
-     * Return true if this output has any occurances of @inheritDoc.
-     * @return true if inheritDoc tag is found.
-     */
-    public abstract boolean hasInheritDocTag();
+    @Override
+    public String toString();
 }
--- a/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java	Tue May 14 10:14:54 2013 -0700
+++ b/src/share/classes/com/sun/tools/doclets/internal/toolkit/taglets/TagletWriter.java	Tue May 14 10:14:54 2013 -0700
@@ -307,9 +307,4 @@
      * @return an instance of the configuration used for this doclet.
      */
     public abstract Configuration configuration();
-
-    /**
-     * @return an instance of the taglet output object.
-     */
-    public abstract TagletOutput getTagletOutputInstance();
 }
--- a/test/com/sun/javadoc/AuthorDD/AuthorDD.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/AuthorDD/AuthorDD.java	Tue May 14 10:14:54 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2002, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2002, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -86,12 +86,12 @@
 
              // Test single @since tag:
 
-            { "<dt><span class=\"strong\">Since:</span></dt>"+NL+"  <dd>JDK 1.0</dd>",
+            { "<dt><span class=\"strong\">Since:</span></dt>"+NL+"<dd>JDK 1.0</dd>",
                                   BUGID + FS + "p1" + FS + "C1.html" },
 
             // Test multiple @author tags:
 
-            { "<dt><span class=\"strong\">Author:</span></dt>"+NL+"  <dd>Doug Kramer, Jamie, Neal</dd>",
+            { "<dt><span class=\"strong\">Author:</span></dt>"+NL+"<dd>Doug Kramer, Jamie, Neal</dd>",
                                   BUGID + FS + "p1" + FS + "C1.html" },
 
         };
--- 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -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><dd>" +
-                 "<code>i</code> - a param.</dd></dl>"
+                 "<dl><dt><span class=\"strong\">Parameters:</span></dt>" + NL +
+                 "<dd><code>i</code> - a param.</dd></dl>"
         }
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
--- a/test/com/sun/javadoc/testHref/TestHref.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testHref/TestHref.java	Tue May 14 10:14:54 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -70,7 +70,7 @@
         },
         //@see test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
+            "See Also:</span></dt>" + NL + "<dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
         },
 
         //Header does not link to the page itself.
--- a/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
@@ -55,43 +55,43 @@
     private static final String[][] TEST_CMNT_DEPR = {
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
                  "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "  <dd>JDK1.0</dd></dl>"},
+                 "<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 + "<dt><span class=\"strong\">See Also:</span></dt>" +
+                 "<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 +
-                 "  <dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt><dd>" +
+                 "<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><dd><code>title" +
-                 "</code> - the title</dd><dd><code>test</code> - boolean value" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><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><dd><code>undecorated" +
+        {BUG_ID + FS + "pkg1" + FS + "C1.html", "<dl><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><dt><span class=\"strong\">Since:" +
-                 "</span></dt>" + NL + "  <dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt><dd>" +
+                 "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 +
-                 "<dd><code>java.io.IOException</code></dd><dt><span class=\"strong\">See Also:" +
-                 "</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<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:" +
-                 "</span></dt><dd><code>set</code> - boolean</dd><dt><span class=\"strong\">" +
-                 "Since:</span></dt>" + NL + "  <dd>1.4</dd></dl>"},
+                 "</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>" +
                  "</dt>" + NL + "<dd><code>" +
-                 "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" +
-                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "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>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@@ -99,8 +99,8 @@
                  "<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 +
-                 "  <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<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>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@@ -123,34 +123,34 @@
     private static final String[][] TEST_NODEPR = {
         {BUG_ID + FS + "pkg1" + FS + "package-summary.html", "<dl>" +
                  "<dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "  <dd>JDK1.0</dd></dl>"},
+                 "<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 + "<dt><span class=\"strong\">See Also:" +
-                 "</span></dt><dd><a href=\"../pkg1/C2.html\" title=\"class in pkg1\">" +
+                 "</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:" +
-                 "</span></dt><dd><code>title</code> - the title</dd><dd><code>" +
+                 "</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><dd><code>undecorated</code> - <code>true</code>" +
+                 "</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><dt><span class=\"strong\">Since:</span></dt>" + NL + "  <dd>1.4</dd>" + NL +
-                 "<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#readObject()\">" +
+                 "</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 + "<dd><code>java.io.IOException</code></dd><dt>" +
-                 "<span class=\"strong\">See Also:</span></dt><dd><a href=\"../pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "</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>" +
                  "</dt>" + NL + "<dd><code>" +
-                 "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" +
-                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "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>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@@ -158,8 +158,8 @@
                  "<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 +
-                 "  <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<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>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
--- 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
@@ -38,7 +38,7 @@
     private static final String[][] TEST =
         new String[][] {
             {"./" + BUG_ID + "/C.html",
-                "<dt><span class=\"strong\">See Also:</span></dt><dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
+                "<dt><span class=\"strong\">See Also:</span></dt>" + NL + "<dd><a href=\"C.html#getRate()\"><code>getRate()</code></a>, " + NL +
                 "<a href=\"C.html#setRate(double)\"><code>setRate(double)</code></a></dd>"},
             {"./" + BUG_ID + "/C.html",
                 "<pre>public final&nbsp;void&nbsp;setRate(double&nbsp;value)</pre>" + NL +
--- 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
@@ -80,11 +80,11 @@
                 "Class TypeParameters&lt;E&gt;</h2>"},
             //Check class type parameters section.
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
-                "<dt><span class=\"strong\">Type Parameters:</span></dt><dd><code>E</code> - " +
+                "<dt><span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>E</code> - " +
                 "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><dd>" +
+                "<dl><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>"},
             //Method that uses class type parameter.
@@ -93,8 +93,8 @@
                     "parameter in TypeParameters\">E</a>&nbsp;param)"},
             //Method type parameter section.
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
-                "<span class=\"strong\">Type Parameters:</span></dt><dd><code>T</code> - This is the first " +
-                    "type parameter.</dd><dd><code>V</code> - This is the second type " +
+                "<span class=\"strong\">Type Parameters:</span></dt>" + NL + "<dd><code>T</code> - This is the first " +
+                    "type parameter.</dd>" + NL + "<dd><code>V</code> - This is the second type " +
                     "parameter."},
             //Signature of method with type parameters
             {BUG_ID + FS + "pkg" + FS + "TypeParameters.html",
--- a/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testParamTaglet/TestParamTaglet.java	Tue May 14 10:14:54 2013 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -48,13 +48,13 @@
     private static final String[][] TEST = {
         //Regular param tags.
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<span class=\"strong\">Parameters:</span></dt><dd><code>param1</code> - testing 1 2 3.</dd>" +
-                "<dd><code>param2</code> - testing 1 2 3."
+            "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code>param1</code> - testing 1 2 3.</dd>" +
+                NL + "<dd><code>param2</code> - testing 1 2 3."
         },
         //Param tags that don't match with any real parameters.
         {BUG_ID + FS + "pkg" + FS + "C.html",
-            "<span class=\"strong\">Parameters:</span></dt><dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
-                "<dd><code><I>p2</I></code> - testing 1 2 3."
+            "<span class=\"strong\">Parameters:</span></dt>" + NL + "<dd><code><I>p1</I></code> - testing 1 2 3.</dd>" +
+                NL + "<dd><code><I>p2</I></code> - testing 1 2 3."
         },
         //{@inherit} doc misuse does not cause doclet to throw exception.
         // Param is printed with nothing inherited.
--- 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2009, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2009, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -43,8 +43,8 @@
     private static final String[][] TEST_CMNT_DEPR = {
         {BUG_ID + FS + "serialized-form.html", "<dl>" +
                  "<dt><span class=\"strong\">Throws:</span></dt>" + NL + "<dd><code>" +
-                 "java.io.IOException</code></dd><dt><span class=\"strong\">See Also:</span>" +
-                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "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>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
@@ -53,8 +53,8 @@
                  "<div class=\"block\">This field indicates whether the C1 " +
                  "is undecorated.</div>" + NL + "&nbsp;" + NL +
                  "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
-                 "  <dd>1.4</dd>" + NL + "<dt><span class=\"strong\">See Also:</span>" +
-                 "</dt><dd><a href=\"pkg1/C1.html#setUndecorated(boolean)\">" +
+                 "<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>"},
         {BUG_ID + FS + "serialized-form.html", "<span class=\"strong\">Deprecated.</span>" +
                  "&nbsp;<i>As of JDK version 1.5, replaced by" + NL +
--- a/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testSimpleTagInherit/TestSimpleTagInherit.java	Tue May 14 10:14:54 2013 -0700
@@ -47,10 +47,10 @@
     private static final String[][] TEST = {
         { BUG_ID + FS + "p" + FS + "TestClass.html",
           "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
-          "  <dd>doc for BaseClass class</dd>" },
+          "<dd>doc for BaseClass class</dd>" },
         { BUG_ID + FS + "p" + FS + "TestClass.html",
           "<dt><span class=\"strong\"><em>Custom:</em></span></dt>" + NL +
-          "  <dd>doc for BaseClass method</dd>" }
+          "<dd>doc for BaseClass method</dd>" }
     };
     private static final String[][] NEGATED_TEST = NO_TEST;
 
--- 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
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2012, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2012, 2013, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -49,11 +49,11 @@
     private static final String[][] TEST = {
         {BUG_ID + FS + "pkg1" + FS + "C1.html",
             "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
-            "  <dd>JDK1.0</dd>"
+            "<dd>JDK1.0</dd>"
         },
         {BUG_ID + FS + "serialized-form.html",
             "<dl><dt><span class=\"strong\">Since:</span></dt>" + NL +
-            "  <dd>1.4</dd>"
+            "<dd>1.4</dd>"
         }
     };
 
--- a/test/com/sun/javadoc/testValueTag/TestValueTag.java	Tue May 14 10:14:54 2013 -0700
+++ b/test/com/sun/javadoc/testValueTag/TestValueTag.java	Tue May 14 10:14:54 2013 -0700
@@ -90,7 +90,7 @@
         //Test @value tag used with custom tag.
         {BUG_ID + FS + "pkg1" + FS + "CustomTagUsage.html",
             "<dt><span class=\"strong\">Todo:</span></dt>" + NL +
-                "  <dd>the value of this constant is 55.</dd>"},
+                "<dd>the value of this constant is 55.</dd>"},
         //Test @value warning printed when used with non-constant.
         {WARNING_OUTPUT,"warning - @value tag (which references nonConstant) " +
             "can only be used in constants."