Details

    • Type: Bug
    • Status: Resolved (View Workflow)
    • Priority: Major
    • Resolution: Done
    • Affects Version/s: 7.37.0.Final
    • Fix Version/s: None
    • Component/s: core engine
    • Labels:
      None
    • Sprint:
      2020 Week 19-21 (from May 4)
    • Steps to Reproduce:
      Hide

      run:

          mvn clean test
      

      on attached reproducer

      Show
      run: mvn clean test on attached reproducer
    • Docs QE Status:
      NEW
    • QE Status:
      NEW

      Description

      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:

          rule "contains constraint"
          when Pojo(integerList contains 3)
          then
          end
      

      Error:

          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)
           ...
      
      

      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.

        Gliffy Diagrams

          Attachments

            Activity

              People

              • Assignee:
                mfusco Mario Fusco
                Reporter:
                mcasalino Matteo Casalino
              • Votes:
                0 Vote for this issue
                Watchers:
                2 Start watching this issue

                Dates

                • Created:
                  Updated:
                  Resolved: