I have hashmap
Map<String, Object> grpFields = new HashMap<String, Object>();
which is contained inside another hashmap:
Map<Integer, Object> targetFields = new LinkedHashMap<Integer, Object>();
I see this in debug mode:
20005=0, 453={452-2=7, 452-0=1, 452-1=17, 448-2=81, 448-1=0A, 447-2=D, 447-1=D, 447-0=D, 448-0=0A}, 11=1116744Pq2Q,
where 453 is a Hashmap, however when trying to extract a hash map from the parent hashmap using:
HashMap <String, Object> grpMap453 = (HashMap)targetFields.get(453);
They throw me:
java.lang.ClassCastException: java.util.HashMap cannot be cast to java.lang.String
Needless to say, the call targetFields.get(453);
should just return the hash map?
source
share