gitgabrio commented on code in PR #6556:
URL: 
https://github.com/apache/incubator-kie-drools/pull/6556#discussion_r2720159119


##########
kie-dmn/kie-dmn-core/src/main/java/org/kie/dmn/core/ast/DMNDTExpressionEvaluator.java:
##########
@@ -78,7 +77,8 @@ public EvaluatorResult evaluate(DMNRuntimeEventManager dmrem, 
DMNResult dmnr) {
             DMNRuntimeEventManagerUtils.fireBeforeEvaluateDecisionTable( 
dmrem, node.getName(), dt.getName(), dtNodeId, result );
             List<String> paramNames = 
dt.getParameters().get(0).stream().map(Param::getName).toList();
             Object[] params = new Object[paramNames.size()];
-            EvaluationContextImpl ctx = 
feel.newEvaluationContext(List.of(events::add), Collections.emptyMap());
+            boolean isLenient = 
RuntimeModeOption.MODE.LENIENT.name().equals(((DMNRuntimeImpl) 
dmrem.getRuntime()).getRuntimeModeOption().name());

Review Comment:
   THanks @ChinchuAjith 
   We may simply compare boolean themselves here -> 
   
   `RuntimeModeOption.MODE.LENIENT.equals(((DMNRuntimeImpl) 
dmrem.getRuntime()).getRuntimeModeOption());`



##########
kie-dmn/kie-dmn-core/src/test/java/org/kie/dmn/core/impl/DMNContextFEELCtxWrapperTest.java:
##########
@@ -173,6 +173,21 @@ public FEELDialect getFEELDialect() {
         public DMNVersion getDMNVersion() {
             return DMNVersion.getLatest();
         }
+
+        @Override
+        public void enterFrame(int size) {

Review Comment:
   Are those overrides actually needed ?



##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/impl/EvaluationContextImpl.java:
##########
@@ -47,14 +47,15 @@ public class EvaluationContextImpl implements 
EvaluationContext {
     private ClassLoader rootClassLoader;
     private final FEELDialect feelDialect;
     private final DMNVersion dmnVersion;
-    private boolean isLenient = true;
+    private boolean isLenient;

Review Comment:
   HI @ChinchuAjith 
   I know it is a slightly tricky task, here, but this solution is still 
somehow flawed.
   We should implement immutability on critical properties so that it would be 
impossible to change them during execution; `isLenient` is one of them (like 
`FELLDialect` and `DMNVersion`)
   If you change `private boolean isLenient` to `private final boolean 
isLenient`, you will see that the code will break, showing a problem in the 
implementation.
   So, I think it would be better to
   1. make that `boolean isLenient`  field  `final`
   2. identify and fix all the errors
   
   Thanks! 🙏 
   
   



-- 
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]

Reply via email to