changeset 2640:9a6c1bf0d19a

8043698: <title> tag not getting generated in package-summary pages for un-named packages Reviewed-by: jjg, ksrini
author bpatel
date Wed, 17 Sep 2014 23:52:19 -0700
parents c419bddef7f3
children 7e15b8d4631d
files src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java test/com/sun/javadoc/testUnnamedPackage/TestUnnamedPackage.java
diffstat 3 files changed, 6 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Mon Sep 15 12:43:35 2014 +0100
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/PackageWriterImpl.java	Wed Sep 17 23:52:19 2014 -0700
@@ -90,8 +90,7 @@
      * {@inheritDoc}
      */
     public Content getPackageHeader(String heading) {
-        String pkgName = packageDoc.name();
-        Content bodyTree = getBody(true, getWindowTitle(pkgName));
+        Content bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
         addTop(bodyTree);
         addNavLinks(true, bodyTree);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
--- a/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java	Mon Sep 15 12:43:35 2014 +0100
+++ b/src/jdk.javadoc/share/classes/com/sun/tools/doclets/formats/html/ProfilePackageWriterImpl.java	Wed Sep 17 23:52:19 2014 -0700
@@ -103,8 +103,7 @@
      * {@inheritDoc}
      */
     public Content getPackageHeader(String heading) {
-        String pkgName = packageDoc.name();
-        Content bodyTree = getBody(true, getWindowTitle(pkgName));
+        Content bodyTree = getBody(true, getWindowTitle(utils.getPackageName(packageDoc)));
         addTop(bodyTree);
         addNavLinks(true, bodyTree);
         HtmlTree div = new HtmlTree(HtmlTag.DIV);
--- a/test/com/sun/javadoc/testUnnamedPackage/TestUnnamedPackage.java	Mon Sep 15 12:43:35 2014 +0100
+++ b/test/com/sun/javadoc/testUnnamedPackage/TestUnnamedPackage.java	Wed Sep 17 23:52:19 2014 -0700
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug      4904075 4774450 5015144
+ * @bug      4904075 4774450 5015144 8043698
  * @summary  Reference unnamed package as "Unnamed", not empty string.
  *           Generate a package summary for the unnamed package.
  * @author   jamieh
@@ -51,6 +51,9 @@
                 "This is a package comment for the unnamed package.",
                 "This is a class in the unnamed package.");
 
+        checkOutput("package-summary.html", true,
+                "<title>&lt;Unnamed&gt;</title>");
+
         checkOutput("package-tree.html", true,
                 "<h1 class=\"title\">Hierarchy For Package &lt;Unnamed&gt;</h1>");