Uploaded image for project: 'Drools'
  1. Drools
  2. DROOLS-1037

Parsing of a complex constraint with an || causes a RuntimeException

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Major Major
    • 6.4.0.Beta2
    • None
    • None
    • None

      Trying to compile a rule like the following

      rule R when
          $p : Person( name == null || (name in (\"Alice\", \"Charlie\", \"David\"))==false )
      then
           list.add($p.getName());
      end
      

      causes the following RuntimeException:

      java.lang.RuntimeException
      	at org.drools.compiler.rule.builder.PatternBuilder.rewriteCompositeExpressions(PatternBuilder.java:924)
      	at org.drools.compiler.rule.builder.PatternBuilder.rewriteCompositeExpressions(PatternBuilder.java:919)
      	at org.drools.compiler.rule.builder.PatternBuilder.rewriteOrExpressions(PatternBuilder.java:893)
      	at org.drools.compiler.rule.builder.PatternBuilder.buildExpression(PatternBuilder.java:889)
      	at org.drools.compiler.rule.builder.PatternBuilder.buildCcdDescr(PatternBuilder.java:860)
      	at org.drools.compiler.rule.builder.PatternBuilder.build(PatternBuilder.java:715)
      	at org.drools.compiler.rule.builder.PatternBuilder.processConstraintsAndBinds(PatternBuilder.java:580)
      

              mfusco@redhat.com Mario Fusco
              mfusco@redhat.com Mario Fusco
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

                Created:
                Updated:
                Resolved: