yesamer commented on code in PR #6213:
URL:
https://github.com/apache/incubator-kie-drools/pull/6213#discussion_r1920546824
##########
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:
@gitgabrio I would consider removing the default behavior of this method.
If someone, by mistake, removes the overridden definition in one or more
specific sub-classes, there's the risk that B-FEEL will act as FEEL, returning
null.
I guess the risk is low, as we have the Unit Tests, but I would consider
that. WDYT?
--
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]