src/main/java/com/workplacesystems/utilsj/collections/TransactionalHashMap.java
@SuppressWarnings("unchecked")
    void resize(int newCapacity)
    {
        Entry<K,V>[] oldTable = table;
        int oldCapacity = oldTable.length;
        if (oldCapacity == MAXIMUM_CAPACITY)
        {
            threshold = Integer.MAX_VALUE;
            return;
        }
        
        Entry<K,V>[] newTable = new Entry[newCapacity];
        transfer(newTable);
        table = newTable;
        threshold = (int)(newCapacity * loadFactor);
    }
@SuppressWarnings("unchecked")
    void resize(int newCapacity)
    {
        Entry<K,V>[] oldTable = table;
        int oldCapacity = oldTable.length;
        if (oldCapacity == MAXIMUM_CAPACITY)
        {
            threshold = Integer.MAX_VALUE;
            return;
        }
        
        Entry<K,V>[] newTable = new Entry[newCapacity];
        transfer(newTable);
        table = newTable;
        threshold = (int)(newCapacity * loadFactor);
    }
@ SuppressWarnings ( "unchecked" ) void resize ( int newCapacity ) { Entry < K , V > [ ] oldTable = table ; int oldCapacity = oldTable . length ; if ( oldCapacity == MAXIMUM_CAPACITY ) { threshold = Integer . MAX_VALUE ; return ; } Entry < K , V > [ ] newTable = new Entry [ newCapacity ] ; transfer ( newTable ) ; table = newTable ; threshold = ( int ) ( newCapacity * loadFactor ) ; }
Rehashes the contents of this map into a new array with a
larger capacity.  This method is called automatically when the
number of keys in this map reaches its threshold.

If current capacity is MAXIMUM_CAPACITY, this method does not
resize the map, but but sets threshold to Integer.MAX_VALUE.
This has the effect of preventing future calls.

@param newCapacity the new capacity, MUST be a power of two;
must be greater than current capacity unless current
capacity is MAXIMUM_CAPACITY (in which case value
is irrelevant).
Rehashes the contents of this map into a new array with a larger capacity . This method is called automatically when the number of keys in this map reaches its threshold .