[jboss-jira] [JBoss JIRA] (DROOLS-5217) Executable model compilation fails when binding a list from double square bracket
Mario Fusco (Jira)
issues at jboss.org
Mon Apr 6 13:11:37 EDT 2020
[ https://issues.redhat.com/browse/DROOLS-5217?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Mario Fusco resolved DROOLS-5217.
---------------------------------
Resolution: Done
Fixed by https://github.com/kiegroup/drools/commit/a433c628b9a0c4853d9ea0b7e69fa9e51666017f
> Executable model compilation fails when binding a list from double square bracket
> ---------------------------------------------------------------------------------
>
> Key: DROOLS-5217
> URL: https://issues.redhat.com/browse/DROOLS-5217
> Project: Drools
> Issue Type: Bug
> Components: core engine
> Affects Versions: 7.35.0.Final
> Reporter: Matteo Casalino
> Assignee: Mario Fusco
> Priority: Major
> Attachments: binding-list-from-double-square-bracket.zip
>
>
> Executable model rule compilation fails when trying to bind a _List_ from a double square bracket
> Example of DRL that fails to compile:
> {noformat}
> rule "binding field indexed with square brackets"
> when $boundList: java.util.List() from [[1,2,3]]
> Pojo($boundList.containsAll(integerList))
> then
> end
> {noformat}
> Error:
> {noformat}
> com.github.javaparser.ParseProblemException: Encountered unexpected token: "[" "["
> at line 1, column 1.
>
> Was expecting one of:
>
> "!"
> "("
> "+"
> "++"
> ...
> {noformat}
> The example works fine when compiling without executable model.
> We acknowledge that there are better and more efficient ways to achieve the same result as the above example, but there are perhaps other use-cases for the double square bracket mvel expression. As it is supported in DRL, should it be supported with executable model too?
--
This message was sent by Atlassian Jira
(v7.13.8#713008)
More information about the jboss-jira
mailing list