changeset 1232:1c14c3a8ea14 icedtea-2.2.9

8015997: Additional improvement in Javadoc framing Reviewed-by: jjg
author bpatel
date Wed, 05 Jun 2013 14:31:54 -0700
parents 2e4b6a66aafe
children e1e019fc70db
files src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java
diffstat 1 files changed, 2 insertions(+), 1 deletions(-) [+]
line wrap: on
line diff
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Wed Jun 12 12:23:44 2013 +0100
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Wed Jun 05 14:31:54 2013 -0700
@@ -312,7 +312,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 +