harmony-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From telli...@apache.org
Subject svn commit: r718325 - in /harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent: ConcurrentHashMap.java CopyOnWriteArraySet.java
Date Mon, 17 Nov 2008 19:01:18 GMT
Author: tellison
Date: Mon Nov 17 11:01:17 2008
New Revision: 718325

URL: http://svn.apache.org/viewvc?rev=718325&view=rev
Log:
Part of r718318.
Fix for HARMONY-6008 ([classlib] Fix japi found differences between harmony and spec)

Modified:
    harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ConcurrentHashMap.java
    harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArraySet.java

Modified: harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ConcurrentHashMap.java
URL: http://svn.apache.org/viewvc/harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ConcurrentHashMap.java?rev=718325&r1=718324&r2=718325&view=diff
==============================================================================
--- harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ConcurrentHashMap.java
(original)
+++ harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/ConcurrentHashMap.java
Mon Nov 17 11:01:17 2008
@@ -69,7 +69,7 @@
  * @param <V> the type of mapped values 
  */
 public class ConcurrentHashMap<K, V> extends AbstractMap<K, V>
-        implements ConcurrentMap<K, V>, Cloneable, Serializable {
+        implements ConcurrentMap<K, V>, Serializable {
     private static final long serialVersionUID = 7249069246763182397L;
 
     /*
@@ -921,26 +921,6 @@
 
 
     /**
-     * Returns a shallow copy of this
-     * <tt>ConcurrentHashMap</tt> instance: the keys and
-     * values themselves are not cloned.
-     *
-     * @return a shallow copy of this map.
-     */
-    public Object clone() {
-        // We cannot call super.clone, since it would share final
-        // segments array, and there's no way to reassign finals.
-
-        float lf = segments[0].loadFactor;
-        int segs = segments.length;
-        int cap = (int)(size() / lf);
-        if (cap < segs) cap = segs;
-        ConcurrentHashMap<K,V> t = new ConcurrentHashMap<K,V>(cap, lf, segs);
-        t.putAll(this);
-        return t;
-    }
-
-    /**
      * Returns a set view of the keys contained in this map.  The set is
      * backed by the map, so changes to the map are reflected in the set, and
      * vice-versa.  The set supports element removal, which removes the

Modified: harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArraySet.java
URL: http://svn.apache.org/viewvc/harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArraySet.java?rev=718325&r1=718324&r2=718325&view=diff
==============================================================================
--- harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArraySet.java
(original)
+++ harmony/standard/classlib/branches/java5/modules/concurrent/src/main/java/java/util/concurrent/CopyOnWriteArraySet.java
Mon Nov 17 11:01:17 2008
@@ -61,7 +61,7 @@
  * @param <E> the type of elements held in this collection
  */
 public class CopyOnWriteArraySet<E> extends AbstractSet<E>
-        implements Cloneable, java.io.Serializable {
+        implements java.io.Serializable {
     private static final long serialVersionUID = 5457747651344034263L;
 
     private final CopyOnWriteArrayList<E> al;



Mime
View raw message