8011662: Remove single instance of resource with HTML from doclet resource bundle

Reviewed-by: bpatel, darcy
This commit is contained in:
Jonathan Gibbons 2013-05-14 10:14:53 -07:00
parent c7eaca84da
commit 1711056efc
4 changed files with 10 additions and 4 deletions

View File

@ -450,7 +450,10 @@ public class ClassUseWriter extends SubWriterHolderWriter {
Content bodyTree = getBody(true, getWindowTitle(title));
addTop(bodyTree);
addNavLinks(true, bodyTree);
Content headContent = getResource("doclet.ClassUse_Title", cltype, clname);
ContentBuilder headContent = new ContentBuilder();
headContent.addContent(getResource("doclet.ClassUse_Title", cltype));
headContent.addContent(new HtmlTree(HtmlTag.BR));
headContent.addContent(clname);
Content heading = HtmlTree.HEADING(HtmlConstants.CLASS_PAGE_HEADING,
true, HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);

View File

@ -272,7 +272,10 @@ public class PackageUseWriter extends SubWriterHolderWriter {
Content bodyTree = getBody(true, getWindowTitle(title));
addTop(bodyTree);
addNavLinks(true, bodyTree);
Content headContent = getResource("doclet.ClassUse_Title", packageText, name);
ContentBuilder headContent = new ContentBuilder();
headContent.addContent(getResource("doclet.ClassUse_Title", packageText));
headContent.addContent(new HtmlTree(HtmlTag.BR));
headContent.addContent(name);
Content heading = HtmlTree.HEADING(HtmlConstants.TITLE_HEADING, true,
HtmlStyle.title, headContent);
Content div = HtmlTree.DIV(HtmlStyle.header, heading);

View File

@ -40,7 +40,7 @@ public class ContentBuilder extends Content {
@Override
public void addContent(Content content) {
if (content.isEmpty())
if ((content instanceof ContentBuilder) && content.isEmpty())
return;
ensureMutableContents();
if (content instanceof ContentBuilder) {

View File

@ -179,7 +179,7 @@ doclet.ClassUse_ConstructorArgsTypeParameters=Constructor parameters in {1} with
doclet.ClassUse_ConstructorThrows=Constructors in {1} that throw {0}
doclet.ClassUse_No.usage.of.0=No usage of {0}
doclet.Window_ClassUse_Header=Uses of {0} {1}
doclet.ClassUse_Title=Uses of {0}<br>{1}
doclet.ClassUse_Title=Uses of {0}
doclet.navClassUse=Use
doclet.Error_in_packagelist=Error in using -group option: {0} {1}
doclet.Groupname_already_used=In -group option, groupname already used: {0}