aboutsummaryrefslogtreecommitdiff
path: root/libjava/java
diff options
context:
space:
mode:
Diffstat (limited to 'libjava/java')
-rw-r--r--libjava/java/util/HashSet.java13
1 files changed, 10 insertions, 3 deletions
diff --git a/libjava/java/util/HashSet.java b/libjava/java/util/HashSet.java
index c1a5218..228e419 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.2 $
- * @modified $Id: HashSet.java,v 1.2 2001/02/14 04:44:21 bryce Exp $
+ * @version $Revision: 1.3 $
+ * @modified $Id: HashSet.java,v 1.3 2001/02/15 05:12:05 bryce Exp $
*/
public class HashSet extends AbstractSet
implements Set, Cloneable, Serializable
@@ -128,7 +128,14 @@ public class HashSet extends AbstractSet
*/
public Object clone()
{
- HashSet copy = new HashSet();
+ HashSet copy = null;
+ try
+ {
+ copy = (HashSet) super.clone();
+ }
+ catch (CloneNotSupportedException x)
+ {
+ }
copy.map = (HashMap) map.clone();
return copy;
}