mirror of
https://github.com/apache/commons-collections.git
synced 2025-02-17 15:35:00 +00:00
Applying suggested fix from Thomas Louis in COLLECTIONS-264 - the clear() and CollectionView.clear() methods were losing the TreeMap's comparator
git-svn-id: https://svn.apache.org/repos/asf/commons/proper/collections/trunk@571412 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
7c260a6e48
commit
d0df8e55b0
@ -357,7 +357,7 @@ public class FastTreeMap extends TreeMap {
|
||||
public void clear() {
|
||||
if (fast) {
|
||||
synchronized (this) {
|
||||
map = new TreeMap();
|
||||
map = new TreeMap(map.comparator());
|
||||
}
|
||||
} else {
|
||||
synchronized (map) {
|
||||
@ -580,7 +580,7 @@ public class FastTreeMap extends TreeMap {
|
||||
public void clear() {
|
||||
if (fast) {
|
||||
synchronized (FastTreeMap.this) {
|
||||
map = new TreeMap();
|
||||
map = new TreeMap(map.comparator());
|
||||
}
|
||||
} else {
|
||||
synchronized (map) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user