8182257: Duplicate anchor ids in generated javadoc pages
authorbpatel
Wed, 12 Jul 2017 18:54:07 -0700
changeset 45908 df7fadfd702f
parent 45907 656a844c382d
child 45909 b9bec21c56f6
8182257: Duplicate anchor ids in generated javadoc pages Reviewed-by: jjg
langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java
langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java
--- a/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Wed Jul 12 17:39:46 2017 -0700
+++ b/langtools/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/AbstractMemberWriter.java	Wed Jul 12 18:54:07 2017 -0700
@@ -532,7 +532,7 @@
         tdDesc.addStyle(HtmlStyle.colLast);
         writer.addSummaryLinkComment(this, member, firstSentenceTags, tdDesc);
         tr.addContent(tdDesc);
-        if (utils.isMethod(member) && !utils.isAnnotationType(member)) {
+        if (utils.isMethod(member) && !utils.isAnnotationType(member) && !utils.isProperty(name(member))) {
             int methodType = utils.isStatic(member) ? MethodTypes.STATIC.tableTabs().value() :
                     MethodTypes.INSTANCE.tableTabs().value();
             if (utils.isInterface(member.getEnclosingElement())) {
--- a/langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Wed Jul 12 17:39:46 2017 -0700
+++ b/langtools/test/jdk/javadoc/doclet/testJavaFX/TestJavaFX.java	Wed Jul 12 18:54:07 2017 -0700
@@ -24,7 +24,7 @@
 /*
  * @test
  * @bug 7112427 8012295 8025633 8026567 8061305 8081854 8150130 8162363
- *      8167967 8172528 8175200 8178830
+ *      8167967 8172528 8175200 8178830 8182257
  * @summary Test of the JavaFX doclet features.
  * @author jvalenta
  * @library ../lib
@@ -137,7 +137,10 @@
                 "<h3>Property Summary</h3>\n"
                 + "<table class=\"memberSummary\" summary=\"Property Summary table, listing properties, and an explanation\">\n"
                 + "<caption><span>Properties</span><span class=\"tabEnd\">&nbsp;</span></caption>",
-                "");
+                "<tr class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
+                "<tr class=\"rowColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
 
         checkOutput("pkg1/C.html", false,
                 "A()",
@@ -147,7 +150,11 @@
                 + "</span><span id=\"t2\" class=\"tableTab\"><span><a href=\"javascript:show(2);\">Instance Methods</a>"
                 + "</span><span class=\"tabEnd\">&nbsp;</span></span><span id=\"t4\" class=\"tableTab\"><span>"
                 + "<a href=\"javascript:show(8);\">Concrete Methods</a></span><span class=\"tabEnd\">&nbsp;</span></span>"
-                + "</caption>");
+                + "</caption>",
+                "<tr id=\"i0\" class=\"altColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.BooleanProperty.html\" title=\"class in pkg1\">C.BooleanProperty</a></code></td>\n",
+                "<tr id=\"i1\" class=\"rowColor\">\n"
+                + "<td class=\"colFirst\"><code><a href=\"../pkg1/C.DoubleProperty.html\" title=\"class in pkg1\">C.DoubleProperty</a></code></td>\n");
 
         checkOutput("index-all.html", true,
                 "<div class=\"block\">Gets the value of the property paused.</div>",