You are viewing a plain text version of this content. The canonical link for it is here.
Posted to ojb-dev@db.apache.org by mk...@apache.org on 2005/03/11 12:31:05 UTC

cvs commit: db-ojb/src/java/org/apache/ojb/broker/util/collections RemovalAwareCollection.java

mkalen      2005/03/11 03:31:05

  Modified:    src/java/org/apache/ojb/broker/util/collections Tag:
                        OJB_1_0_RELEASE RemovalAwareCollection.java
  Log:
  Cover for the case where current JRE's java.util.Vector#clear is not calling removeAllElements() (might be N/A if the Java spec is actually demanding that this is the case, which is not clearly stated in the Sun JDK1.3.1 JavaDoc).
  
  Revision  Changes    Path
  No                   revision
  No                   revision
  1.7.2.1   +9 -2      db-ojb/src/java/org/apache/ojb/broker/util/collections/RemovalAwareCollection.java
  
  Index: RemovalAwareCollection.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/util/collections/RemovalAwareCollection.java,v
  retrieving revision 1.7
  retrieving revision 1.7.2.1
  diff -u -r1.7 -r1.7.2.1
  --- RemovalAwareCollection.java	30 Apr 2004 20:14:24 -0000	1.7
  +++ RemovalAwareCollection.java	11 Mar 2005 11:31:05 -0000	1.7.2.1
  @@ -47,7 +47,6 @@
           Iterator iter = allObjectsToBeRemoved.iterator();
           while (iter.hasNext())
           {
  -            // @todo: once a PB instance is available as a callback parameter we should use it!
               broker.delete(iter.next());
           }
           allObjectsToBeRemoved.clear();
  @@ -83,6 +82,14 @@
       }
   
       /**
  +     * @see java.util.Vector#clear()
  +     */
  +    public synchronized void clear()
  +    {
  +        removeAllElements();
  +    }
  +
  +    /**
        * @see java.util.Vector#removeAllElements()
        */
       public synchronized void removeAllElements()
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
For additional commands, e-mail: ojb-dev-help@db.apache.org