Community
Participate
Working Groups
Using latest (v_731 + patch for bug 169017), compile the following code: public class X { public void save() { int a = 3; try { Object warnings = null; Object contexts = null; try { System.out.print(warnings); return; } catch (NullPointerException npe) { System.out.print(contexts); return; } finally { System.out.print("#inner -> " + a); } } catch (Exception e) { return; } finally { int var = 0; System.out.println("#save -> " + a); } } public static void main(String[] args) { new X().save(); } } in: System.out.print(contexts); return; At the beginning of the return statement, the variable a is not seen as definitely assigned. With the patch for bug 169017, the initStateIndex of the return statement is -1. I would expect a state index that indicates that 'a' is definitely assigned.
From what I could see, the initStateIndex of the said return statement is not -1 at the end of the code analysis. If I did not miss anything, this is the code generation that would loose it then. Please let me know what you think.
Closing as INVALID. Made obsolete with latest changes for stack maps.