db-ojb-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From arm...@apache.org
Subject svn commit: r416821 - /db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/IdentityArrayList.java
Date Fri, 23 Jun 2006 21:25:33 GMT
Author: arminw
Date: Fri Jun 23 14:25:33 2006
New Revision: 416821

URL: http://svn.apache.org/viewvc?rev=416821&view=rev
Log:
code cleanup

Modified:
    db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/IdentityArrayList.java

Modified: db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/IdentityArrayList.java
URL: http://svn.apache.org/viewvc/db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/IdentityArrayList.java?rev=416821&r1=416820&r2=416821&view=diff
==============================================================================
--- db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/IdentityArrayList.java
(original)
+++ db/ojb/branches/OJB_1_0_RELEASE/src/java/org/apache/ojb/broker/util/IdentityArrayList.java
Fri Jun 23 14:25:33 2006
@@ -66,26 +66,12 @@
     public boolean remove(Object o)
     {
         Iterator e = iterator();
-        if(o == null)
+        while(e.hasNext())
         {
-            while(e.hasNext())
+            if(o == e.next())
             {
-                if(e.next() == null)
-                {
-                    e.remove();
-                    return true;
-                }
-            }
-        }
-        else
-        {
-            while(e.hasNext())
-            {
-                if(o == e.next())
-                {
-                    e.remove();
-                    return true;
-                }
+                e.remove();
+                return true;
             }
         }
         return false;



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