8215291: Broken links when generating from project without modules
Reviewed-by: jjg
--- a/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Fri Dec 21 11:43:04 2018 +0530
+++ b/src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js Fri Dec 21 11:02:36 2018 +0100
@@ -55,7 +55,7 @@
return ui.item.m + slash;
} else if ((ui.item.category === catTypes && ui.item.p) || ui.item.category === catMembers) {
$.each(packageSearchIndex, function(index, item) {
- if (ui.item.p == item.l) {
+ if (item.m && ui.item.p == item.l) {
urlPrefix = item.m + slash;
}
});
--- a/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java Fri Dec 21 11:43:04 2018 +0530
+++ b/test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java Fri Dec 21 11:02:36 2018 +0100
@@ -686,7 +686,7 @@
+ " return ui.item.m + slash;\n"
+ " } else if ((ui.item.category === catTypes && ui.item.p) || ui.item.category === catMembers) {\n"
+ " $.each(packageSearchIndex, function(index, item) {\n"
- + " if (ui.item.p == item.l) {\n"
+ + " if (item.m && ui.item.p == item.l) {\n"
+ " urlPrefix = item.m + slash;\n"
+ " }\n"
+ " });\n"