diff options
author | Bryce McKinlay <bryce@mckinlay.net.nz> | 2003-12-07 23:00:49 +0000 |
---|---|---|
committer | Bryce McKinlay <bryce@gcc.gnu.org> | 2003-12-07 23:00:49 +0000 |
commit | 0f46e42809b564fe41b28868e4531a72e72096e5 (patch) | |
tree | 59347fad8faa35609f0e16a6810a3b32d0f78a62 /libjava | |
parent | eb1e64ef807d81c18cc82c3b1979f44525c9e3d2 (diff) | |
download | gcc-0f46e42809b564fe41b28868e4531a72e72096e5.zip gcc-0f46e42809b564fe41b28868e4531a72e72096e5.tar.gz gcc-0f46e42809b564fe41b28868e4531a72e72096e5.tar.bz2 |
Hashtable.java (Hashtable(Map)): Use putAll, not putAllInternal.
* java/util/Hashtable.java (Hashtable(Map)): Use putAll, not
putAllInternal.
(putAllInternal): Correct comment.
* java/util/HashMap.java (HashMap(Map)): As above.
(putAllInternal): As above.
From-SVN: r74400
Diffstat (limited to 'libjava')
-rw-r--r-- | libjava/ChangeLog | 7 | ||||
-rw-r--r-- | libjava/java/util/HashMap.java | 8 | ||||
-rw-r--r-- | libjava/java/util/Hashtable.java | 8 |
3 files changed, 15 insertions, 8 deletions
diff --git a/libjava/ChangeLog b/libjava/ChangeLog index 9821039..fb76298 100644 --- a/libjava/ChangeLog +++ b/libjava/ChangeLog @@ -1,5 +1,12 @@ 2002-12-08 Bryce McKinlay <bryce@mckinlay.net.nz> + * java/util/Hashtable.java (Hashtable(Map)): Use putAll, not putAllInternal. + (putAllInternal): Correct comment. + * java/util/HashMap.java (HashMap(Map)): As above. + (putAllInternal): As above. + +2002-12-08 Bryce McKinlay <bryce@mckinlay.net.nz> + * java/util/Hashtable.java (internalContainsValue): Removed. (containsValue): Don't delegate to internalContainsValue. diff --git a/libjava/java/util/HashMap.java b/libjava/java/util/HashMap.java index 6317ba7..fd6b658 100644 --- a/libjava/java/util/HashMap.java +++ b/libjava/java/util/HashMap.java @@ -223,7 +223,7 @@ public class HashMap extends AbstractMap public HashMap(Map m) { this(Math.max(m.size() * 2, DEFAULT_CAPACITY), DEFAULT_LOAD_FACTOR); - putAllInternal(m); + putAll(m); } /** @@ -699,9 +699,9 @@ public class HashMap extends AbstractMap } /** - * A simplified, more efficient internal implementation of putAll(). The - * Map constructor and clone() should not call putAll or put, in order to - * be compatible with the JDK implementation with respect to subclasses. + * A simplified, more efficient internal implementation of putAll(). clone() + * should not call putAll or put, in order to be compatible with the JDK + * implementation with respect to subclasses. * * @param m the map to initialize this from */ diff --git a/libjava/java/util/Hashtable.java b/libjava/java/util/Hashtable.java index 9cfa925..698871b 100644 --- a/libjava/java/util/Hashtable.java +++ b/libjava/java/util/Hashtable.java @@ -234,7 +234,7 @@ public class Hashtable extends Dictionary public Hashtable(Map m) { this(Math.max(m.size() * 2, DEFAULT_CAPACITY), DEFAULT_LOAD_FACTOR); - putAllInternal(m); + putAll(m); } /** @@ -852,9 +852,9 @@ public class Hashtable extends Dictionary } /** - * A simplified, more efficient internal implementation of putAll(). The - * Map constructor and clone() should not call putAll or put, in order to - * be compatible with the JDK implementation with respect to subclasses. + * A simplified, more efficient internal implementation of putAll(). clone() + * should not call putAll or put, in order to be compatible with the JDK + * implementation with respect to subclasses. * * @param m the map to initialize this from */ |