changeset 1329:45a1817f956b

Merge jdk8-b50
author andrew
date Fri, 03 Aug 2012 20:23:20 +0100
parents 7450073e2e6f (current diff) c4cd4cab2220 (diff)
children 2aaad794fdd1
files .hgtags
diffstat 4 files changed, 54 insertions(+), 2 deletions(-) [+]
line wrap: on
line diff
--- a/.hgtags	Thu Aug 02 17:00:14 2012 +0100
+++ b/.hgtags	Fri Aug 03 20:23:20 2012 +0100
@@ -169,3 +169,9 @@
 02c5a3575539e737a1855b31287654e843edd6da jdk8-b42
 f8c64d835b2806293b8e924b44f0e32b20657ed3 jdk8-b43
 59cbead12ff46dbb397120bd26635bcd7d41ff21 jdk8-b44
+e111e4587ccada8eb93f72e834e378c76256f4b7 jdk8-b45
+4ca5994971724731233735f055f33d4936fd11d3 jdk8-b46
+7e6be2f239c9a4ac6dec280bd18ec296dd78e464 jdk8-b47
+afb0a523155727d42b1c773f783ff3a7cfab8e86 jdk8-b48
+c72c164ced676d3c360d99b1c52cc80940fc3122 jdk8-b49
+b2d8a270f5f2144e14a1fe97fbda9e4391a5332e jdk8-b50
--- a/make/tools/genstubs/GenStubs.java	Thu Aug 02 17:00:14 2012 +0100
+++ b/make/tools/genstubs/GenStubs.java	Fri Aug 03 20:23:20 2012 +0100
@@ -201,7 +201,7 @@
          */
         public void visitTopLevel(JCCompilationUnit tree) {
             super.visitTopLevel(tree);
-            tree.docComments = Collections.emptyMap();
+            tree.docComments = null;
         }
 
         /**
--- a/src/share/classes/com/sun/tools/javac/comp/Flow.java	Thu Aug 02 17:00:14 2012 +0100
+++ b/src/share/classes/com/sun/tools/javac/comp/Flow.java	Fri Aug 03 20:23:20 2012 +0100
@@ -746,6 +746,7 @@
                 pendingExits = prevPendingExits;
                 alive = true;
                 scanStat(tree.finalizer);
+                tree.finallyCanCompleteNormally = alive;
                 if (!alive) {
                     // discard exits and exceptions from try and finally
                     thrown = chk.union(thrown, thrownPrev);
@@ -764,7 +765,6 @@
                     }
                     alive = aliveEnd;
                 }
-                tree.finallyCanCompleteNormally = alive;
             } else {
                 thrown = chk.union(thrown, chk.diff(thrownInTry, caughtInTry));
                 alive = aliveEnd;
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/test/tools/javac/DefiniteAssignment/T7181578.java	Fri Aug 03 20:23:20 2012 +0100
@@ -0,0 +1,46 @@
+/*
+ * Copyright (c) 2012, 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 7181578
+ * @summary javac reports uninitialized variable with nested try...finally blocks
+  *
+ * @compile T7181578.java
+ */
+class T7181578 {
+    String test(boolean cond) {
+        final String s;
+        try {
+            if (cond) {
+                try {
+                    s = "";
+                    return s;
+                } finally { }
+            } else {
+                s = "";
+            }
+            return s; // bug occurs here: mapping is always initialized
+        } finally { }
+    }
+}