changeset 2061:45a01d93e745

Merge
author asaha
date Tue, 14 Oct 2014 12:18:47 -0700
parents dd3c897ed9e4 (current diff) e1ba5223fd3a (diff)
children 9f12b98444b0
files .hgtags
diffstat 12 files changed, 234 insertions(+), 8 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Tue Oct 14 10:33:40 2014 -0700
+++ b/.hgtags	Tue Oct 14 12:18:47 2014 -0700
@@ -472,6 +472,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
 eae289997f58ef6396dc323c3d5b93a56fb43573 jdk7u65-b40
@@ -527,5 +530,11 @@
 7ecfdbf693cfc14d648ebdf2cc87716068569e8d jdk7u75-b01
 688a304d3215af8104336ecce50b7f4edfb88d36 jdk7u75-b02
 105ad2d2417515b2b595c151e2a5d8ae0fe729eb jdk7u75-b03
+bdbe862f8846558c83f8bc15518446ab0495a173 jdk7u75-b04
+e77dbc24fcdb5c55f414459798e4c65ed75bf570 jdk7u76-b00
+17aaafb2d1ecb6e2dac5e05cb3198703737e623a jdk7u76-b01
+da47e39ce6680458be011936b89f0946b9587042 jdk7u76-b02
+19a2140056ce1bfa3b6b332d168ad1208bfed1ae jdk7u76-b03
+76969bec514e11903a321f556f38c3be4c2320cf jdk7u76-b04
 bdbe862f8846558c83f8bc15518446ab0495a173 jdk7u79-b00
-ecfce93b2c969a53c6dab618d16cde4649e4ee97 jdk7u75-b04
+
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue Oct 14 10:33:40 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java	Tue Oct 14 12:18:47 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	Tue Oct 14 10:33:40 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java	Tue Oct 14 12:18:47 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	Tue Oct 14 10:33:40 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java	Tue Oct 14 12:18:47 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	Tue Oct 14 10:33:40 2014 -0700
+++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java	Tue Oct 14 12:18:47 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	Tue Oct 14 10:33:40 2014 -0700
+++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java	Tue Oct 14 12:18:47 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	Tue Oct 14 12:18:47 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	Tue Oct 14 12:18:47 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	Tue Oct 14 10:33:40 2014 -0700
+++ b/test/tools/javac/ClassPathTest/ClassPathTest.sh	Tue Oct 14 12:18:47 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	Tue Oct 14 12:18:47 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	Tue Oct 14 12:18:47 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	Tue Oct 14 10:33:40 2014 -0700
+++ b/test/tools/javac/innerClassFile/Driver.sh	Tue Oct 14 12:18:47 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