Rikkola commented on code in PR #7135:
URL: https://github.com/apache/incubator-kie/pull/7135#discussion_r4195652520
##########
drools-core/src/main/java/org/drools/core/reteoo/SingleObjectSinkAdapter.java:
##########
@@ -120,17 +121,36 @@ public void doUnlinkSubnetwork(ReteEvaluator
reteEvaluator) {
public static void staticDoUnlinkSubnetwork(ObjectSink sink, ReteEvaluator
reteEvaluator) {
BetaMemory bm;
+ BetaNode betaNode;
if ( sink.getType() == NodeTypeEnums.AccumulateRightAdapterNode ) {
AccumulateNode accnode = ((AccumulateRight)sink).getBetaNode();
AccumulateMemory accMem = ( AccumulateMemory )
reteEvaluator.getNodeMemory( accnode );
bm = accMem.getBetaMemory();
- } else {
- BetaNode betaNode = ((RightInputAdapterNode) sink).getBetaNode();
+ betaNode = accnode;
+ } else {
+ betaNode = ((RightInputAdapterNode) sink).getBetaNode();
bm = RightInputAdapterNode.getBetaMemoryFromRightInput(betaNode,
reteEvaluator);
}
- if (sink.getType() == NodeTypeEnums.NotNode) {
- bm.linkNode( ( BetaNode ) sink, reteEvaluator );
+ if (betaNode.getType() == NodeTypeEnums.NotNode) {
+ bm.linkNode(betaNode, reteEvaluator);
Review Comment:
Not an issue.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]