Code example for ConcurrentModificationException

0
     * will leave the underlying data structure in a confused 
     * state. 
     */ 
    public void remove() { 
        if (_expectedSize != _hash.size()) {
            throw new ConcurrentModificationException();
        } 
 
        // Disable auto compaction during the remove. This is a workaround for bug 1642768. 
        try { 
            _hash.tempDisableAutoCompaction();
            _hash.removeAt(_index);
        } 
        finally { 
            _hash.reenableAutoCompaction( false );
        } 
 
        _expectedSize--;
    } 
 
    /**