diff options
author | Bryce McKinlay <bryce@albatross.co.nz> | 2001-02-14 04:44:21 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2001-02-14 04:44:21 +0000 |
commit | a142a996267f9c8adf239a565725174265c67749 (patch) | |
tree | 058bbfd9bedd55a01efac0191014b8d48e5086bd /libjava/java/util/HashSet.java | |
parent | cbc59f0118e787e09ebded7c595bc577b35a6791 (diff) | |
download | gcc-a142a996267f9c8adf239a565725174265c67749.zip gcc-a142a996267f9c8adf239a565725174265c67749.tar.gz gcc-a142a996267f9c8adf239a565725174265c67749.tar.bz2 |
re PR libgcj/1758 (java.util package lacks TreeMap)
* java/util/TreeMap.java: New file.
* java/util/TreeSet.java: New file.
* Makefile.am: Add TreeMap and TreeSet. Enable WeakHashMap.
* Makefile.in: Rebuilt.
* java/util/HashSet.java (clone): Use constructor instead of calling
clone on itself.
* java/util/SortedSet.java: Sync with classpath.
* java/util/HashMap.java (hash): Use if statement instead of ternary,
for clarity.
Resolves PR libgcj/1758.
Resolves PR java/1684.
From-SVN: r39657
Diffstat (limited to 'libjava/java/util/HashSet.java')
-rw-r--r-- | libjava/java/util/HashSet.java | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/libjava/java/util/HashSet.java b/libjava/java/util/HashSet.java index f7cb326..1d1f106 100644 --- a/libjava/java/util/HashSet.java +++ b/libjava/java/util/HashSet.java @@ -45,8 +45,8 @@ import java.io.ObjectOutputStream; * HashSet is a part of the JDK1.2 Collections API. * * @author Jon Zeppieri - * @version $Revision: 1.5 $ - * @modified $Id: HashSet.java,v 1.5 2000/10/26 10:19:00 bryce Exp $ + * @version $Revision: 1.1 $ + * @modified $Id: HashSet.java,v 1.1 2000/12/11 03:47:47 bryce Exp $ */ public class HashSet extends AbstractSet implements Set, Cloneable, Serializable @@ -128,10 +128,9 @@ public class HashSet extends AbstractSet */ public Object clone() { - HashSet copy = null; + HashSet copy = new HashSet(); try { - copy = (HashSet) super.clone(); copy.map = (HashMap) map.clone(); } catch (CloneNotSupportedException ex) |