db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Jakob Braeuchi <jbraeu...@gmx.ch>
Subject Re: Patch for Issue OJB285
Date Wed, 15 Sep 2004 18:14:11 GMT
hi carsten,

thanks for the fix. it's in cvs now.

jakob

Carsten Ziegeler schrieb:

> Hi,
> 
> the attached patch should fix this issue:
> 
> http://nagoya.apache.org/scarab/issues/id/OJB285
> 
> (Sorry, I was somehow unable to edit the Scarab entry :()
> 
> Carsten 
> 
> Carsten Ziegeler 
> Open Source Group, S&N AG
> http://www.s-und-n.de
> http://www.osoco.net/weblogs/rael/
> 
> 
> ------------------------------------------------------------------------
> 
> Index: RemovalAwareCollection.java
> ===================================================================
> RCS file: /home/cvspublic/db-ojb/src/java/org/apache/ojb/broker/util/collections/RemovalAwareCollection.java,v
> retrieving revision 1.7
> diff -u -r1.7 RemovalAwareCollection.java
> --- RemovalAwareCollection.java	30 Apr 2004 20:14:24 -0000	1.7
> +++ RemovalAwareCollection.java	15 Sep 2004 12:50:59 -0000
> @@ -82,6 +82,24 @@
>          return result;
>      }
>  
> +    protected void removeFromDeletion(Object toBeReadded)
> +    {
> +        if (allObjectsToBeRemoved.contains(toBeReadded))
> +        {
> +            this.allObjectsToBeRemoved.remove(toBeReadded);
> +        }
> +    }
> +
> +    /**
> +     * @see java.util.Collection#add(Object)
> +     */
> +    public boolean add(Object o) 
> +    {
> +        boolean result = super.add(o);
> +        removeFromDeletion(o);
> +        return result;
> +    }
> +    
>      /**
>       * @see java.util.Vector#removeAllElements()
>       */
> Index: RemovalAwareList.java
> ===================================================================
> RCS file: /home/cvspublic/db-ojb/src/java/org/apache/ojb/broker/util/collections/RemovalAwareList.java,v
> retrieving revision 1.4
> diff -u -r1.4 RemovalAwareList.java
> --- RemovalAwareList.java	30 Apr 2004 20:14:24 -0000	1.4
> +++ RemovalAwareList.java	15 Sep 2004 12:50:59 -0000
> @@ -92,6 +92,24 @@
>      }
>  
>  
> +    protected void removeFromDeletion(Object toBeReadded)
> +    {
> +        if (allObjectsToBeRemoved.contains(toBeReadded))
> +        {
> +            this.allObjectsToBeRemoved.remove(toBeReadded);
> +        }
> +    }
> +
> +    /**
> +     * @see java.util.Collection#add(Object)
> +     */
> +    public boolean add(Object o) 
> +    {
> +        boolean result = super.add(o);
> +        removeFromDeletion(o);
> +        return result;
> +    }
> +
>      /**
>       * @see java.util.Vector#removeElementAt(int)
>       */
> 
> 
> 
> ------------------------------------------------------------------------
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: ojb-dev-unsubscribe@db.apache.org
> For additional commands, e-mail: ojb-dev-help@db.apache.org

---------------------------------------------------------------------
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