changeset 53138:a92cd6585f60

8215291: Broken links when generating from project without modules Reviewed-by: jjg
author hannesw
date Fri, 21 Dec 2018 11:02:36 +0100
parents 6e8c8d16ecb4
children b0686d0be73f
files src/jdk.javadoc/share/classes/jdk/javadoc/internal/doclets/formats/html/resources/search.js test/langtools/jdk/javadoc/doclet/testSearch/TestSearch.java
diffstat 2 files changed, 2 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- 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"