changeset 2007:17aaafb2d1ec jdk7u76-b01

Merge
author asaha
date Wed, 03 Sep 2014 22:57:48 -0700
parents 068ca4e694a6 e2f8c29685a8
children da47e39ce668
files .hgtags
diffstat 12 files changed, 227 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Wed Sep 03 22:40:50 2014 -0700
+++ b/.hgtags	Wed Sep 03 22:57:48 2014 -0700
@@ -465,6 +465,9 @@
 0f809f893588548a3b5c8441e28c9e0a62bc13ef jdk7u65-b18
 eae289997f58ef6396dc323c3d5b93a56fb43573 jdk7u65-b19
 afc940d62b49059f565f87c83343fa3d28df883b jdk7u65-b32
+772aad4e9681828b8ee193b9ed971cbfe6c7f347 jdk7u80-b00
+6c307a0b7a94e002d8a2532ffd8146d6c53f42d3 jdk7u80-b01
+5bd6f3adf690dc2de8881b6f9f48336db4af7865 jdk7u80-b02
 114c4fc53777e4067a26f6510fe72fa770a9253c jdk7u65-b20
 8a09cca8f12027ba59df4bb18d49e855c4db4811 jdk7u67-b01
 e77dbc24fcdb5c55f414459798e4c65ed75bf570 jdk7u76-b00
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Wed Sep 03 22:40:50 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Wed Sep 03 22:57:48 2014 -0700
@@ -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	Wed Sep 03 22:40:50 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java	Wed Sep 03 22:57:48 2014 -0700
@@ -35,7 +35,6 @@
     BORDER,
     CELLPADDING,
     CELLSPACING,
-    CHARSET,
     CLASS,
     CLEAR,
     COLS,
--- a/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Wed Sep 03 22:40:50 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Wed Sep 03 22:57:48 2014 -0700
@@ -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.
@@ -330,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	Wed Sep 03 22:40:50 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Wed Sep 03 22:57:48 2014 -0700
@@ -471,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/javac/jvm/Gen.java	Wed Sep 03 22:40:50 2014 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Wed Sep 03 22:57:48 2014 -0700
@@ -1067,7 +1067,7 @@
                              boolean testFirst) {
             Env<GenContext> loopEnv = env.dup(loop, new GenContext());
             int startpc = code.entryPoint();
-            if (testFirst) {
+            if (testFirst) { //while or for loop
                 CondItem c;
                 if (cond != null) {
                     code.statBegin(cond.pos);
@@ -1097,6 +1097,9 @@
                 code.resolve(c.falseJumps);
             }
             code.resolve(loopEnv.info.exit);
+            if (loopEnv.info.exit != null) {
+                loopEnv.info.exit.state.defined.excludeFrom(code.nextreg);
+            }
         }
 
     public void visitForeachLoop(JCEnhancedForLoop tree) {
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/com/sun/javadoc/testCharset/TestCharset.java	Wed Sep 03 22:57:48 2014 -0700
@@ -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	Wed Sep 03 22:57:48 2014 -0700
@@ -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/tools/javac/ClassPathTest/ClassPathTest.sh	Wed Sep 03 22:40:50 2014 -0700
+++ b/test/tools/javac/ClassPathTest/ClassPathTest.sh	Wed Sep 03 22:57:48 2014 -0700
@@ -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/T8050386/WrongStackframeGenerationTest1.java	Wed Sep 03 22:57:48 2014 -0700
@@ -0,0 +1,47 @@
+/*
+ * 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 8050386
+ * @summary Verification error due to a bad stackmap frame generated by javac
+ */
+
+public class WrongStackframeGenerationTest1 {
+    public static void main(String[] args) {}
+
+    static void foo(){
+        while (true) {
+            int i = 0;
+            break;
+        }
+        switch (1) {
+            case 1:
+                int j = 0;
+            case 2:
+                bar();
+        }
+    }
+
+    static void bar() {}
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/T8050386/WrongStackframeGenerationTest2.java	Wed Sep 03 22:57:48 2014 -0700
@@ -0,0 +1,50 @@
+/*
+ * 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 8050386
+ * @summary Verification error due to a bad stackmap frame generated by javac
+ */
+
+public class WrongStackframeGenerationTest2 {
+    public static void main(String[] args) {}
+
+    static void foo() {
+        int len;
+        for (;;) {
+            try {
+                len = 1;
+                break;
+            } catch (Exception e) {
+            }
+        }
+
+        try {
+           if (len == -1) {
+               len = 0;
+           }
+        } finally {
+        }
+    }
+}
--- a/test/tools/javac/innerClassFile/Driver.sh	Wed Sep 03 22:40:50 2014 -0700
+++ b/test/tools/javac/innerClassFile/Driver.sh	Wed Sep 03 22:57:48 2014 -0700
@@ -71,3 +71,4 @@
 "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . -classpath . -sourcepath src src/x/B.java src/x/C.java src/y/Main.java
 rm y/R3.class
 "${TESTJAVA}${FS}bin${FS}javac" ${TESTTOOLVMOPTS} -d . -classpath . -sourcepath src src/y/Main.java
+rm -fr src