I’m really stumped by this one:
Code execution jumps from line 07 to line 10. What the heck Java? Skipping line 08 and “falling through” the if statement???
01 public String getContainerNameFromUID(Activity aActivity, Long aUID, String aDefault){
02 if(aUID != null){
03 Cursor containerCursor;
04 containerCursor = fetchContainer(aUID);
05 aActivity.startManagingCursor(containerCursor);
06 int i = containerCursor.getColumnIndexOrThrow(KEY_NAME);
07 String test =containerCursor.getString(i);
08 return test;
09 }else{
10 return "Null";
11 }
12 }
Your compiler has probably optimised the code to avoid the redundant locally-scoped assignment.