Hi there,
I have a rather odd problem inside eclipse with Maps, or HashMaps.
The mappings (key-value pairs) are put one after another to the HashMap. But not all the mappings are really put into the HashMap by the system, there is always one missing. If I change the key, the mapping is accepted again to the HashMap but another map is omited then.
It seems completely random and inexplicable to me, but the error is persistent.
This happens both in debug and run mode inside eclipse.
Here a little code snippet as example (here with a list of HashMaps):
List<HashMap> map = new ArrayList<HashMap>();
// This operation returns a List of HashMaps
map = dao.getMap();
HashMap firstMap = map.get(0);
String type = (String)firstMap.get("NAME");
The very first mapping here is NOT in the HashMap! It should be because it is returned by the Database, this I can check.
7 mappings are returned by the db, but only 6 are accessible through the Map.get() operation...
Any ideas? Thank you!
I have a rather odd problem inside eclipse with Maps, or HashMaps.
The mappings (key-value pairs) are put one after another to the HashMap. But not all the mappings are really put into the HashMap by the system, there is always one missing. If I change the key, the mapping is accepted again to the HashMap but another map is omited then.
It seems completely random and inexplicable to me, but the error is persistent.
This happens both in debug and run mode inside eclipse.
Here a little code snippet as example (here with a list of HashMaps):
List<HashMap> map = new ArrayList<HashMap>();
// This operation returns a List of HashMaps
map = dao.getMap();
HashMap firstMap = map.get(0);
String type = (String)firstMap.get("NAME");
The very first mapping here is NOT in the HashMap! It should be because it is returned by the Database, this I can check.
7 mappings are returned by the db, but only 6 are accessible through the Map.get() operation...
Any ideas? Thank you!
Comment