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:
Henri Yandell 2007-08-31 09:39:36 +00:00
parent 7c260a6e48
commit d0df8e55b0
1 changed files with 2 additions and 2 deletions

View File

@ -357,7 +357,7 @@ public class FastTreeMap extends TreeMap {
public void clear() { public void clear() {
if (fast) { if (fast) {
synchronized (this) { synchronized (this) {
map = new TreeMap(); map = new TreeMap(map.comparator());
} }
} else { } else {
synchronized (map) { synchronized (map) {
@ -580,7 +580,7 @@ public class FastTreeMap extends TreeMap {
public void clear() { public void clear() {
if (fast) { if (fast) {
synchronized (FastTreeMap.this) { synchronized (FastTreeMap.this) {
map = new TreeMap(); map = new TreeMap(map.comparator());
} }
} else { } else {
synchronized (map) { synchronized (map) {