*  @param env         The environment current at the non-local exit.
     */
    boolean hasFinally(JCTree target, Env<GenContext> env) {
        while (env.tree != target) {
            if (env.tree.getTag() == JCTree.TRY && env.info.finalize.hasFinalizer())
                return true;
            env = env.next;
        }
        return false;
    }