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

Alpha node sharing with static method

XMLWordPrintable

    • Icon: Bug Bug
    • Resolution: Won't Do
    • Icon: Major Major
    • None
    • 7.53.0.Final
    • executable model
    • None
    • Undefined
    • NEW
    • NEW

      Case A)

      See SharingTest.testShouldAlphaShareBecauseSameConstantDespiteDifferentSyntax().

      value == 1
      

      and

      value == TestStaticUtils.return1()
      

      are shared when standard-drl. They have the same hashCode because it's calculated by fieldValue.

      https://github.com/kiegroup/drools/blob/master/drools-mvel/src/main/java/org/drools/mvel/MVELConstraint.java#L740-L742

      but not shared when exec-model

      Case B)

      age < 30
      

      and

      age < StaticUtil.getThirty()
      

      are not shared in both standard-drl and exec-model. If we don't consider it as a bug, that would be okay.

              rhn-support-tkobayas Toshiya Kobayashi
              rhn-support-tkobayas Toshiya Kobayashi
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated:
                Resolved: