gitgabrio opened a new issue, #1619:
URL: https://github.com/apache/incubator-kie-issues/issues/1619
Inside
```java
DMNFEELHelper#compileFeelExpression(DMNCompilerContext, String,
DMNModelImpl, DMNElement, Msg.Message, Object...) {
...
CompiledExpression ce = feel.compile( expression, feelctx );
processEvents( model, element, errorMsg, msgParams );
return ce;
}
```
a CompiledExpression is returned even in presence of Syntax errors, that are
simply sent to MsgUtil.
Then, the calling code
```java
DMNEvaluatorCompiler#compileLiteralExpression(DMNCompilerContext,
DMNModelImpl, DMNBaseNode, String, LiteralExpression) {
...
CompiledExpression compiledExpression =
ctx.getFeelHelper().compileFeelExpression(ctx,
exprText,
model,
expression,
Msg.ERR_COMPILING_FEEL_EXPR_FOR_NAME_ON_NODE,
exprText,
exprName,
node.getIdentifierString() );
evaluator = new
DMNLiteralExpressionEvaluator(compiledExpression, expression,
ctx.getFeelHelper().newFEELInstance());
...
```
ignores the error messages, set the evaluator, and uses it to evalute the
model.
The result of all that is inconsistent, since
1. on one side, the expression has syntax errors, so it should be
completely discarded
2. but on the other side, an evaluator is instantiated and fired,
leading to some kind of result.
This is demonstrated by the attached
[DMN-Invalid.txt](https://github.com/user-attachments/files/17751196/DMN-Invalid.txt)
--
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]