[jboss-svn-commits] JBL Code SVN: r36556 - labs/jbossrules/soa_branches/BRMS-5.1-GA_BRMS-538/drools-core/src/main/java/org/drools/reteoo.
jboss-svn-commits at lists.jboss.org
jboss-svn-commits at lists.jboss.org
Wed Jan 19 15:38:43 EST 2011
Author: tsurdilovic
Date: 2011-01-19 15:38:43 -0500 (Wed, 19 Jan 2011)
New Revision: 36556
Modified:
labs/jbossrules/soa_branches/BRMS-5.1-GA_BRMS-538/drools-core/src/main/java/org/drools/reteoo/CompositeLeftTupleSinkAdapter.java
Log:
BRMS-538 : Fix for BRMS-519
Modified: labs/jbossrules/soa_branches/BRMS-5.1-GA_BRMS-538/drools-core/src/main/java/org/drools/reteoo/CompositeLeftTupleSinkAdapter.java
===================================================================
--- labs/jbossrules/soa_branches/BRMS-5.1-GA_BRMS-538/drools-core/src/main/java/org/drools/reteoo/CompositeLeftTupleSinkAdapter.java 2011-01-19 20:38:07 UTC (rev 36555)
+++ labs/jbossrules/soa_branches/BRMS-5.1-GA_BRMS-538/drools-core/src/main/java/org/drools/reteoo/CompositeLeftTupleSinkAdapter.java 2011-01-19 20:38:43 UTC (rev 36556)
@@ -276,11 +276,15 @@
// iterate to find all child tuples for the shared node
while ( childLeftTuple != null && childLeftTuple.getRightParent() == parentRightTuple ) {
// this will iterate for each child node when the
- // the current node is shared
+ // the current node is shared
+
+ // preserve the current LeftTuple, as we need to iterate to the next before re-adding
+ LeftTuple temp = childLeftTuple;
childLeftTuple.getLeftTupleSink().modifyLeftTuple( childLeftTuple,
context,
workingMemory );
childLeftTuple = childLeftTuple.getLeftParentNext();
+ temp.reAddRight();
}
return childLeftTuple;
}
@@ -293,11 +297,15 @@
// iterate to find all child tuples for the shared node
while ( childLeftTuple != null && childLeftTuple.getLeftParent() == parentLeftTuple ) {
// this will iterate for each child node when the
- // the current node is shared
+ // the current node is shared
+
+ // preserve the current LeftTuple, as we need to iterate to the next before re-adding
+ LeftTuple temp = childLeftTuple;
childLeftTuple.getLeftTupleSink().modifyLeftTuple( childLeftTuple,
context,
workingMemory );
childLeftTuple = childLeftTuple.getRightParentNext();
+ temp.reAddLeft();
}
return childLeftTuple;
}
More information about the jboss-svn-commits
mailing list