From d0df8e55b0d1a8e4a838fa522286963383f0b0a7 Mon Sep 17 00:00:00 2001 From: Henri Yandell Date: Fri, 31 Aug 2007 09:39:36 +0000 Subject: [PATCH] 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 --- src/java/org/apache/commons/collections/FastTreeMap.java | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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) {