You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@commons.apache.org by ba...@apache.org on 2007/08/31 11:39:36 UTC

svn commit: r571412 - /commons/proper/collections/trunk/src/java/org/apache/commons/collections/FastTreeMap.java

Author: bayard
Date: Fri Aug 31 02:39:36 2007
New Revision: 571412

URL: http://svn.apache.org/viewvc?rev=571412&view=rev
Log:
Applying suggested fix from Thomas Louis in COLLECTIONS-264 - the clear() and CollectionView.clear() methods were losing the TreeMap's comparator

Modified:
    commons/proper/collections/trunk/src/java/org/apache/commons/collections/FastTreeMap.java

Modified: commons/proper/collections/trunk/src/java/org/apache/commons/collections/FastTreeMap.java
URL: http://svn.apache.org/viewvc/commons/proper/collections/trunk/src/java/org/apache/commons/collections/FastTreeMap.java?rev=571412&r1=571411&r2=571412&view=diff
==============================================================================
--- commons/proper/collections/trunk/src/java/org/apache/commons/collections/FastTreeMap.java (original)
+++ commons/proper/collections/trunk/src/java/org/apache/commons/collections/FastTreeMap.java Fri Aug 31 02:39:36 2007
@@ -357,7 +357,7 @@
     public void clear() {
         if (fast) {
             synchronized (this) {
-                map = new TreeMap();
+                map = new TreeMap(map.comparator());
             }
         } else {
             synchronized (map) {
@@ -580,7 +580,7 @@
         public void clear() {
             if (fast) {
                 synchronized (FastTreeMap.this) {
-                    map = new TreeMap();
+                    map = new TreeMap(map.comparator());
                 }
             } else {
                 synchronized (map) {