@SuppressWarnings("unchecked")
    public CopyOnWriteHashMap<K,V> clone() {
        try {
            CopyOnWriteHashMap<K,V> clone = (CopyOnWriteHashMap<K,V>)super.clone();
            makeReadOnly(); // owners shared with clone
            return clone;
        }
        catch (CloneNotSupportedException e) {
            throw new RuntimeException(e);
        }
    }
Make a copy of the given map with the requisite deepness.
This default implementation does return new HashMap&lt;&gt;(original);
vespajlib/src/main/java/com/yahoo/collections/CopyOnWriteHashMap.java