ChinchuAjith commented on code in PR #6537:
URL:
https://github.com/apache/incubator-kie-drools/pull/6537#discussion_r2580741707
##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/ast/BetweenNode.java:
##########
@@ -107,18 +109,27 @@ public Object evaluate(EvaluationContext ctx) {
ctx.notifyEvt(astEvent(severity, Msg.createMessage(Msg.IS_NULL,
"end")));
problem = true;
}
- if (problem && ctx.getFEELDialect() != FEELDialect.BFEEL) return null;
+ if (problem && ctx.getFEELDialect() != FEELDialect.BFEEL)
+ return null;
+
+ /*
+ * Object gte = InfixExecutorUtils.or(BooleanEvalHelper.compare(o_val,
o_s, ctx.getFEELDialect(), (l, r) -> l.compareTo(r) > 0),
+ * BooleanEvalHelper.isEqual(o_val, o_s, ctx.getFEELDialect()),
+ * ctx);
+ */ // do not use Java || to avoid potential NPE due to FEEL 3vl.
+ Object gte = GteExecutor.instance().evaluate(o_val, o_s, ctx);
Review Comment:
Done
##########
kie-dmn/kie-dmn-feel/src/main/java/org/kie/dmn/feel/lang/ast/BetweenNode.java:
##########
@@ -107,18 +109,27 @@ public Object evaluate(EvaluationContext ctx) {
ctx.notifyEvt(astEvent(severity, Msg.createMessage(Msg.IS_NULL,
"end")));
problem = true;
}
- if (problem && ctx.getFEELDialect() != FEELDialect.BFEEL) return null;
+ if (problem && ctx.getFEELDialect() != FEELDialect.BFEEL)
+ return null;
+
+ /*
+ * Object gte = InfixExecutorUtils.or(BooleanEvalHelper.compare(o_val,
o_s, ctx.getFEELDialect(), (l, r) -> l.compareTo(r) > 0),
+ * BooleanEvalHelper.isEqual(o_val, o_s, ctx.getFEELDialect()),
+ * ctx);
+ */ // do not use Java || to avoid potential NPE due to FEEL 3vl.
+ Object gte = GteExecutor.instance().evaluate(o_val, o_s, ctx);
- Object gte = InfixExecutorUtils.or(BooleanEvalHelper.compare(o_val,
o_s, ctx.getFEELDialect(), (l, r) -> l.compareTo(r) > 0),
- BooleanEvalHelper.isEqual(o_val,
o_s, ctx.getFEELDialect()),
- ctx); // do not use Java || to
avoid potential NPE due to FEEL 3vl.
if (gte == null) {
ctx.notifyEvt(astEvent(Severity.ERROR,
Msg.createMessage(Msg.X_TYPE_INCOMPATIBLE_WITH_Y_TYPE, "value", "start")));
}
- Object lte = InfixExecutorUtils.or(BooleanEvalHelper.compare(o_val,
o_e, ctx.getFEELDialect(), (l, r) -> l.compareTo(r) < 0),
- BooleanEvalHelper.isEqual(o_val, o_e, ctx.getFEELDialect()),
- ctx); // do not use Java || to avoid potential NPE due to FEEL
3vl.
+ /*
+ * Object lte = InfixExecutorUtils.or(BooleanEvalHelper.compare(o_val,
o_e, ctx.getFEELDialect(), (l, r) -> l.compareTo(r) < 0),
+ * BooleanEvalHelper.isEqual(o_val, o_e, ctx.getFEELDialect()),
+ * ctx); // do not use Java || to avoid potential NPE due to FEEL 3vl.
+ */
+ Object lte = LteExecutor.instance().evaluate(o_val, o_e, ctx);
Review Comment:
Done
--
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]