[jboss-jira] [JBoss JIRA] (DROOLS-5315) "Contains" is not null-safe with executable model

Mario Fusco (Jira) issues at jboss.org
Mon May 11 09:29:00 EDT 2020


     [ https://issues.redhat.com/browse/DROOLS-5315?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Mario Fusco updated DROOLS-5315:
--------------------------------
    Sprint: 2020 Week 19-21 (from May 4)


> "Contains" is not null-safe with executable model
> -------------------------------------------------
>
>                 Key: DROOLS-5315
>                 URL: https://issues.redhat.com/browse/DROOLS-5315
>             Project: Drools
>          Issue Type: Bug
>          Components: core engine
>    Affects Versions: 7.37.0.Final
>            Reporter: Matteo Casalino
>            Assignee: Mario Fusco
>            Priority: Major
>         Attachments: null-contains-exec-model.zip
>
>
> When executing rules with executable model, _contains_ constraints are not null-safe, whereas they are in DRL mode
> Example of DRL that exhibits the behavior:
> {noformat}
>     rule "contains constraint"
>     when Pojo(integerList contains 3)
>     then
>     end
> {noformat}
> Error:
> {noformat}
>     java.lang.RuntimeException: java.lang.RuntimeException: java.lang.NullPointerException
>     
>     	at org.drools.modelcompiler.constraints.ConstraintEvaluator.evaluate(ConstraintEvaluator.java:95)
>     	at org.drools.modelcompiler.constraints.LambdaConstraint.isAllowed(LambdaConstraint.java:132)
>     	at org.drools.core.reteoo.AlphaNode.assertObject(AlphaNode.java:139)
>     	at org.drools.core.reteoo.SingleObjectSinkAdapter.propagateAssertObject(SingleObjectSinkAdapter.java:70)
>     	at org.drools.core.reteoo.ObjectTypeNode.propagateAssert(ObjectTypeNode.java:329)
>      ...
> {noformat}
> The example works fine when running without executable model.
> The documentation is not explicit about whether _contains_ should be null safe or not, so we are unsure whether this is to be considered or not a regression.



--
This message was sent by Atlassian Jira
(v7.13.8#713008)


More information about the jboss-jira mailing list