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
This commit is contained in:
committed by
Bryce McKinlay
parent
cbc59f0118
commit
a142a99626
@@ -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)
|
||||
|
||||
Reference in New Issue
Block a user