Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -401,7 +401,7 @@ public void handleSimpleTag(HTML.Tag t, MutableAttributeSet a, int pos) {
String attrId = (String) a.getAttribute(HTML.Attribute.ID);
if (names.contains(attrId)) {
// we have found desired javadoc member info anchor
state[0] = A_OPEN;
state[0] = A_CLOSE;
}
} else {
section_counter++;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@
*/
package org.netbeans.api.java.source.ui;

import java.net.MalformedURLException;
import java.net.URI;
import java.net.URL;
import java.net.URLEncoder;
Expand Down Expand Up @@ -83,7 +82,12 @@ public void testJavadoc17Class() throws Exception {
assertTrue(result.contains("This is an example class."));
assertFalse(result.contains("</section>"));

URL url = appendFragment(root, "<init>(java.lang.String)");
URL url = appendFragment(root, "<init>()");
result = HTMLJavadocParser.getJavadocText(url, false);
assertTrue(result.contains("This is the default constructor."));
assertFalse(result.contains("</section>"));

url = appendFragment(root, "<init>(java.lang.String)");
result = HTMLJavadocParser.getJavadocText(url, false);
assertTrue(result.contains("This is a constructor taking a single String parameter."));
assertFalse(result.contains("</section>"));
Expand Down