Uploaded image for project: 'JBRULES'
  1. JBRULES
  2. JBRULES-2917

matching of field==v1 || field==v2 breaks when variable binding is added

This issue belongs to an archived project. You can view it, but you can't modify it. Learn more

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Done
    • Icon: Critical Critical
    • 5.2.0.CR1
    • 5.2.0.M1
    • drools-core
    • None
    • Hide

      rule ObjectIsAssignable
      when
      Assignment( $t: target, target == source || target == (java.lang.Object.class) )
      then
      end

      Show
      rule ObjectIsAssignable when Assignment( $t: target, target == source || target == (java.lang.Object.class) ) then end

      class Assignment

      { Class source, target; }

      The following rule fails to match when target == java.lang.Object.class
      rule ObjectIsAssignable
      when
      Assignment( $t: target == (java.lang.Object.class) || target == source )
      then
      end

      The following rule fails to match when target == source
      rule ObjectIsAssignable
      when
      Assignment( $t: target == source || target == (java.lang.Object.class) )
      then
      end

      The error does not occur if the binding ($t) is omitted.

      See Workaround.

            etirelli@redhat.com Edson Tirelli
            laune Wolfgang Laun (Inactive)
            Archiver:
            rhn-support-ceverson Clark Everson

              Created:
              Updated:
              Resolved:
              Archived: