8222930: ConcurrentSkipListMap.clone() shares size variable between original and clone

Co-authored-by: Martin Buchholz <martinrb@google.com>
Reviewed-by: martin, smarks
This commit is contained in:
Adam Farley8 2019-05-02 06:33:28 -07:00 committed by Doug Lea
parent 7d4520c109
commit d97dd4d554
2 changed files with 27 additions and 0 deletions

View file

@ -1129,6 +1129,7 @@ public class ConcurrentSkipListMap<K,V> extends AbstractMap<K,V>
clone.entrySet = null;
clone.values = null;
clone.descendingMap = null;
clone.adder = null;
clone.buildFromSorted(this);
return clone;
} catch (CloneNotSupportedException e) {