[jboss-svn-commits] JBL Code SVN: r31853 - labs/jbossrules/branches/true_modify_20100215/drools-core/src/main/java/org/drools/reteoo.

jboss-svn-commits at lists.jboss.org jboss-svn-commits at lists.jboss.org
Fri Feb 26 21:47:12 EST 2010


Author: tirelli
Date: 2010-02-26 21:47:12 -0500 (Fri, 26 Feb 2010)
New Revision: 31853

Modified:
   labs/jbossrules/branches/true_modify_20100215/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java
Log:
JBRULES-2339: JBRULES-2340: fixing tests

Modified: labs/jbossrules/branches/true_modify_20100215/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java
===================================================================
--- labs/jbossrules/branches/true_modify_20100215/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java	2010-02-26 15:30:41 UTC (rev 31852)
+++ labs/jbossrules/branches/true_modify_20100215/drools-core/src/main/java/org/drools/reteoo/AccumulateNode.java	2010-02-27 02:47:12 UTC (rev 31853)
@@ -758,15 +758,17 @@
 
         // if there is a subnetwork, we need to unwrap the object from inside the tuple
         InternalFactHandle handle = rightTuple.getFactHandle();
+        LeftTuple tuple = leftTuple;
         if ( this.unwrapRightObject ) {
-            handle = ((LeftTuple) handle.getObject()).getLastHandle();
+            tuple = (LeftTuple) handle.getObject();
+            handle = tuple.getLastHandle();
         }
 
         if ( this.accumulate.supportsReverse() ) {
             // just reverse this single match
             this.accumulate.reverse( memory.workingMemoryContext,
                                      accctx.context,
-                                     leftTuple,
+                                     tuple,
                                      handle,
                                      workingMemory );
         } else {
@@ -793,12 +795,14 @@
                                                     accctx,
                                                     false ); childMatch != null; childMatch = childMatch.getLeftParentNext() ) {
             InternalFactHandle childHandle = childMatch.getRightParent().getFactHandle();
+            LeftTuple tuple = leftTuple;
             if ( this.unwrapRightObject ) {
-                childHandle = ((LeftTuple) childHandle.getObject()).getLastHandle();
+                tuple = (LeftTuple) childHandle.getObject();
+                childHandle = tuple.getLastHandle();
             }
             this.accumulate.accumulate( memory.workingMemoryContext,
                                         accctx.context,
-                                        leftTuple,
+                                        tuple,
                                         childHandle,
                                         workingMemory );
         }



More information about the jboss-svn-commits mailing list