Copilot commented on code in PR #6419:
URL:
https://github.com/apache/incubator-kie-drools/pull/6419#discussion_r2278132581
##########
drools-core/src/main/java/org/drools/core/phreak/PhreakRuleTerminalNode.java:
##########
@@ -117,8 +112,8 @@ public static void doLeftTupleInsert(TerminalNode rtnNode,
RuleExecutor executor
activationsManager.getAgendaEventSupport().fireActivationCreated(leftTuple,
activationsManager.getReteEvaluator());
- if ( rtnNode.getRule().isLockOnActive() && pctx.getType() !=
PropagationContext.Type.RULE_ADDITION ) {
- pctx = leftTuple.findMostRecentPropagationContext();
+ if ( rtnNode.getRule().isLockOnActive() &&
+ leftTuple.getPropagationContext().getType() !=
PropagationContext.Type.RULE_ADDITION ) {
Review Comment:
The lock-on-active check should use the `pctx` variable instead of calling
`leftTuple.getPropagationContext()` directly. The `pctx` variable already
contains the most recent propagation context which is what was being used in
the original code for the `blockedByLockOnActive` call on line 118.
```suggestion
pctx.getType() != PropagationContext.Type.RULE_ADDITION ) {
```
--
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]