+2003-08-01 Tom Tromey <tromey@redhat.com>
+
+ Fix for PR libgcj/11241:
+ * java/util/WeakHashMap.java (WeakHashMap(int,float)): If
+ initialCapacity is 0, set it to 1.
+
2003-08-01 Stephen Crawley <crawley@dstc.edu.au>
* java/net/SocketImpl.java (toString): Display the remote address
/* WeakHashMap -- a hashtable that keeps only weak references
to its keys, allowing the virtual machine to reclaim them
- Copyright (C) 1999, 2000, 2001, 2002 Free Software Foundation, Inc.
+ Copyright (C) 1999, 2000, 2001, 2002, 2003 Free Software Foundation, Inc.
This file is part of GNU Classpath.
// Check loadFactor for NaN as well.
if (initialCapacity < 0 || ! (loadFactor > 0))
throw new IllegalArgumentException();
+ if (initialCapacity == 0)
+ initialCapacity = 1;
this.loadFactor = loadFactor;
threshold = (int) (initialCapacity * loadFactor);
theEntrySet = new WeakEntrySet();