Community
Participate
Working Groups
In this test case the stepping is completely wrong. The "wrong" return statement is highlighted. Steps to reproduce: 1) Put a breakpoint on the first line of doit and keep hitting Step Over. It returns on "if (hash > 5) return", but the earlier return statement is highlighted. public class A { public void doit(Object o) { try { if (o instanceof String) return; if (o != null) { int hash = o.hashCode(); if (hash > 5) return; } } finally { System.out.println(o); } } public static void main(String[] arguments) { new A().doit(new Integer(6)); } }
This is a consequence of sharing the same subroutine code generation for the two returns statements. After the subroutine has been called, the return position is wrong.
Will follow up.
Olivier, This problem is no longer reproducible on HEAD. Stepping works as expected. I spent some time searching for defects which the current one could be a duplicate of and didn't come up with anything obvious. OK to close as INVALID ?
The stepping behavior is proper at least beginning 3.4.2 and on HEAD as well. Closing as WORKSFORME.
Verified for 3.6M7 using I20100425-2000