Tue, 11 Jun 2013 09:25:57 +0100
Merge
1.1 --- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Mon Jun 10 09:52:54 2013 +0100 1.2 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Tue Jun 11 09:25:57 2013 +0100 1.3 @@ -314,7 +314,8 @@ 1.4 " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL + 1.5 " targetPage = \"undefined\";" + DocletConstants.NL + 1.6 " function validURL(url) {" + DocletConstants.NL + 1.7 - " if (!(url.indexOf(\".html\") == url.length - 5))" + DocletConstants.NL + 1.8 + " var pos = url.indexOf(\".html\");" + DocletConstants.NL + 1.9 + " if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL + 1.10 " return false;" + DocletConstants.NL + 1.11 " var allowNumber = false;" + DocletConstants.NL + 1.12 " var allowSep = false;" + DocletConstants.NL +
2.1 --- a/test/com/sun/javadoc/testJavascript/TestJavascript.java Mon Jun 10 09:52:54 2013 +0100 2.2 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Tue Jun 11 09:25:57 2013 +0100 2.3 @@ -23,7 +23,7 @@ 2.4 2.5 /* 2.6 * @test 2.7 - * @bug 4665566 4855876 7025314 8012375 2.8 + * @bug 4665566 4855876 7025314 8012375 8015997 2.9 * @summary Verify that the output has the right javascript. 2.10 * @author jamieh 2.11 * @library ../lib/ 2.12 @@ -56,7 +56,8 @@ 2.13 " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + NL + 2.14 " targetPage = \"undefined\";" + NL + 2.15 " function validURL(url) {" + NL + 2.16 - " if (!(url.indexOf(\".html\") == url.length - 5))" + NL + 2.17 + " var pos = url.indexOf(\".html\");" + NL + 2.18 + " if (pos == -1 || pos != url.length - 5)" + NL + 2.19 " return false;" + NL + 2.20 " var allowNumber = false;" + NL + 2.21 " var allowSep = false;" + NL +