Mercurial > hg > icedtea7-forest-aarch64 > langtools
changeset 1974:c43057987a3c
Merge
author | asaha |
---|---|
date | Wed, 10 Sep 2014 15:45:34 -0700 |
parents | 2fd54dd66427 (diff) 0ff8d8709ec7 (current diff) |
children | bcbd241df6cd |
files | .hgtags |
diffstat | 12 files changed, 227 insertions(+), 7 deletions(-) [+] |
line wrap: on
line diff
--- a/.hgtags Mon Sep 08 12:39:15 2014 -0700 +++ b/.hgtags Wed Sep 10 15:45:34 2014 -0700 @@ -515,3 +515,6 @@ 65c68241236ab792fe72119a0b4c29effd048904 jdk7u72-b11 cc58d9704b4017efe9ebe4391d73d82c0caf6d1c jdk7u72-b12 cade57461d3b90a59ec62c06d77068b1b73f05b2 jdk7u72-b13 +772aad4e9681828b8ee193b9ed971cbfe6c7f347 jdk7u80-b00 +6c307a0b7a94e002d8a2532ffd8146d6c53f42d3 jdk7u80-b01 +5bd6f3adf690dc2de8881b6f9f48336db4af7865 jdk7u80-b02
--- a/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Mon Sep 08 12:39:15 2014 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/HtmlDocletWriter.java Wed Sep 10 15:45:34 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 Mon Sep 08 12:39:15 2014 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlAttr.java Wed Sep 10 15:45:34 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 Mon Sep 08 12:39:15 2014 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlDocWriter.java Wed Sep 10 15:45:34 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 Mon Sep 08 12:39:15 2014 -0700 +++ b/src/share/classes/com/sun/tools/doclets/formats/html/markup/HtmlTree.java Wed Sep 10 15:45:34 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 Mon Sep 08 12:39:15 2014 -0700 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java Wed Sep 10 15:45:34 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 10 15:45:34 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 10 15:45:34 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 Mon Sep 08 12:39:15 2014 -0700 +++ b/test/tools/javac/ClassPathTest/ClassPathTest.sh Wed Sep 10 15:45:34 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 10 15:45:34 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 10 15:45:34 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 Mon Sep 08 12:39:15 2014 -0700 +++ b/test/tools/javac/innerClassFile/Driver.sh Wed Sep 10 15:45:34 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