changeset 1687:702454ac1a07 icedtea-2.6pre01

Merge
author andrew
date Thu, 03 Apr 2014 00:38:53 +0100
parents ba5a409bb60c (current diff) 5c9759e0d341 (diff)
children 7164633f0ea7
files .hgtags
diffstat 17 files changed, 300 insertions(+), 56 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Feb 20 15:02:18 2014 +0000
+++ b/.hgtags	Thu Apr 03 00:38:53 2014 +0100
@@ -418,3 +418,6 @@
 954e1616449af74f68aed57261cbeb62403377f1 jdk7u60-b02
 0d89cc5766d72e870eaf16696ec9b7b1ca4901fd icedtea-2.5pre01
 f75a642c2913e1ecbd22fc46812cffa2e7739169 icedtea-2.5pre02
+4170784840d510b4e8ae7ae250b92279aaf5eb25 jdk7u60-b03
+772aad4e9681828b8ee193b9ed971cbfe6c7f347 jdk7u60-b04
+
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Thu Apr 03 00:38:53 2014 +0100
@@ -426,7 +426,7 @@
             head.addContent(headComment);
         }
         if (configuration.charset.length() > 0) {
-            Content meta = HtmlTree.META("Content-Type", "text/html",
+            Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
                     configuration.charset);
             head.addContent(meta);
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java	Thu Apr 03 00:38:53 2014 +0100
@@ -35,7 +35,6 @@
     BORDER,
     CELLPADDING,
     CELLSPACING,
-    CHARSET,
     CLASS,
     CLEAR,
     COLS,
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Thu Apr 03 00:38:53 2014 +0100
@@ -44,6 +44,8 @@
  */
 public abstract class HtmlDocWriter extends HtmlWriter {
 
+    public static final String CONTENT_TYPE = "text/html";
+
     /**
      * Constructor. Initializes the destination file name through the super
      * class HtmlWriter.
@@ -181,12 +183,14 @@
                                String label, boolean strong,
                                String stylename, String title, String target) {
         StringBuffer retlink = new StringBuffer();
+        StringBuilder lnk = new StringBuilder();
         retlink.append("<a href=\"");
-        retlink.append(link);
+        lnk.append(link);
         if (where != null && where.length() != 0) {
-            retlink.append("#");
-            retlink.append(where);
+            lnk.append("#");
+            lnk.append(where);
         }
+        retlink.append(HtmlTree.encodeURL(lnk.toString()));
         retlink.append("\"");
         if (title != null && title.length() != 0) {
             retlink.append(" title=\"" + title + "\"");
@@ -328,7 +332,7 @@
             head.addContent(headComment);
         }
         if (configuration.charset.length() > 0) {
-            Content meta = HtmlTree.META("Content-Type", "text/html",
+            Content meta = HtmlTree.META("Content-Type", CONTENT_TYPE,
                     configuration.charset);
             head.addContent(meta);
         }
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -26,6 +26,7 @@
 package com.sun.tools.doclets.formats.html.markup;
 
 import java.util.*;
+import java.nio.charset.*;
 import com.sun.tools.doclets.internal.toolkit.Content;
 import com.sun.tools.doclets.internal.toolkit.util.*;
 
@@ -116,6 +117,46 @@
     }
 
     /**
+     * A set of ASCII URI characters to be left unencoded.
+     */
+    public static final BitSet NONENCODING_CHARS = new BitSet(256);
+
+    static {
+        // alphabetic characters
+        for (int i = 'a'; i <= 'z'; i++) {
+            NONENCODING_CHARS.set(i);
+        }
+        for (int i = 'A'; i <= 'Z'; i++) {
+            NONENCODING_CHARS.set(i);
+        }
+        // numeric characters
+        for (int i = '0'; i <= '9'; i++) {
+            NONENCODING_CHARS.set(i);
+        }
+        // Reserved characters as per RFC 3986. These are set of delimiting characters.
+        String noEnc = ":/?#[]@!$&'()*+,;=";
+        // Unreserved characters as per RFC 3986 which should not be percent encoded.
+        noEnc += "-._~";
+        for (int i = 0; i < noEnc.length(); i++) {
+            NONENCODING_CHARS.set(noEnc.charAt(i));
+        }
+    }
+
+    protected static String encodeURL(String url) {
+        byte[] urlBytes = url.getBytes(Charset.forName("UTF-8"));
+        StringBuilder sb = new StringBuilder();
+        for (int i = 0; i < urlBytes.length; i++) {
+            int c = urlBytes[i];
+            if (NONENCODING_CHARS.get(c & 0xFF)) {
+                sb.append((char) c);
+            } else {
+                sb.append(String.format("%%%02X", c & 0xFF));
+            }
+        }
+        return sb.toString();
+    }
+
+    /**
      * Generates an HTML anchor tag.
      *
      * @param ref reference url for the anchor tag
@@ -124,7 +165,7 @@
      */
     public static HtmlTree A(String ref, Content body) {
         HtmlTree htmltree = new HtmlTree(HtmlTag.A, nullCheck(body));
-        htmltree.addAttr(HtmlAttr.HREF, nullCheck(ref));
+        htmltree.addAttr(HtmlAttr.HREF, encodeURL(ref));
         return htmltree;
     }
 
@@ -430,9 +471,9 @@
      */
     public static HtmlTree META(String httpEquiv, String content, String charSet) {
         HtmlTree htmltree = new HtmlTree(HtmlTag.META);
+        String contentCharset = content + "; charset=" + charSet;
         htmltree.addAttr(HtmlAttr.HTTP_EQUIV, nullCheck(httpEquiv));
-        htmltree.addAttr(HtmlAttr.CONTENT, nullCheck(content));
-        htmltree.addAttr(HtmlAttr.CHARSET, nullCheck(charSet));
+        htmltree.addAttr(HtmlAttr.CONTENT, contentCharset);
         return htmltree;
     }
 
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlWriter.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1997, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1997, 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
@@ -362,6 +362,12 @@
                 "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + DocletConstants.NL +
                 "        targetPage = \"undefined\";" + DocletConstants.NL +
                 "    function validURL(url) {" + DocletConstants.NL +
+                "        try {" + DocletConstants.NL +
+                "            url = decodeURIComponent(url);" + DocletConstants.NL +
+                "        }" + DocletConstants.NL +
+                "        catch (error) {" + DocletConstants.NL +
+                "            return false;" + DocletConstants.NL +
+                "        }" + DocletConstants.NL +
                 "        var pos = url.indexOf(\".html\");" + DocletConstants.NL +
                 "        if (pos == -1 || pos != url.length - 5)" + DocletConstants.NL +
                 "            return false;" + DocletConstants.NL +
@@ -373,7 +379,8 @@
                 "            if ('a' <= ch && ch <= 'z' ||" + DocletConstants.NL +
                 "                    'A' <= ch && ch <= 'Z' ||" + DocletConstants.NL +
                 "                    ch == '$' ||" + DocletConstants.NL +
-                "                    ch == '_') {" + DocletConstants.NL +
+                "                    ch == '_' ||" + DocletConstants.NL +
+                "                    ch.charCodeAt(0) > 127) {" + DocletConstants.NL +
                 "                allowNumber = true;" + DocletConstants.NL +
                 "                allowSep = true;" + DocletConstants.NL +
                 "            } else if ('0' <= ch && ch <= '9'" + DocletConstants.NL +
--- a/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Type.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 1999, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 1999, 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
@@ -597,6 +597,10 @@
                 };
         }
 
+        public List<Type> getComponents() {
+            return interfaces_field.prepend(supertype_field);
+        }
+
         /** The Java source which this type represents.
          */
         public String toString() {
--- a/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/src/share/classes/com/sun/tools/javac/code/Types.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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
@@ -1012,23 +1012,10 @@
                     }
                 }
 
-                if (t.isCompound()) {
-                    Warner oldWarner = warnStack.head;
-                    warnStack.head = Warner.noWarnings;
-                    if (!visit(supertype(t), s))
-                        return false;
-                    for (Type intf : interfaces(t)) {
-                        if (!visit(intf, s))
-                            return false;
-                    }
-                    if (warnStack.head.hasLint(LintCategory.UNCHECKED))
-                        oldWarner.warn(LintCategory.UNCHECKED);
-                    return true;
-                }
-
-                if (s.isCompound()) {
-                    // call recursively to reuse the above code
-                    return visitClassType((ClassType)s, t);
+                if (t.isCompound() || s.isCompound()) {
+                    return !t.isCompound() ?
+                            visitIntersectionType((ClassType)s, t, true) :
+                            visitIntersectionType(t, s, false);
                 }
 
                 if (s.tag == CLASS || s.tag == ARRAY) {
@@ -1106,6 +1093,18 @@
                 return false;
             }
 
+            boolean visitIntersectionType(ClassType ict, Type s, boolean reverse) {
+                Warner warn = Warner.noWarnings;
+                for (Type c : ict.getComponents()) {
+                    warn.clear();
+                    if (reverse ? !isCastable(s, c, warn) : !isCastable(c, s, warn))
+                        return false;
+                }
+                if (warn.hasLint(LintCategory.UNCHECKED))
+                    warnStack.head.warn(LintCategory.UNCHECKED);
+                return true;
+            }
+
             @Override
             public Boolean visitArrayType(ArrayType t, Type s) {
                 switch (s.tag) {
@@ -3369,11 +3368,18 @@
     }
 
     private boolean giveWarning(Type from, Type to) {
-        Type subFrom = asSub(from, to.tsym);
-        return to.isParameterized() &&
-                (!(isUnbounded(to) ||
-                isSubtype(from, to) ||
-                ((subFrom != null) && containsType(to.allparams(), subFrom.allparams()))));
+        List<Type> bounds = to.isCompound() ?
+                ((ClassType)to).getComponents() : List.of(to);
+        for (Type b : bounds) {
+            Type subFrom = asSub(from, b.tsym);
+            if (b.isParameterized() &&
+                    (!(isUnbounded(b) ||
+                    isSubtype(from, b) ||
+                    ((subFrom != null) && containsType(b.allparams(), subFrom.allparams()))))) {
+                return true;
+            }
+        }
+        return false;
     }
 
     private List<Type> superClosure(Type t, Type s) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testCharset/TestCharset.java	Thu Apr 03 00:38:53 2014 +0100
@@ -0,0 +1,82 @@
+/*
+ * Copyright (c) 2013, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug      7052170
+ * @summary  Run a test on -charset to make sure the charset gets generated as a
+ *           part of the meta tag.
+ * @author   Bhavesh Patel
+ * @library  ../lib/
+ * @build    JavadocTester TestCharset
+ * @run main TestCharset
+ */
+
+public class TestCharset extends JavadocTester {
+
+    //Test information.
+    private static final String BUG_ID = "7052170";
+
+    //Javadoc arguments.
+    private static final String[] ARGS = new String[] {
+        "-d", BUG_ID, "-charset", "UTF-8", "-sourcepath", SRC_DIR, "pkg"
+    };
+
+    private static final String[][] TEST = {
+        {BUG_ID + FS + "index.html",
+            "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"},
+        {BUG_ID + FS + "pkg" + FS + "Foo.html",
+            "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=UTF-8\">"}
+    };
+
+    private static final String[][] NEGATED_TEST = {
+        {BUG_ID + FS + "index.html",
+            "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">"},
+        {BUG_ID + FS + "pkg" + FS + "Foo.html",
+            "<meta http-equiv=\"Content-Type\" content=\"text/html\" charset=\"UTF-8\">"}
+    };
+
+    /**
+     * The entry point of the test.
+     * @param args the array of command line arguments.
+     */
+    public static void main(String[] args) {
+        TestCharset tester = new TestCharset();
+        run(tester, ARGS, TEST, NEGATED_TEST);
+        tester.printSummary();
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugId() {
+        return BUG_ID;
+    }
+
+    /**
+     * {@inheritDoc}
+     */
+    public String getBugName() {
+        return getClass().getName();
+    }
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testCharset/pkg/Foo.java	Thu Apr 03 00:38:53 2014 +0100
@@ -0,0 +1,26 @@
+/*
+ * Copyright (c) 2013, 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+package pkg;
+
+public class Foo {}
--- a/test/com/sun/javadoc/testHref/TestHref.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/test/com/sun/javadoc/testHref/TestHref.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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      4663254
+ * @bug      4663254 8016328
  * @summary  Verify that spaces do not appear in hrefs and anchors.
  * @author   jamieh
  * @library  ../lib/
@@ -46,11 +46,11 @@
     private static final String[][] TEST = {
         //External link.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long, int)\""
+            "href=\"http://java.sun.com/j2se/1.4/docs/api/java/lang/Object.html?is-external=true#wait(long,%20int)\""
         },
         //Member summary table link.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
-            "href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\""
+            "href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\""
         },
         //Anchor test.
         {BUG_ID + FS + "pkg" + FS + "C1.html",
@@ -66,11 +66,11 @@
         },
         //{@link} test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "Link: <a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
+            "Link: <a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
         },
         //@see test.
         {BUG_ID + FS + "pkg" + FS + "C2.html",
-            "See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int, int, java.util.ArrayList)\">"
+            "See Also:</span></dt><dd><a href=\"../pkg/C1.html#method(int,%20int,%20java.util.ArrayList)\">"
         },
 
         //Header does not link to the page itself.
--- a/test/com/sun/javadoc/testJavascript/TestJavascript.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/test/com/sun/javadoc/testJavascript/TestJavascript.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2013, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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      4665566 4855876 7025314 8012375 8015998
+ * @bug      4665566 4855876 7025314 8012375 8015998 8016328
  * @summary  Verify that the output has the right javascript.
  * @author   jamieh
  * @library  ../lib/
@@ -56,6 +56,12 @@
             "    if (targetPage.indexOf(\":\") != -1 || (targetPage != \"\" && !validURL(targetPage)))" + NL +
             "        targetPage = \"undefined\";" + NL +
             "    function validURL(url) {" + NL +
+            "        try {" + NL +
+            "            url = decodeURIComponent(url);" + NL +
+            "        }" + NL +
+            "        catch (error) {" + NL +
+            "            return false;" + NL +
+            "        }" + NL +
             "        var pos = url.indexOf(\".html\");" + NL +
             "        if (pos == -1 || pos != url.length - 5)" + NL +
             "            return false;" + NL +
@@ -67,7 +73,8 @@
             "            if ('a' <= ch && ch <= 'z' ||" + NL +
             "                    'A' <= ch && ch <= 'Z' ||" + NL +
             "                    ch == '$' ||" + NL +
-            "                    ch == '_') {" + NL +
+            "                    ch == '_' ||" + NL +
+            "                    ch.charCodeAt(0) > 127) {" + NL +
             "                allowNumber = true;" + NL +
             "                allowSep = true;" + NL +
             "            } else if ('0' <= ch && ch <= '9'" + NL +
--- a/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/test/com/sun/javadoc/testLinkTaglet/TestLinkTaglet.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2004, 2011, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2004, 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      4732864 6280605 7064544
+ * @bug      4732864 6280605 7064544 8016328
  * @summary  Make sure that you can link from one member to another using
  *           non-qualified name, furthermore, ensure the right one is linked.
  * @author   jamieh
@@ -49,9 +49,9 @@
             "Qualified Link: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" +
             " Unqualified Link1: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" +
             " Unqualified Link2: <a href=\"../pkg/C.InnerC.html\" title=\"class in pkg\"><code>C.InnerC</code></a>.<br/>\n" +
-            " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n" +
-            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n" +
-            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC, pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
+            " Qualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(pkg.C.InnerC, pkg.C.InnerC2)</code></a>.<br/>\n" +
+            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(C.InnerC, C.InnerC2)</code></a>.<br/>\n" +
+            " Unqualified Link: <a href=\"../pkg/C.html#method(pkg.C.InnerC,%20pkg.C.InnerC2)\"><code>method(InnerC, InnerC2)</code></a>.<br/>"
         },
         {BUG_ID + FS + "pkg" + FS + "C.InnerC.html",
             "Link to member in outer class: <a href=\"../pkg/C.html#MEMBER\"><code>C.MEMBER</code></a> <br/>\n" +
--- a/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/test/com/sun/javadoc/testPrivateClasses/TestPrivateClasses.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2003, 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2003, 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      4780441 4874845 4978816
+ * @bug      4780441 4874845 4978816 8016328
  * @summary  Make sure that when the -private flag is not used, members
  *           inherited from package private class are documented in the child.
  *
@@ -175,7 +175,7 @@
         // Should document that a method overrides method from private class.
        {BUG_ID + "-2" + FS + "pkg" + FS + "PublicChild.html",
             "<dt><strong>Overrides:</strong></dt>" + NL +
-            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[], int, T, V, java.util.List)\">" +
+            "<dd><code><a href=\"../pkg/PrivateParent.html#methodOverridenFromParent(char[],%20int,%20T,%20V,%20java.util.List)\">" +
             "methodOverridenFromParent</a></code>&nbsp;in class&nbsp;<code>" +
             "<a href=\"../pkg/PrivateParent.html\" title=\"class in pkg\">" +
             "PrivateParent</a></code></dd>"},
--- a/test/tools/javac/6567415/T6567415.java	Thu Feb 20 15:02:18 2014 +0000
+++ b/test/tools/javac/6567415/T6567415.java	Thu Apr 03 00:38:53 2014 +0100
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
+ * Copyright (c) 2010, 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
@@ -137,7 +137,7 @@
             }
         };
         t.start();
-        t.join(1000*10);
+        t.join(1000*60);
         System.out.println(t.getState());
         if (t.isAlive()) {
             throw new RuntimeException("Error: compilation is looping");
--- a/test/tools/javac/ClassPathTest/ClassPathTest.sh	Thu Feb 20 15:02:18 2014 +0000
+++ b/test/tools/javac/ClassPathTest/ClassPathTest.sh	Thu Apr 03 00:38:53 2014 +0100
@@ -56,11 +56,17 @@
 # set platform-dependent variables
 OS=`uname -s`
 case "$OS" in
-  SunOS | Linux | Darwin | CYGWIN* )
+  SunOS | Linux | Darwin )
     FS="/"
+    CHMOD="${FS}bin${FS}chmod"
     ;;
   Windows* )
     FS="\\"
+    CHMOD="chmod"
+    ;;
+  CYGWIN* )
+    FS="/"
+    CHMOD="chmod"
     ;;
   * )
     echo "Unrecognized system!"
@@ -73,6 +79,7 @@
 cleanup() {
 	rm -f *.class pkg${FS}*.class foo${FS}pkg${FS}*.class bar${FS}pkg${FS}*.class
 	cp -rf $TESTSRC${FS}* .
+        ${CHMOD} -R u+w *
 }
 
 fail() {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/T8033294/RedundantWarningInIntersectionTest.java	Thu Apr 03 00:38:53 2014 +0100
@@ -0,0 +1,58 @@
+/*
+ * Copyright (c) 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
+ * under the terms of the GNU General Public License version 2 only, as
+ * published by the Free Software Foundation.
+ *
+ * This code is distributed in the hope that it will be useful, but WITHOUT
+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
+ * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
+ * version 2 for more details (a copy is included in the LICENSE file that
+ * accompanied this code).
+ *
+ * You should have received a copy of the GNU General Public License version
+ * 2 along with this work; if not, write to the Free Software Foundation,
+ * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
+ *
+ * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
+ * or visit www.oracle.com if you need additional information or have any
+ * questions.
+ */
+
+/*
+ * @test
+ * @bug 8033294
+ * @summary javac, spurious warning for instanceof operator
+ * @compile -Werror -Xlint:unchecked RedundantWarningInIntersectionTest.java
+ */
+
+import java.math.BigDecimal;
+
+public class RedundantWarningInIntersectionTest {
+
+    class A<S extends A<S, T>, T> {
+
+        protected T p;
+
+        A(T p) {}
+
+        public S m(T parameter) {
+            @SuppressWarnings("unchecked")
+            S self = (S) new A<>(parameter);
+            return self;
+        }
+    }
+
+    class B<K extends Number & Comparable<? super K>> extends A<B<K>, K> {
+
+        B(K parameter) {
+            super(parameter);
+        }
+
+        public boolean m2() {
+            return (p instanceof BigDecimal);
+        }
+    }
+}