diff --git a/src/java/org/apache/commons/collections/FastTreeMap.java b/src/java/org/apache/commons/collections/FastTreeMap.java index 8667ba94f..3460ca8d2 100644 --- a/src/java/org/apache/commons/collections/FastTreeMap.java +++ b/src/java/org/apache/commons/collections/FastTreeMap.java @@ -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) {