langtools/src/share/classes/com/sun/tools/javac/comp/Flow.java
changeset 13273 d597bc5e3935
parent 12333 7b02d0529a97
child 13439 3025d6ac1401
equal deleted inserted replaced
13129:600c9a1feb01 13273:d597bc5e3935
   744                 thrown = List.nil();
   744                 thrown = List.nil();
   745                 ListBuffer<FlowPendingExit> exits = pendingExits;
   745                 ListBuffer<FlowPendingExit> exits = pendingExits;
   746                 pendingExits = prevPendingExits;
   746                 pendingExits = prevPendingExits;
   747                 alive = true;
   747                 alive = true;
   748                 scanStat(tree.finalizer);
   748                 scanStat(tree.finalizer);
       
   749                 tree.finallyCanCompleteNormally = alive;
   749                 if (!alive) {
   750                 if (!alive) {
   750                     // discard exits and exceptions from try and finally
   751                     // discard exits and exceptions from try and finally
   751                     thrown = chk.union(thrown, thrownPrev);
   752                     thrown = chk.union(thrown, thrownPrev);
   752                     if (lint.isEnabled(Lint.LintCategory.FINALLY)) {
   753                     if (lint.isEnabled(Lint.LintCategory.FINALLY)) {
   753                         log.warning(Lint.LintCategory.FINALLY,
   754                         log.warning(Lint.LintCategory.FINALLY,
   762                     while (exits.nonEmpty()) {
   763                     while (exits.nonEmpty()) {
   763                         pendingExits.append(exits.next());
   764                         pendingExits.append(exits.next());
   764                     }
   765                     }
   765                     alive = aliveEnd;
   766                     alive = aliveEnd;
   766                 }
   767                 }
   767                 tree.finallyCanCompleteNormally = alive;
       
   768             } else {
   768             } else {
   769                 thrown = chk.union(thrown, chk.diff(thrownInTry, caughtInTry));
   769                 thrown = chk.union(thrown, chk.diff(thrownInTry, caughtInTry));
   770                 alive = aliveEnd;
   770                 alive = aliveEnd;
   771                 ListBuffer<FlowPendingExit> exits = pendingExits;
   771                 ListBuffer<FlowPendingExit> exits = pendingExits;
   772                 pendingExits = prevPendingExits;
   772                 pendingExits = prevPendingExits;