diff options
author | Eric Blake <ebb9@byu.net> | 2002-05-03 04:25:24 +0000 |
---|---|---|
committer | Eric Blake <ebb9@byu.net> | 2002-05-03 04:25:24 +0000 |
commit | 4a7f87494e470c17f627e844b76ab2d78cbca9e8 (patch) | |
tree | 85ddd0cdea7e6bf1e2f4ab7601e43350e719072f | |
parent | 07227f64993e98187bec0649642d4fd1dfca6277 (diff) | |
download | classpath-4a7f87494e470c17f627e844b76ab2d78cbca9e8.tar.gz |
2002-05-02 Eric Blake <ebb9@email.byu.edu>
* java/util/TreeMap.java (remove): Fix improper return value.
* THANKYOU: Add Xuan Baldauf for spotting this.
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | THANKYOU | 1 | ||||
-rw-r--r-- | java/util/TreeMap.java | 6 |
3 files changed, 10 insertions, 2 deletions
@@ -1,3 +1,8 @@ +2002-05-02 Eric Blake <ebb9@email.byu.edu> + + * java/util/TreeMap.java (remove): Fix improper return value. + * THANKYOU: Add Xuan Baldauf for spotting this. + 2002-05-02 C. Brian Jones <cbj@gnu.org> * configure.in: move check for ZIP to --with-zip @@ -5,6 +5,7 @@ patches. If your name does not appear on either list, but should, let us know. Please keep this list in alphabetic order. C. Scott Ananian (cananian@lesser-magoo.lcs.mit.edu) +Xuan Baldauf (entwicklung--classpath--gnu.org@medium.net) Artur Biesiadowski (abies@pg.gda.pl) Per Bothner (per@bothner.com) Stephen Crawley (crawley@dstc.edu.au) diff --git a/java/util/TreeMap.java b/java/util/TreeMap.java index e530a9487..dfa9bc638 100644 --- a/java/util/TreeMap.java +++ b/java/util/TreeMap.java @@ -623,8 +623,10 @@ public class TreeMap extends AbstractMap Node n = getNode(key); if (n == nil) return null; + // Note: removeNode can alter the contents of n, so save value now. + Object result = n.value; removeNode(n); - return n.value; + return result; } /** @@ -1768,7 +1770,7 @@ public class TreeMap extends AbstractMap SubMap.this.clear(); } }; - return this.keys; + return this.values; } } // class SubMap } // class TreeMap |