Mercurial > hg > openjdk > bsd-port > langtools
changeset 1532:3b8323e24a63 jdk7u25-b15
8015998: Additional improvement in Javadoc framing
Reviewed-by: jjg
author | bpatel |
---|---|
date | Wed, 05 Jun 2013 14:31:54 -0700 |
parents | e1f27e4e180d |
children | 5d95c1e7c091 |
files | src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java test/com/sun/javadoc/testJavascript/TestJavascript.java |
diffstat | 2 files changed, 5 insertions(+), 3 deletions(-) [+] |
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Tue Jun 04 10:47:59 2013 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java Wed Jun 05 14:31:54 2013 -0700 @@ -315,7 +315,8 @@ " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL + " targetPage = \"undefined\";" + DocletConstants.NL + " function validURL(url) {" + DocletConstants.NL + - " if (!(url.indexOf(\".html\") == url.length - 5))" + DocletConstants.NL + + " var pos = url.indexOf(\".html\");" + DocletConstants.NL + + " if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL + " return false;" + DocletConstants.NL + " var allowNumber = false;" + DocletConstants.NL + " var allowSep = false;" + DocletConstants.NL +
--- a/test/com/sun/javadoc/testJavascript/TestJavascript.java Tue Jun 04 10:47:59 2013 -0700 +++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java Wed Jun 05 14:31:54 2013 -0700 @@ -23,7 +23,7 @@ /* * @test - * @bug 4665566 4855876 7025314 8012375 + * @bug 4665566 4855876 7025314 8012375 8015998 * @summary Verify that the output has the right javascript. * @author jamieh * @library ../lib/ @@ -56,7 +56,8 @@ " if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + NL + " targetPage = \"undefined\";" + NL + " function validURL(url) {" + NL + - " if (!(url.indexOf(\".html\") == url.length - 5))" + NL + + " var pos = url.indexOf(\".html\");" + NL + + " if (pos == -1 || pos != url.length - 5)" + NL + " return false;" + NL + " var allowNumber = false;" + NL + " var allowSep = false;" + NL +