-
Task
-
Resolution: Done
-
Major
-
None
-
None
-
None
Although Concurrent[Reader]HashMap cannot contain null values,
iterators over the entrySet() can return null if the entry is removed during iteration.
See this example from the forums:
Map m = new ConcurrentHashMap();
m.put("foo", "bar");
Iterator i = m.entrySet().iterator();
Map.Entry me = (Map.Entry) i.next();
m.removeKey("foo");
me.getValue(); // returns null
Any code doing this, needs to be checked for NPEs.