1.1 --- a/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Jun 27 16:04:05 2013 +0100 1.2 +++ b/src/share/classes/com/sun/tools/javac/jvm/Gen.java Thu Jun 27 16:06:56 2013 +0100 1.3 @@ -1783,7 +1783,16 @@ 1.4 r.load(); 1.5 code.emitop0(ireturn + Code.truncate(Code.typecode(pt))); 1.6 } else { 1.7 + /* If we have a statement like: 1.8 + * 1.9 + * return; 1.10 + * 1.11 + * we need to store the code.pendingStatPos value before generating 1.12 + * the finalizer. 1.13 + */ 1.14 + int tmpPos = code.pendingStatPos; 1.15 targetEnv = unwind(env.enclMethod, env); 1.16 + code.pendingStatPos = tmpPos; 1.17 code.emitop0(return_); 1.18 } 1.19 endFinalizerGaps(env, targetEnv);