tkobayas commented on code in PR #7096:
URL: https://github.com/apache/incubator-kie/pull/7096#discussion_r3967307824
##########
drools-compiler/src/main/java/org/drools/compiler/rule/builder/PatternBuilder.java:
##########
@@ -1805,7 +1805,12 @@ protected ConstraintConnectiveDescr
parseExpression(final RuleBuildContext conte
final BaseDescr
original,
final String
expression) {
DrlExprParser parser =
DrlExprParserFactory.getDrlExprParser(context.getConfiguration().getOption(LanguageLevelOption.KEY));
- ConstraintConnectiveDescr result =
parser.parse(normalizeEval(expression));
+ String toParse = normalizeEval(expression);
+ if (!toParse.equals(expression) && containsTernaryOperator(toParse)) {
+ toParse = expression;
+ }
+ ConstraintConnectiveDescr result = parser.parse(toParse);
+
Review Comment:
Not fixing `normalizeEval` itself, because it is called by other places.
--
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]