This program ------------------------------------------------------------ import java.util.*; import java.util.concurrent.*; public class Bug { public static void main(String[] args) throws Exception { Map m = new ConcurrentHashMap(); m.put(1,2); Iterator it = m.entrySet().iterator(); if (it.hasNext()) { m.remove(1); // sneaky System.out.println(it.next()); } } } ------------------------------------------------------------ prints 1=null which is very surprising, since 1 was never mapped to null, and in fact, it could never be.
|