Hi,
I am trying to loop over an HashMap with the keySet as below:
for (String key : bundle.keySet()) {
String value = bundle.get(key);
...
}
I use a lot of for-each loops on HashMaps in other parts of my code, but this one as a weird behavior: its size is 7 (what's normal) but keySet, entrySet and values are null (according to Eclipse debug) !
The "bundle" variable is instantiated and populated as follows (nothing original...):
Map <String, String> privVar;
Constructor(){
privVar = new HashMap<String, String>();
}
public void add(String key, String value) {
this.privVar.put(key, value);
}
Any ideas are welcomed, maybe something very simple I do not see ...
Mathieu