changeset 2382:7ad480b982bf jdk8u20-b11

Merge
author lana
date Thu, 17 Apr 2014 09:34:39 -0700
parents d75c4adbc698 (current diff) 34f8ce53eac2 (diff)
children e101a12a45a7 5b8151ede720
files
diffstat 8 files changed, 171 insertions(+), 18 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Apr 15 17:09:56 2014 -0400
+++ b/.hgtags	Thu Apr 17 09:34:39 2014 -0700
@@ -253,6 +253,22 @@
 bb69217ed81202b1a490dc7150dc7cd073689341 jdk8-b127
 09cdd3b493c0d13dc32206e5f12bb1a2f7465687 jdk8-b128
 8fe7202d3c38784f3f14368e3954fc4e0394afa4 jdk8-b129
+9d81ae1c417a4748f58921c1f8def7f3c401cecd jdk8-b130
+196ab3dcbd28fac1578590684a337f1c7cf505c9 jdk8-b131
+c8a87a58eb3efdd64055566b502c9d4a72ca0996 jdk8-b132
+519557cab6d4a7fd77b33226e71f92303090420b jdk8u5-b01
+9003a59a512e6b764d8a3f805aadc3996a58e5bd jdk8u5-b02
+30e3dad0ebbdf3129bacd04a7f4cdecd3df92bb2 jdk8u5-b03
+019dcdfffced0ca2026a0ad8c0e5fcb49d46116f jdk8u5-b04
+c9db8c800797258540e0411e58b8f7d59273de5f jdk8u5-b05
+b1920c0b701d5ff219c9f622db5cafc9bf00d5c8 jdk8u5-b06
+180df7f2c078f1efaa6fcd8ca9f55dc5f81b182c jdk8u5-b07
+9c3d7d1a70391bd772693dc5a838b53e1cad0761 jdk8u5-b08
+169c8c1a2e8d1e80a4474d91f7809aa2a6b2249a jdk8u5-b09
+026543c71810701de08cdfd906d1b8fdc69b89c0 jdk8u5-b10
+a12055904afd9f951131804868215e724c71b684 jdk8u5-b11
+2a7002626e7997e946b96530629e2787bc1864bb jdk8u5-b12
+9beafb58fb99e8b5f7577b2f26b12743ef4d07e7 jdk8u5-b13
 26b33a6ea08810853af37e81c9b435465b289c98 jdk8u20-b02
 a07271bca831cf1bab35a2ffbcebd8e060b2734b jdk8u20-b03
 613c1d9930c9f650e3fc6926215931a85b679c66 jdk8u20-b04
@@ -264,3 +280,4 @@
 1a57c569cb811a897691e42049eca33da8f8d761 jdk8u20-b07
 0f821eb7e92b242c878dca68ef63f9626643ee8f jdk8u20-b08
 aa0cb3af23d376e012a142b0531c4f42032fdacf jdk8u20-b09
+a0d9c18a1041c4217db9cda1817f0e348f1be885 jdk8u20-b10
--- a/THIRD_PARTY_README	Tue Apr 15 17:09:56 2014 -0400
+++ b/THIRD_PARTY_README	Thu Apr 17 09:34:39 2014 -0700
@@ -1399,13 +1399,13 @@
 
 -------------------------------------------------------------------------------
 
-%% This notice is provided with respect to Little CMS 2.4, which may be 
+%% This notice is provided with respect to Little CMS 2.5, which may be 
 included with JRE 8, JDK 8, and OpenJDK 8.
 
 --- begin of LICENSE ---
 
 Little CMS
-Copyright (c) 1998-2010 Marti Maria Saguer
+Copyright (c) 1998-2011 Marti Maria Saguer
 
 Permission is hereby granted, free of charge, to any person obtaining a copy
 of this software and associated documentation files (the "Software"), to deal
--- a/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Tue Apr 15 17:09:56 2014 -0400
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/ConfigurationImpl.java	Thu Apr 17 09:34:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1998, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1998, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -247,7 +247,7 @@
             } else if (opt.equals("-doctitle")) {
                 doctitle = os[1];
             } else if (opt.equals("-windowtitle")) {
-                windowtitle = os[1];
+                windowtitle = os[1].replaceAll("\\<.*?>", "");
             } else if (opt.equals("-top")) {
                 top = os[1];
             } else if (opt.equals("-bottom")) {
--- a/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Tue Apr 15 17:09:56 2014 -0400
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler_ja.properties	Thu Apr 17 09:34:39 2014 -0700
@@ -419,8 +419,6 @@
 
 compiler.err.intf.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u304C\u5FC5\u8981\u3067\u3059
 
-compiler.err.intf.or.array.expected.here=\u3053\u3053\u306B\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u307E\u305F\u306F\u914D\u5217\u578B\u304C\u5FC5\u8981\u3067\u3059
-
 compiler.err.intf.meth.cant.have.body=\u30A4\u30F3\u30BF\u30D5\u30A7\u30FC\u30B9\u62BD\u8C61\u30E1\u30BD\u30C3\u30C9\u304C\u672C\u4F53\u3092\u6301\u3064\u3053\u3068\u306F\u3067\u304D\u307E\u305B\u3093
 
 # 0: symbol
--- a/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Tue Apr 15 17:09:56 2014 -0400
+++ b/src/share/classes/com/sun/tools/javac/resources/compiler_zh_CN.properties	Thu Apr 17 09:34:39 2014 -0700
@@ -419,8 +419,6 @@
 
 compiler.err.intf.expected.here=\u6B64\u5904\u9700\u8981\u63A5\u53E3
 
-compiler.err.intf.or.array.expected.here=\u6B64\u5904\u9884\u671F\u4E3A\u63A5\u53E3\u6216\u6570\u7EC4\u7C7B\u578B
-
 compiler.err.intf.meth.cant.have.body=\u63A5\u53E3\u62BD\u8C61\u65B9\u6CD5\u4E0D\u80FD\u5E26\u6709\u4E3B\u4F53
 
 # 0: symbol
--- a/src/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties	Tue Apr 15 17:09:56 2014 -0400
+++ b/src/share/classes/com/sun/tools/jdeps/resources/jdeps_ja.properties	Thu Apr 17 09:34:39 2014 -0700
@@ -29,8 +29,11 @@
 
 main.opt.dotoutput=\  -dotoutput <dir>                   DOT\u30D5\u30A1\u30A4\u30EB\u51FA\u529B\u306E\u5B9B\u5148\u30C7\u30A3\u30EC\u30AF\u30C8\u30EA
 
+main.opt.jdkinternals=\  -jdkinternals                      JDK\u5185\u90E8API\u306E\u30AF\u30E9\u30B9\u30EC\u30D9\u30EB\u306E\u4F9D\u5B58\u6027\u3092\u691C\u51FA\u3057\u307E\u3059\u3002\n                                     \u30C7\u30D5\u30A9\u30EB\u30C8\u3067\u306F\u3001-include\u30AA\u30D7\u30B7\u30E7\u30F3\u3092\u6307\u5B9A\u3057\u306A\u3044\u3068\u3001\n                                     -classpath\u306E\u3059\u3079\u3066\u306E\u30AF\u30E9\u30B9\u3068\u5165\u529B\u30D5\u30A1\u30A4\u30EB\u3092\u5206\u6790\u3057\u307E\u3059\u3002\n                                     \u3053\u306E\u30AA\u30D7\u30B7\u30E7\u30F3\u306F-p\u3001-e\u304A\u3088\u3073-s\u30AA\u30D7\u30B7\u30E7\u30F3\u3068\u4E00\u7DD2\u306B\u4F7F\u7528\u3067\u304D\u307E\u305B\u3093\u3002\n                                     \u8B66\u544A: JDK\u5185\u90E8API\u306F\u3001\u6B21\u306E\u30EA\u30EA\u30FC\u30B9\u3067\u30A2\u30AF\u30BB\u30B9\u3067\u304D\u306A\u304F\u306A\u308B\u53EF\u80FD\u6027\u304C\n                                     \u3042\u308A\u307E\u3059\u3002
+
 main.opt.depth=\  -depth=<depth>                     \u63A8\u79FB\u7684\u306A\u4F9D\u5B58\u6027\u5206\u6790\u306E\u6DF1\u3055\u3092\n                                     \u6307\u5B9A\u3057\u307E\u3059
 
+
 err.unknown.option=\u4E0D\u660E\u306A\u30AA\u30D7\u30B7\u30E7\u30F3: {0}
 err.missing.arg={0}\u306B\u5024\u304C\u6307\u5B9A\u3055\u308C\u3066\u3044\u307E\u305B\u3093
 err.internal.error=\u5185\u90E8\u30A8\u30E9\u30FC: {0} {1} {2}
--- a/src/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties	Tue Apr 15 17:09:56 2014 -0400
+++ b/src/share/classes/com/sun/tools/jdeps/resources/jdeps_zh_CN.properties	Thu Apr 17 09:34:39 2014 -0700
@@ -29,8 +29,11 @@
 
 main.opt.dotoutput=\  -dotoutput <dir>                   DOT \u6587\u4EF6\u8F93\u51FA\u7684\u76EE\u6807\u76EE\u5F55
 
+main.opt.jdkinternals=\  -jdkinternals                      \u5728 JDK \u5185\u90E8 API \u4E0A\u67E5\u627E\u7C7B\u7EA7\u522B\u7684\u88AB\u4F9D\u8D56\u5BF9\u8C61\u3002\n                                     \u9ED8\u8BA4\u60C5\u51B5\u4E0B, \u5B83\u5206\u6790 -classpath \u4E0A\u7684\u6240\u6709\u7C7B\n                                     \u548C\u8F93\u5165\u6587\u4EF6, \u9664\u975E\u6307\u5B9A\u4E86 -include \u9009\u9879\u3002\n                                     \u6B64\u9009\u9879\u4E0D\u80FD\u4E0E -p, -e \u548C -s \u9009\u9879\u4E00\u8D77\u4F7F\u7528\u3002\n                                     \u8B66\u544A: \u5728\u4E0B\u4E00\u4E2A\u53D1\u884C\u7248\u4E2D\u53EF\u80FD\u65E0\u6CD5\u8BBF\u95EE\n                                     JDK \u5185\u90E8 API\u3002
+
 main.opt.depth=\  -depth=<depth>                     \u6307\u5B9A\u8FC7\u6E21\u88AB\u4F9D\u8D56\u5BF9\u8C61\u5206\u6790\n                                     \u7684\u6DF1\u5EA6
 
+
 err.unknown.option=\u672A\u77E5\u9009\u9879: {0}
 err.missing.arg=\u6CA1\u6709\u4E3A{0}\u6307\u5B9A\u503C
 err.internal.error=\u5185\u90E8\u9519\u8BEF: {0} {1} {2}
--- a/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java	Tue Apr 15 17:09:56 2014 -0400
+++ b/test/com/sun/javadoc/testWindowTitle/TestWindowTitle.java	Thu Apr 17 09:34:39 2014 -0700
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2013, 2014, Oracle and/or its affiliates. All rights reserved.
  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
  *
  * This code is free software; you can redistribute it and/or modify it
@@ -23,7 +23,7 @@
 
 /*
  * @test
- * @bug 8016675
+ * @bug 8016675 8026736
  * @summary Test for window title.
  * @author Bhavesh Patel
  * @library ../lib/
@@ -34,26 +34,153 @@
 public class TestWindowTitle extends JavadocTester {
 
     private static final String BUG_ID = "8016675";
-    private static final String WIN_TITLE =
+    //Window title with JavaScript special characters.
+    private static final String TITLE_JS_CHARS =
             "Testing \"Window 'Title'\" with a \\ backslash and a / " +
             "forward slash and a \u00e8 unicode char also a    tab and also a " +
             "\t special character another \u0002 unicode)";
-    private static final String[][] TEST = {
-        {BUG_ID + FS  + "overview-summary.html",
+    private static final String[] ARGS_JS_CHARS = new String[]{
+        "-d", BUG_ID + "-1", "-windowtitle", TITLE_JS_CHARS, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_JS_CHARS = {
+        {BUG_ID + "-1" + FS + "overview-summary.html",
             "parent.document.title=\"Overview (Testing \\\"Window \\\'Title\\\'\\\" " +
             "with a \\\\ backslash and a / forward slash and a \\u00E8 unicode char " +
             "also a    tab and also a \\t special character another \\u0002 unicode))\";"
         },
     };
-    private static final String[][] NEG_TEST = {
-        {BUG_ID + FS + "overview-summary.html",
+    private static final String[][] NEG_TEST_JS_CHARS = {
+        {BUG_ID + "-1" + FS + "overview-summary.html",
             "parent.document.title=\"Overview (Testing \"Window \'Title\'\" " +
             "with a \\ backslash and a / forward slash and a \u00E8 unicode char " +
             "also a    tab and also a \t special character another \u0002 unicode))\";"
+        }
+    };
+
+    //Window title with a script tag.
+    private static final String TITLE_SCRIPT_TAG =
+            "Testing script tag in title </title><script>alert(\"Should not pop up\")</script>.";
+    private static final String[] ARGS_SCRIPT_TAG = new String[]{
+        "-d", BUG_ID + "-2", "-windowtitle", TITLE_SCRIPT_TAG, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_SCRIPT_TAG = {
+        {BUG_ID + "-2" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing script tag in title alert" +
+            "(\\\"Should not pop up\\\").)\";"
         },
+        {BUG_ID + "-2" + FS + "p2" + FS + "C2.html",
+            "parent.document.title=\"C2 (Testing script tag in title alert" +
+            "(\\\"Should not pop up\\\").)\";"
+        }
+    };
+    private static final String[][] NEG_TEST_SCRIPT_TAG = {
+        {BUG_ID + "-2" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing script tag in title </title><script>" +
+            "alert(\\\"Should not pop up\\\")</script>.)\";"
+        },
+        {BUG_ID + "-2" + FS + "p2" + FS + "C2.html",
+            "parent.document.title=\"C2 (Testing script tag in title </title><script>" +
+            "alert(\\\"Should not pop up\\\")</script>.)\";"
+        }
+    };
+
+    //Window title with other HTML tags.
+    private static final String TITLE_HTML_TAGS =
+            "Testing another <p>HTML</p> tag. Another <h1>tag</h1>. A " +
+            "<span id=\"testTag\">tag with attributes</span>. <script and </p are not tags.";
+    private static final String[] ARGS_HTML_TAGS = new String[]{
+        "-d", BUG_ID + "-3", "-windowtitle", TITLE_HTML_TAGS, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_HTML_TAGS = {
+        {BUG_ID + "-3" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing another HTML tag. Another tag. A " +
+            "tag with attributes. <script and </p are not tags.)\";"
+        }
+    };
+    private static final String[][] NEG_TEST_HTML_TAGS = {
+        {BUG_ID + "-3" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing another <p>HTML</p> tag. Another " +
+            "<h1>tag</h1>. A <span id=\"testTag\">tag with attributes</span>. <script and " +
+            "</p are not tags.)\";"
+        }
+    };
+
+    //Window title using entities.
+    private static final String TITLE_HTML_ENTITIES =
+            "Testing entities &lt;script&gt;alert(\"Should not pop up\")&lt;/script&gt;.";
+    private static final String[] ARGS_HTML_ENTITIES = new String[]{
+        "-d", BUG_ID + "-4", "-windowtitle", TITLE_HTML_ENTITIES, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_HTML_ENTITIES = {
+        {BUG_ID + "-4" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing entities &lt;script&gt;alert(\\\"Should " +
+            "not pop up\\\")&lt;/script&gt;.)\";"
+        }
     };
-    private static final String[] ARGS = new String[]{
-        "-d", BUG_ID, "-windowtitle", WIN_TITLE, "-sourcepath", SRC_DIR, "p1", "p2"
+    private static final String[][] NEG_TEST_HTML_ENTITIES = {
+        {BUG_ID + "-4" + FS  + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing entities alert(\\\"Should not pop up\\\").)\";"
+        }
+    };
+
+    //Window title with just empty HTML tags.
+    private static final String TITLE_EMPTY_TAGS =
+            "</title><script></script>";
+    private static final String[] ARGS_EMPTY_TAGS = new String[]{
+        "-d", BUG_ID + "-5", "-windowtitle", TITLE_EMPTY_TAGS, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_EMPTY_TAGS = {
+        {BUG_ID + "-5" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview\";"
+        }
+    };
+    private static final String[][] NEG_TEST_EMPTY_TAGS = {
+        {BUG_ID + "-5" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (</title><script></script>)\";"
+        }
+    };
+
+    //Window title with unicode characters.
+    private static final String TITLE_UNICODE_CHARS =
+            "Testing unicode \u003cscript\u003ealert(\"Should not pop up\")\u003c/script\u003e.";
+    private static final String[] ARGS_UNICODE_CHARS = new String[]{
+        "-d", BUG_ID + "-6", "-windowtitle", TITLE_UNICODE_CHARS, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_UNICODE_CHARS = {
+        {BUG_ID + "-6" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing unicode alert(\\\"Should " +
+            "not pop up\\\").)\";"
+        }
+    };
+    private static final String[][] NEG_TEST_UNICODE_CHARS = {
+        {BUG_ID + "-6" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing unicode <script>alert(\\\"Should not pop up\\\")" +
+            "</script>.)\";"
+        }
+    };
+
+    //An empty window title.
+    private static final String TITLE_EMPTY =
+            "";
+    private static final String[] ARGS_EMPTY_TITLE = new String[]{
+        "-d", BUG_ID + "-7", "-windowtitle", TITLE_EMPTY, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] TEST_EMPTY = {
+        {BUG_ID + "-7" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview\";"
+        }
+    };
+
+    //Test doctitle.
+    private static final String[] ARGS_DOCTITLE = new String[]{
+        "-d", BUG_ID + "-8", "-doctitle", TITLE_JS_CHARS, "-sourcepath", SRC_DIR, "p1", "p2"
+    };
+    private static final String[][] NEG_TEST_DOCTITLE = {
+        {BUG_ID + "-8" + FS + "overview-summary.html",
+            "parent.document.title=\"Overview (Testing \\\"Window \\\'Title\\\'\\\" " +
+            "with a \\\\ backslash and a / forward slash and a \\u00E8 unicode char " +
+            "also a    tab and also a \\t special character another \\u0002 unicode)\";"
+        },
     };
 
     /**
@@ -62,7 +189,14 @@
      */
     public static void main(String[] args) {
         TestWindowTitle tester = new TestWindowTitle();
-        run(tester, ARGS, TEST, NEG_TEST);
+        run(tester, ARGS_JS_CHARS, TEST_JS_CHARS, NEG_TEST_JS_CHARS);
+        run(tester, ARGS_SCRIPT_TAG, TEST_SCRIPT_TAG, NEG_TEST_SCRIPT_TAG);
+        run(tester, ARGS_HTML_TAGS, TEST_HTML_TAGS, NEG_TEST_HTML_TAGS);
+        run(tester, ARGS_HTML_ENTITIES, TEST_HTML_ENTITIES, NEG_TEST_HTML_ENTITIES);
+        run(tester, ARGS_EMPTY_TAGS, TEST_EMPTY_TAGS, NEG_TEST_EMPTY_TAGS);
+        run(tester, ARGS_UNICODE_CHARS, TEST_UNICODE_CHARS, NEG_TEST_UNICODE_CHARS);
+        run(tester, ARGS_EMPTY_TITLE, TEST_EMPTY, NO_TEST);
+        run(tester, ARGS_DOCTITLE, NO_TEST, NEG_TEST_DOCTITLE);
         tester.printSummary();
     }