jdk/src/share/classes/sun/tools/tree/FinallyStatement.java
changeset 25799 1afc4675dc75
parent 25522 10d789df41bb
equal deleted inserted replaced
25798:0b2f54e47bc4 25799:1afc4675dc75
    66 //    }
    66 //    }
    67 
    67 
    68     /**
    68     /**
    69      * Check statement
    69      * Check statement
    70      */
    70      */
    71     Vset check(Environment env, Context ctx, Vset vset, Hashtable exp) {
    71     Vset check(Environment env, Context ctx, Vset vset, Hashtable<Object, Object> exp) {
    72         vset = reach(env, vset);
    72         vset = reach(env, vset);
    73         Hashtable newexp = new Hashtable();
    73         Hashtable<Object, Object> newexp = new Hashtable<>();
    74 
    74 
    75         // Handle the proposed 'try (init) { stmts } finally { stmts }' syntax.
    75         // Handle the proposed 'try (init) { stmts } finally { stmts }' syntax.
    76         // This feature has not been adopted, and support is presently disabled.
    76         // This feature has not been adopted, and support is presently disabled.
    77         /*-----------------------------------------------------------*
    77         /*-----------------------------------------------------------*
    78         if (init != null) {
    78         if (init != null) {
   180         // the ones generated by the finally.  Anything in the try is
   180         // the ones generated by the finally.  Anything in the try is
   181         // irrelevant. Otherwise, we have to merge in all the exceptions
   181         // irrelevant. Otherwise, we have to merge in all the exceptions
   182         // generated by the body into exp.
   182         // generated by the body into exp.
   183         if (finallyCanFinish) {
   183         if (finallyCanFinish) {
   184             // Add newexp's back into exp; cf. ThrowStatement.check().
   184             // Add newexp's back into exp; cf. ThrowStatement.check().
   185             for (Enumeration e = newexp.keys() ; e.hasMoreElements() ; ) {
   185             for (Enumeration<?> e = newexp.keys() ; e.hasMoreElements() ; ) {
   186                 Object def = e.nextElement();
   186                 Object def = e.nextElement();
   187                 exp.put(def, newexp.get(def));
   187                 exp.put(def, newexp.get(def));
   188             }
   188             }
   189         }
   189         }
   190         return ctx.removeAdditionalVars(vset1.addDAandJoinDU(vset2));
   190         return ctx.removeAdditionalVars(vset1.addDAandJoinDU(vset2));