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


##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/functions/MatchesFunction.java:
##########
@@ -57,4 +58,9 @@ public FEELFnResult<Boolean> invoke(@ParameterName("input") 
String input, @Param
             return FEELFnResult.ofError(new 
InvalidParametersEvent(Severity.ERROR, errorMessage, e));
         }
     }
+
+    @Override
+    public Object defaultValue() {
+        return false;
+    }

Review Comment:
   🤔 
   Point is that there are lot of other Functions that does not covered in the 
boundaries of the BFEEL, so their original behavior is kept with this default 
method



##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/runtime/FEELFunction.java:
##########
@@ -70,6 +70,24 @@ public interface FEELFunction {
      */
     Object invokeReflectively(EvaluationContext ctx, Object[] params);
 
+    /**
+     * The default value to return instead of <code>null</code>, to be used 
with the B-FEEL (and other different dialects) syntax
+     * @return
+     */
+    default Object defaultValue() {
+        // To be overridden by specific classes for B-FEEL compliance
+        return null;
+    }

Review Comment:
   🤔
   Point is that there are lot of other Functions that does not covered in the 
boundaries of the BFEEL, so their original behavior is kept with this default 
method



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