diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2001-02-16 02:25:24 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2001-02-16 02:25:24 +0000 |
commit | 5ace5775649eb0485694c80247d3ca026f2e4a2c (patch) | |
tree | 05074021f2f39a7d082e2e3b75e98fae499c2f85 /libjava/java/util | |
parent | 729338bb3893cc9cbbf8035785aed3668d661522 (diff) | |
download | gcc-5ace5775649eb0485694c80247d3ca026f2e4a2c.zip gcc-5ace5775649eb0485694c80247d3ca026f2e4a2c.tar.gz gcc-5ace5775649eb0485694c80247d3ca026f2e4a2c.tar.bz2 |
TreeMap.java (nil): Made non-final.
* java/util/TreeMap.java (nil): Made non-final.
(clone): Create new nil node for copy.
From-SVN: r39736
Diffstat (limited to 'libjava/java/util')
-rw-r--r-- | libjava/java/util/TreeMap.java | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/libjava/java/util/TreeMap.java b/libjava/java/util/TreeMap.java index 67ecebd..26e3fd6 100644 --- a/libjava/java/util/TreeMap.java +++ b/libjava/java/util/TreeMap.java @@ -56,7 +56,7 @@ import java.io.IOException; * * @author Jon Zeppieri * @author Bryce McKinlay - * @modified $Id: TreeMap.java,v 1.2 2001/02/14 05:32:31 bryce Exp $ + * @modified $Id: TreeMap.java,v 1.3 2001/02/16 01:49:40 bryce Exp $ */ public class TreeMap extends AbstractMap implements SortedMap, Cloneable, Serializable @@ -67,7 +67,7 @@ public class TreeMap extends AbstractMap /** Sentinal node, used to avoid null checks for corner cases and make the delete rebalance code simpler. Note that this must not be static, due to thread-safety concerns. */ - transient final Node nil = new Node(null, null); + transient Node nil = new Node(null, null); /** The root node of this TreeMap */ transient Node root = nil; @@ -186,6 +186,8 @@ public class TreeMap extends AbstractMap catch (CloneNotSupportedException x) { } + // Each instance must have a unique sentinal. + copy.nil = new Node(null, null); copy.fabricateTree(size); Node node = firstNode(); |