< prev index next >

src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/TagletWriterImpl.java

Print this page

        

@@ -407,20 +407,15 @@
     public BaseConfiguration configuration() {
         return configuration;
     }
 
     private Content createAnchorAndSearchIndex(Element element, String tagText, String desc){
+        String anchorName = htmlWriter.links.getName(tagText);
         Content result = null;
         if (isFirstSentence && inSummary) {
             result = new StringContent(tagText);
         } else {
-            String anchorName = htmlWriter.links.getName(tagText);
-            int count = htmlWriter.indexAnchorTable.computeIfAbsent(anchorName, s -> 0);
-            htmlWriter.indexAnchorTable.put(anchorName, count + 1);
-            if (count > 0) {
-                anchorName += "-" + count;
-            }
             result = HtmlTree.A_ID(HtmlStyle.searchTagResult, anchorName, new StringContent(tagText));
             if (configuration.createindex && !tagText.isEmpty()) {
                 SearchIndexItem si = new SearchIndexItem();
                 si.setLabel(tagText);
                 si.setDescription(desc);
< prev index next >