question: private void rehash ( ) { int oldCapacity = table . length ; Object oldMap [ ] = table ; int newCapacity = oldCapacity * 2 + 1 ; Object newMap [ ] = new Object [ newCapacity ] ; for ( int i = oldCapacity ; i -- > 0 ; ) if ( oldMap [ i ] != null ) { int index = ( System . identityHashCode ( oldMap [ i ] ) & 0x7FFFFFFF ) % newMap . length ; while ( newMap [ index ] != null ) index = ( index + 1 ) % newMap . length ; newMap [ index ] = oldMap [ i ] ; } threshold = ( int ) ( newCapacity * loadFactor ) ; table = newMap ; }
target:  rehash. It is possible for one thread to call get method while another thread is performing rehash. Keep this in mind.