db-jdo-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From m..@apache.org
Subject svn commit: r162080 - /incubator/jdo/trunk/ri11/src/java/org/apache/jdo/util/WeakHashSet.java
Date Wed, 20 Apr 2005 21:46:52 GMT
Author: mbo
Date: Wed Apr 20 14:46:52 2005
New Revision: 162080

URL: http://svn.apache.org/viewcvs?rev=162080&view=rev
Log:
Change WeakHashSet implementation: cleanup WeakHashSet on remove but not on size

Modified:
    incubator/jdo/trunk/ri11/src/java/org/apache/jdo/util/WeakHashSet.java

Modified: incubator/jdo/trunk/ri11/src/java/org/apache/jdo/util/WeakHashSet.java
URL: http://svn.apache.org/viewcvs/incubator/jdo/trunk/ri11/src/java/org/apache/jdo/util/WeakHashSet.java?rev=162080&r1=162079&r2=162080&view=diff
==============================================================================
--- incubator/jdo/trunk/ri11/src/java/org/apache/jdo/util/WeakHashSet.java (original)
+++ incubator/jdo/trunk/ri11/src/java/org/apache/jdo/util/WeakHashSet.java Wed Apr 20 14:46:52
2005
@@ -92,17 +92,9 @@
      * @return <code>true</code> if the set contained the specified element.
      */
     public boolean remove(Object o) {
-        return super.remove(WeakElement.create(o));
-    }
-
-    /**
-     * Returns the number of elements in this set (its cardinality).
-     *
-     * @return the number of elements in this set (its cardinality).
-     */
-    public int size() {
+        boolean ret = super.remove(WeakElement.create(o));
         processQueue();
-        return super.size();
+        return ret;
     }
 
     /**



Mime
View raw message