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

Inconsistent behavior of "contains" operator

    XMLWordPrintable

Details

    • Bug
    • Resolution: Done
    • Minor
    • 6.1.0.Beta1
    • 5.5.1.Final, 6.0.0.Final
    • None
    • None

    Description

      The compiler accepts constraints such as

      Person( fullName contains 'Jr' )  // should be fullName.contains('Jr')
      

      Interestingly, MVEL evaluates it as the string operation "contains", but
      once the constraint is jitted it is again evaluated as a collection operator.

      That is, a rule such as:

        when
          $s : String( this contains "foo" ) 
        then
      

      with inputs "foo1" .. "fooN" effectively fires an unpredictable number of times before starting to fail silently

      Attachments

        Activity

          People

            mfusco@redhat.com Mario Fusco
            dsotty Davide Sottara (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: