Currently IdentityHashMap uses tombstones to mark deleted slots. However, since this class uses linear probing, it can take advantage of Knuth's "algorithm R" (section 6.4) instead. This is more efficient. Also some variant of Martin's patch should go in: http://developer.classpath.org/pipermail/classpath-patches/2006-April/001430.html
Testing a patch.
Subject: Bug 28987 CVSROOT: /cvsroot/classpath Module name: classpath Changes by: Tom Tromey <tromey> 06/10/03 16:33:13 Modified files: java/util : IdentityHashMap.java . : ChangeLog Log message: PR classpath/28987: * java/util/IdentityHashMap.java (tombstone): Removed. (emptyslot): Removed. (nullslot): New field. (IdentityHashMap): Don't fill array. (clear): Fill with null. (hash): Now final. Use linear probing. (xform): New method. (unxform): Likewise. (removeAtIndex): Likewise. (clone, containsKey, containsValue, entrySet, get, hashCode, keySet, put, remove, values): Updated. (IdentityIterator, IdentityEntry): Likewise. (writeObject): Likewise. CVSWeb URLs: http://cvs.savannah.gnu.org/viewcvs/classpath/java/util/IdentityHashMap.java?cvsroot=classpath&r1=1.19&r2=1.20 http://cvs.savannah.gnu.org/viewcvs/classpath/ChangeLog?cvsroot=classpath&r1=1.8640&r2=1.8641
Fix checked in.