ode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From boisv...@apache.org
Subject svn commit: r545261 - /incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java
Date Thu, 07 Jun 2007 18:35:48 GMT
Author: boisvert
Date: Thu Jun  7 11:35:47 2007
New Revision: 545261

URL: http://svn.apache.org/viewvc?view=rev&rev=545261
Log:
A surprisingly hot code path, so optimize

Modified:
    incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java

Modified: incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java
URL: http://svn.apache.org/viewvc/incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java?view=diff&rev=545261&r1=545260&r2=545261
==============================================================================
--- incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java (original)
+++ incubator/ode/trunk/bpel-obj/src/main/java/org/apache/ode/bpel/o/OProcess.java Thu Jun
 7 11:35:47 2007
@@ -86,11 +86,11 @@
     }
 
     public OBase getChild(final int id) {
-        return CollectionsX.find_if(_children, new MemberOfFunction<OBase>() {
-            public boolean isMember(OBase o) {
-                return o.getId() == id;
+        for (int i=_children.size()-1; i>=0; i--) {
+            OBase child = _children.get(i);
+            if (child.getId() == id) return child;
             }
-        });
+        return null;
     }
 
     public List<OBase> getChildren() {



Mime
View raw message