langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
changeset 17998 02a5abb2ae2f
parent 17282 c6964ad7df63
child 18010 604faee85350
--- a/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java	Wed May 29 15:34:56 2013 -0700
+++ b/langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java	Fri May 31 10:04:59 2013 +0100
@@ -808,9 +808,10 @@
          */
         void markThrown(JCTree tree, Type exc) {
             if (!chk.isUnchecked(tree.pos(), exc)) {
-                if (!chk.isHandled(exc, caught))
+                if (!chk.isHandled(exc, caught)) {
                     pendingExits.append(new FlowPendingExit(tree, exc));
-                    thrown = chk.incl(exc, thrown);
+                }
+                thrown = chk.incl(exc, thrown);
             }
         }
 
@@ -1066,8 +1067,9 @@
                                 names.close,
                                 List.<Type>nil(),
                                 List.<Type>nil());
+                        Type mt = types.memberType(resource.type, closeMethod);
                         if (closeMethod.kind == MTH) {
-                            for (Type t : ((MethodSymbol)closeMethod).getThrownTypes()) {
+                            for (Type t : mt.getThrownTypes()) {
                                 markThrown(resource, t);
                             }
                         }