I have some strange bug on Android 2.3 and lower.
I have following code:
HashMap<Somekey, Object> data = new HashMap<Somekey, Object>();
data.put(somekey, "asdfdsafdsf");
String value = (String) data.get(somekey);
on the last line I have ClassCastException: get(somekey) returns Boolean value instead of String. This error appears not only with String type, with Integer and Double too.
I don't understand why, because this code correctly works on android 4.0.3 and higher.