db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From b..@apache.org
Subject cvs commit: db-ojb/src/java/org/apache/ojb/broker/core/proxy CollectionProxyDefaultImpl.java
Date Fri, 30 Apr 2004 18:57:34 GMT
brj         2004/04/30 11:57:34

  Modified:    src/java/org/apache/ojb/broker/core/proxy
                        CollectionProxyDefaultImpl.java
  Log:
  notify objects being removed when clearing
  patch by Edson Carlos Ericksson Richter
  
  Revision  Changes    Path
  1.5       +10 -3     db-ojb/src/java/org/apache/ojb/broker/core/proxy/CollectionProxyDefaultImpl.java
  
  Index: CollectionProxyDefaultImpl.java
  ===================================================================
  RCS file: /home/cvs/db-ojb/src/java/org/apache/ojb/broker/core/proxy/CollectionProxyDefaultImpl.java,v
  retrieving revision 1.4
  retrieving revision 1.5
  diff -u -r1.4 -r1.5
  --- CollectionProxyDefaultImpl.java	12 Apr 2004 18:20:56 -0000	1.4
  +++ CollectionProxyDefaultImpl.java	30 Apr 2004 18:57:34 -0000	1.5
  @@ -316,7 +316,14 @@
       {
           Collection coll;
   
  -// BRJ: use an empty collection so isLoaded will return true
  +        // ECER: assure we notify all objects being removed, 
  +        // necessary for RemovalAware classes...
  +        if (isLoaded())
  +        {
  +            getData().clear();
  +        }    
  +
  +        // BRJ: use an empty collection so isLoaded will return true
           try
           {
               coll = (Collection) getCollectionClass().newInstance();
  @@ -325,9 +332,9 @@
           {
               coll = new ArrayList();
           }
  +        
           setData(coll);
           _size = 0;
  -
       }
   
       /**
  
  
  

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


Mime
View raw message