[jboss-jira] [JBoss JIRA] (DROOLS-5225) Constraint grouping fails with executable model
Mario Fusco (Jira)
issues at jboss.org
Tue Apr 7 13:22:33 EDT 2020
[ https://issues.redhat.com/browse/DROOLS-5225?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-5225.
---------------------------------
Resolution: Won't Fix
As clarified in the former comment removing the unnecessary parenthesis fixes the problem. Making it work also with those additional parenthesis will unnecessary complicate (and slow down) the parser, so we agreed to avoid this.
> Constraint grouping fails with executable model
> -----------------------------------------------
>
> Key: DROOLS-5225
> URL: https://issues.redhat.com/browse/DROOLS-5225
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.35.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: constraints-grouping.zip
>
>
> Executable model rule compilation fails when trying to build a pattern using constraint grouping.
> Example of DRL that fails to compile:
> {noformat}
> rule "TestBusiness"
> when $p : Pojo(departuretimedayofweek (== 1 || == 2 || == 7) )
> then
> end
> {noformat}
> Error:
> {noformat}
> java.lang.StackOverflowError
> at java.base/java.util.LinkedList.unlink(LinkedList.java:215)
> at java.base/java.util.LinkedList.remove(LinkedList.java:530)
> at com.github.javaparser.ast.Node.setParentNode(Node.java:389)
> at com.github.javaparser.ast.Node.setAsParentNodeOf(Node.java:403)
> at com.github.javaparser.ast.expr.BinaryExpr.setLeft(BinaryExpr.java:174)
> at com.github.javaparser.ast.expr.BinaryExpr.<init>(BinaryExpr.java:131)
> at com.github.javaparser.ast.expr.BinaryExpr.<init>(BinaryExpr.java:122)
> at org.drools.modelcompiler.builder.generator.DrlxParseUtil.trasformHalfBinaryToBinary(DrlxParseUtil.java:347)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:194)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:185)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:195)
> at org.drools.modelcompiler.builder.generator.expressiontyper.ExpressionTyper.toTypedExpressionRec(ExpressionTyper.java:185)
> ...
> {noformat}
> The example works fine when compiling without executable model.
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list