eclipse - Why is the Android emulator skipping my return statement? -


I have an unexpected behavior in my Android 1.5 application under Windows emulator and debugging with Eclipse here is the generalization of code here :

  if (some conditions) {System.out.println ("found here"); Return "A"; } If (some other condition) returns "B" returns "C";  

If I step through this code with the debugger, then if someCondition is true, then "got it here" but then The final return jumps into the statement as if he is going to execute that line, what can I tell, it is returning "a", but it is confusing because it seems to be "c." Going back.

If the someCondition is incorrect, and some other restrictions is correct, debugger steps for the "B" line return - This final return does not jump to the statement and then leaves the expected method.

Any thoughts?

Remember that your program has not been executed and debugged, the Java code has been written - this is Java Code is a compiled bittecode.

If you step through the customized C ++ code, you can expect that the cursor jumps around to jump around all the codes, depending on whether rearranging the scheduler content How competent was it in

Java is very straightforward, but I think the return instructions are still slightly optimized, i.e. the share of the cleanup of the function is shared, so you always get back there .

Do not rely heavily on the exact position of the cursor - instead, use the debug output (which is faster in practice too).


Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -