8215291: Broken links when generating from project without modules
authorhannesw
Fri, 21 Dec 2018 11:02:36 +0100
changeset 53113 a92cd6585f60
parent 53112 6e8c8d16ecb4
child 53114 b0686d0be73f
8215291: Broken links when generating from project without modules Reviewed-by: jjg
src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js
test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java
--- 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"