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 /java | |
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.
Diffstat (limited to 'java')
-rw-r--r-- | java/util/TreeMap.java | 6 |
1 files changed, 4 insertions, 2 deletions
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 |