gitgabrio commented on code in PR #6127:
URL:
https://github.com/apache/incubator-kie-drools/pull/6127#discussion_r1804569739
##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/compiler/alphanetbased/Results.java:
##########
@@ -147,25 +149,39 @@ public Object applyHitPolicy(EvaluationContext
evaluationContext,
}
events.add(new HitPolicyViolationEvent(
FEELEvent.Severity.WARN,
- String.format("No rule matched for decision table '%s' and
no default values were defined. Setting result to null.",
decisionTable.getName()),
+ String.format("No rule matched for decision table '%s' and
no default values were defined. " +
+ "Setting result to null.",
decisionTable.getName()),
decisionTable.getName(),
Collections.emptyList()));
}
- List<? extends Indexed> matchIndexes = items.matches();
- evaluationContext.notifyEvt( () -> {
- List<Integer> matchedIndexes =
matchIndexes.stream().map( dr -> dr.getIndex() + 1
).collect(Collectors.toList() );
- return new
DecisionTableRulesMatchedEvent(FEELEvent.Severity.INFO,
-
String.format("Rules matched for decision table '%s': %s",
decisionTable.getName(), matchIndexes),
-
decisionTable.getName(),
-
decisionTable.getName(),
-
matchedIndexes );
- }
+ List<DTDecisionRule> matchIndexes = items.matches();
Review Comment:
@jomarko I agree and see your point.
Anyway all that part needs review, i.e.
1. verify if that alphanetbased part is actually used anywhere
2. double check the usage of that `Indexed` interface (from which the name
`matchIndexes` came originally)
3. verify/remove all code-duplication, eventually
--
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]