private static synchronized String[][] map2data(Map<String, Object> map) {
if (map != null) {
String[][] msg_data = (String[][]) map.get("message_data");
return msg_data;
} else {
return null;
}
}
My java code of my android project is as below. When I debug it in eclipse, after String[][] msg_data = (String[][]) map.get("message_data"); executed, it goes to return null; in the else case.
I’m totally confused about this. Firstly I guess there’s something wrong in the String[][] msg_data = (String[][]) map.get("message_data");, but when I change it toString a = "a", it is still the same. Why?
May it because “static synchronized “or something else?
Looking from your code it never be happen..
Check your
msg_datainif statementmay be its null. And if you debug it correctly may be your code be out of sync. So build once again..EDIT:
Remove else part from it, use this code,
CODE: